source: trunk/src/mmi_customdll.h@ 2

Last change on this file since 2 was 2, checked in by ktk, 17 years ago

Initial import

File size: 20.0 KB
Line 
1//
2// MINSTALL.DLL (c) Copyright 2002-2005 Martin Kiewitz
3//
4// This file is part of MINSTALL.DLL for OS/2 / eComStation
5//
6// MINSTALL.DLL is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// MINSTALL.DLL is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with MINSTALL.DLL. If not, see <http://www.gnu.org/licenses/>.
18//
19
20// Before executing Custom-DLLs, MINSTALL_LinkInImports() must have been called
21
22BOOL MINSTALL_CreateCustomAPIThread (void);
23VOID MINSTALL_RemoveCustomAPIThread (void);
24BOOL MINSTALL_ExecuteCustomDLLs (void);
25BOOL MINSTALL_ExecuteCustomTermDLLs (void);
26
27// Now the whole MINSTALL CustomDLL-API rewritten
28#define MINSTOLD_MAXSETUPSTRING 100
29#define MINSTOLD_MAXFOLDERNAME 150
30#define MINSTOLD_MAXRESPLENGTH 256
31
32#define MINSTOLD_MAXWPCLASSNAME 256
33#define MINSTOLD_MAXWPTITLE 256
34#define MINSTOLD_MAXWPSETUPSTRING 1024
35#define MINSTOLD_MAXWPLOCATION 256
36
37#define MINSTOLD_MAXNAME 1024
38
39// Public variables...
40PMINSTINIHEADER CustomAPI_INIChange1stEntryPtr;
41PMINSTINIHEADER CustomAPI_INIChangeLastEntryPtr;
42
43#pragma pack(1)
44
45/***************************************************************************/
46/* This is a function pointer prototype that describes the entry point */
47/* into the device specific DLL. */
48/* */
49/* Parameters: HWND - Owner handle. */
50/* PSZ - Source path. */
51/* PSZ - Destination Drive (drive letter, colon - eg. "X:") */
52/* PSZ - Dll input parms in script file (DLL specific) */
53/* HWND - Object window that receives message to do MCI and */
54/* CONFIG.SYS work. */
55/* PSZ - PSZ used for response file. (Is a CHAR [256] and */
56/* used for IN/OUT) */
57/***************************************************************************/
58typedef ULONG APIENTRY CUSTOMDLL_ENTRYFUNC (HWND OwnerHandle, PSZ SourcePath, PSZ DestDrive, PSZ DllInputParms, HWND ObjectHandle, PSZ ResponseFile);
59typedef CUSTOMDLL_ENTRYFUNC *PCUSTOMDLL_ENTRYFUNC;
60
61/***************************************************************************/
62/* IM_EA_JOIN */
63/* */
64/* mp1 = 0; ** Not used */
65/* mp2 = MPFROMP(PINSTEAJOIN); */
66/* */
67/* Return EA join result. */
68/***************************************************************************/
69#define MINSTOLD_EA_JOIN_MSGID 0x057D
70
71typedef struct _MINSTOLD_EA_JOIN {
72 CHAR achFileName[CCHMAXPATH];
73 CHAR achEAFileName[CCHMAXPATH];
74 } MINSTOLD_EA_JOIN;
75typedef MINSTOLD_EA_JOIN *PMINSTOLD_EA_JOIN;
76
77/***************************************************************************/
78/* IM_EA_LONG_NAME_JOIN */
79/* */
80/* mp1 = 0; ** Not used */
81/* mp2 = MPFROMP(PINSTEALONGNAMEJOIN); */
82/* */
83/* Return EA long name creation result. */
84/***************************************************************************/
85#define MINSTOLD_EA_LONGNAMEJOIN_MSGID 0x0581
86
87typedef struct _MINSTOLD_EA_LONGNAMEJOIN {
88 CHAR achLongName[CCHMAXPATH];
89 CHAR achLongFileName[CCHMAXPATH];
90 CHAR achEALongFileName[CCHMAXPATH];
91 } MINSTOLD_EA_LONGNAMEJOIN;
92typedef MINSTOLD_EA_LONGNAMEJOIN *PMINSTOLD_EA_LONGNAMEJOIN;
93
94/***************************************************************************/
95/* IM_MCI_EXTENDED_SYSINFO - Maps to MCI_SYSINFO. */
96/* */
97/* mp1 = msg; */
98/* mp2 = pvoid; */
99/* */
100/* This will map to: */
101/* sysinfo.dwItem = (ULONG)LONGFROMMP(mp1); */
102/* sysinfo.pSysInfoParm = PVOIDFROMMP(mp2); */
103/* mciSendCommand((USHORT)0, */
104/* (USHORT)MCI_SYSINFO, */
105/* (ULONG)MCI_SYSINFO_ITEM, */
106/* (ULONG)&sysinfo, */
107/* (USHORT)0); */
108/***************************************************************************/
109#define MINSTOLD_MCI_SYSINFO_MSGID 0x057E
110
111/***************************************************************************/
112/* IM_MMIO_INSTALL - Install an IO-Proc */
113/* */
114/* mp1 = 0; ** Not used */
115/* mp2 = (PINSTIOPROC)&instioproc; ** pointer to the INSTIOPROC struct */
116/***************************************************************************/
117#define MINSTOLD_MMIO_INSTALL_MSGID 0x057F
118
119typedef struct _MINSTOLD_MMIO_INSTALL {
120 CHAR fccIOProc[5];
121 CHAR szDLLName[CCHMAXPATH];
122 CHAR szProcName[32];
123 ULONG ulFlags;
124 ULONG ulExtendLen;
125 ULONG ulMediaType;
126 ULONG ulIOProcType;
127 CHAR szDefExt[4];
128 } MINSTOLD_MMIO_INSTALL;
129typedef MINSTOLD_MMIO_INSTALL *PMINSTOLD_MMIO_INSTALL;
130
131/***************************************************************************/
132/* IM_LOG_ERROR - Write a message to the log file. */
133/* */
134/* mp1 = (PSZ)pszStatement; ** Should end with a '\n' and be NULL */
135/* ** terminated */
136/* mp2 = 0; ** Unused */
137/***************************************************************************/
138#define MINSTOLD_LOG_ERROR_MSGID 0x0573
139
140/***************************************************************************/
141/* CONFIGDATA - Pointer to this structure is passed in mp1 in all CONFIG */
142/* messages. */
143/***************************************************************************/
144typedef struct _MINSTOLD_CONFIGDATA {
145 LONG lLine;
146 LONG lBufferLen;
147 PSZ pszBuffer;
148 BOOL fAdd;
149 } MINSTOLD_CONFIGDATA;
150typedef MINSTOLD_CONFIGDATA *PMINSTOLD_CONFIGDATA;
151
152/* Line positions */
153#define MINSTOLD_CONFIG_TOP -1
154#define MINSTOLD_CONFIG_BOTTOM -2
155#define MINSTOLD_CONFIG_NEXT -3
156#define MINSTOLD_CONFIG_PREV -4
157#define MINSTOLD_CONFIG_CURRENT -5
158
159/***************************************************************************/
160/* IM_CONFIGENUMERATE - Get a line from the config.sys file. */
161/* */
162/* mp1 = (PCONFIGDATA)pconfdata; */
163/* mp2 = 0 */
164/***************************************************************************/
165#define MINSTOLD_CONFIG_ENUMERATE_MSGID 0x0574
166
167/***************************************************************************/
168/* IM_CONFIGUPDATE - Update an entry in the config.sys file. */
169/* */
170/* mp1 = (PCONFIGDATA)pconfdata; */
171/* mp2 = 0 */
172/***************************************************************************/
173#define MINSTOLD_CONFIG_UPDATE_MSGID 0x0575
174
175/***************************************************************************/
176/* IM_CONFIGMERGE - Merge data into an existing config.sys entry. */
177/* */
178/* mp1 = (PCONFIGDATA)pconfdata; */
179/* mp2 = 0 */
180/***************************************************************************/
181#define MINSTOLD_CONFIG_MERGE_MSGID 0x0576
182
183/***************************************************************************/
184/* IM_CONFIGEREPLACE - Replace an entry that exists in config.sys. */
185/* */
186/* mp1 = (PCONFIGDATA)pconfdata; */
187/* mp2 = 0 */
188/***************************************************************************/
189#define MINSTOLD_CONFIG_REPLACE_MSGID 0x0577
190// replaces CONFIG.SYS *FILE* - bad bad bad boy
191
192/***************************************************************************/
193/* IM_CONFIGNEW - Add a line to the config.sys file. */
194/* */
195/* mp1 = (PCONFIGDATA)pconfdata; */
196/* mp2 = 0 */
197/***************************************************************************/
198#define MINSTOLD_CONFIG_NEW_MSGID 0x0578
199
200/***************************************************************************/
201/* IM_CONFIGDELETE - Delete a line (REM it out) from the config.sys file. */
202/* */
203/* mp1 = (PCONFIGDATA)pconfdata; */
204/* mp2 = 0 */
205/***************************************************************************/
206#define MINSTOLD_CONFIG_DELETE_MSGID 0x0579
207
208/***************************************************************************/
209/* IM_CONFIGQUERYCHANGED - Returns TRUE if config.sys has changed else */
210/* FALSE. */
211/* */
212/* mp1 = 0 */
213/* mp2 = 0 */
214/***************************************************************************/
215#define MINSTOLD_CONFIG_QUERYCHANGED_MSGID 0x057A
216
217/***************************************************************************/
218/* IM_MIDIMAP_INSTALL - Install a midi map. */
219/* */
220/* mp1 = 0; ** Not used */
221/* mp2 = MPFROMP(pmidimapinstalldata); */
222/* */
223/* Return 0 on success, else error occurred. */
224/***************************************************************************/
225#define MINSTOLD_MIDIMAP_INSTALL_MSGID 0x057B
226
227typedef struct _MINSTOLD_MIDIMAP_INSTALL {
228 CHAR achIniName[CCHMAXPATH];
229 CHAR achAppName[1024];
230 CHAR achKeyName[1024];
231 CHAR achDllName[CCHMAXPATH];
232 ULONG ulResourceID;
233 } MINSTOLD_MIDIMAP_INSTALL;
234typedef MINSTOLD_MIDIMAP_INSTALL *PMINSTOLD_MIDIMAP_INSTALL;
235
236/***************************************************************************/
237/* IM_MCI_SEND_COMMAND - Send an MCI command */
238/* */
239/* mp1 = 0; ** Not used */
240/* mp2 = MPFROMP(PINSTMCISENDCOMMAND); */
241/* */
242/* Return mciSendCommand result. */
243/***************************************************************************/
244#define MINSTOLD_MCI_SENDCOMMAND_MSGID 0x057C
245
246typedef struct _MINSTOLD_MCI_SENDCOMMAND {
247 USHORT wDeviceID;
248 USHORT wMessage;
249 ULONG dwParam1;
250 PVOID dwParam2;
251 USHORT wUserParm;
252 } MINSTOLD_MCI_SENDCOMMAND;
253typedef MINSTOLD_MCI_SENDCOMMAND *PMINSTOLD_MCI_SENDCOMMAND;
254
255// ******************* ???
256// mp1 = PMFROMP(PSZ) - Name of the file needed
257// mp2 = PMFROMP(PSZ) - The full path to the file (CCHMAXPATH)
258#define MINSTOLD_QUERYPATH_MSGID 0x0582
259
260/***************************************************************************/
261/* IM_CODECINSTALL - Install a Codec-Proc */
262/* */
263/* mp1 = 0; ** Not used */
264/* mp2 = (PINSTCODECINIFILEINFO)&instioproc; */
265/* ** pointer to the INSTIOPROC struct */
266/* feature 5572 */
267/***************************************************************************/
268#define MINSTOLD_MMIO_CODEC1INSTALL_MSGID 0x0583
269#define MINSTOLD_MMIO_CODEC2INSTALL_MSGID 0x0584
270#define MINSTOLD_MMIO_CODECDELETE_MSGID 0x0585
271
272typedef struct _MINSTOLD_MMIO_CODEC {
273 ULONG ulStructLen;
274 CHAR fcc[5];
275 CHAR szDLLName[CCHMAXPATH];
276 CHAR szProcName[32];
277 union {
278 ULONG ulCodecCompType;
279 CHAR fccCodecCompType[5];
280 } x;
281 ULONG ulCompressSubType;
282 ULONG ulMediaType;
283 ULONG ulCapsFlags;
284 ULONG ulFlags;
285 CHAR szHWID[32];
286 ULONG ulMaxSrcBufLen;
287 ULONG ulSyncMethod;
288 ULONG fccPreferredFormat;
289 ULONG ulXalignment;
290 ULONG ulYalignment;
291 CHAR szSpecInfo[32];
292 } MINSTOLD_MMIO_CODEC;
293typedef MINSTOLD_MMIO_CODEC *PMINSTOLD_MMIO_CODEC;
294
295/***************************************************************************/
296/* IM_PROFILESTRINGINSTALL - add a profile string to an INI file */
297/* */
298/* mp1 = 0; ** Not used */
299/* mp2 = MPFROMP(PPROFILESTRINGDATA) */
300/* ** pointer to the PROFILESTRING struct */
301/* feature 12057 */
302/***************************************************************************/
303#define MINSTOLD_PRF_STRINGDATA_MSGID 0x0586
304
305typedef struct _MINSTOLD_PRF_STRINGDATA {
306 CHAR achInisName[CCHMAXPATH];
307 CHAR achAppsName[MINSTOLD_MAXNAME];
308 CHAR achKeysName[MINSTOLD_MAXNAME];
309 CHAR achDatasName[MINSTOLD_MAXNAME];
310 } MINSTOLD_PRF_STRINGDATA;
311typedef MINSTOLD_PRF_STRINGDATA *PMINSTOLD_PRF_STRINGDATA;
312
313/***************************************************************************/
314/* IM_APPEND_PRF_STRING - ensure that a sub-string resides within a key */
315/* of an INI file, append if not present */
316/* */
317/* mp1 = 0; ** Not used */
318/* mp2 = MPFROMP(PPRFAPPENDDATA); */
319/* ** pointer to the PRFAPPENDDATA struct */
320/***************************************************************************/
321#define MINSTOLD_PRF_APPENDDATA_MSGID 0x0588
322
323typedef struct _MINSTOLD_PRF_APPENDDATA {
324 CHAR achIniFile[CCHMAXPATH];
325 CHAR achAppName[MINSTOLD_MAXNAME];
326 CHAR achKeyName[MINSTOLD_MAXNAME];
327 CHAR achDefault[MINSTOLD_MAXNAME];
328 } MINSTOLD_PRF_APPENDDATA;
329typedef MINSTOLD_PRF_APPENDDATA *PMINSTOLD_PRF_APPENDDATA;
330
331/***************************************************************************/
332/* IM_SPI_INSTALL - Install stream protocol information */
333/* */
334/* mp1 = 0; ** Not used */
335/* mp2 = (PSZ)pszDllPath; ** Fully qualified path of a SPI resource DLL */
336/***************************************************************************/
337#define MINSTOLD_SPI_INSTALL_MSGID 0x0580
338
339/***************************************************************************/
340/* IM_CREATE_WPS_OBJECT - Install a folder and its contents */
341/* */
342/* mp1 = 0; ** Not used */
343/* mp2 = MPFROMP(pinstOBJECTdata); */
344/***************************************************************************/
345#define MINSTOLD_WPS_CREATEOBJECT_MSGID 0x0571
346
347typedef struct _MINSTOLD_WPS_CREATEOBJECT {
348 CHAR achClassName[MINSTOLD_MAXWPCLASSNAME];
349 CHAR achTitle[MINSTOLD_MAXWPTITLE];
350 CHAR achSetupString[MINSTOLD_MAXWPSETUPSTRING];
351 CHAR achLocation[MINSTOLD_MAXWPLOCATION];
352 ULONG ulFlags;
353 } MINSTOLD_WPS_CREATEOBJECT;
354typedef MINSTOLD_WPS_CREATEOBJECT *PMINSTOLD_WPS_CREATEOBJECT;
355
356/***************************************************************************/
357/* IM_DESTROY_WPS_OBJECT - Install a folder and its contents */
358/* */
359/* mp1 = 0; ** Not used */
360/* mp2 = MPFROMP(HOBJECT); ** or "<OBJECT_ID>" */
361/***************************************************************************/
362#define MINSTOLD_WPS_DESTROYOBJECT_MSGID 0x0572
363
364#define MINSTOLD_WPS_WPCLASS_MSGID 0x0587
365typedef struct _MINSTOLD_WPS_WPCLASS {
366 CHAR achClassNewName[MINSTOLD_MAXNAME];
367 CHAR achDllName[CCHMAXPATH];
368 CHAR achReplaceClass[MINSTOLD_MAXNAME];
369 } MINSTOLD_WPS_WPCLASS;
370typedef MINSTOLD_WPS_WPCLASS *PMINSTOLD_WPS_WPCLASS;
371
372#define MINSTOLD_RETNOERROR 0
373#define MINSTOLD_RETERRBASE 0xFF00
374#define MINSTOLD_RETERRSTART (MINSTOLD_RETERRBASE+1)
375
376#define MINSTOLD_RETOPENFAILED (MINSTOLD_RETERRSTART+ 1)
377#define MINSTOLD_RETOUTOFMEMORY (MINSTOLD_RETERRSTART+ 2)
378#define MINSTOLD_RETINVALIDPARAMETER (MINSTOLD_RETERRSTART+ 3)
379#define MINSTOLD_RETINVALIDNUMFLAG (MINSTOLD_RETERRSTART+ 4)
380#define MINSTOLD_RETATTOP (MINSTOLD_RETERRSTART+ 5)
381#define MINSTOLD_RETATBOTTOM (MINSTOLD_RETERRSTART+ 6)
382#define MINSTOLD_RETBUFFEROVERFLOW (MINSTOLD_RETERRSTART+ 7)
383#define MINSTOLD_RETLINENOTFOUND (MINSTOLD_RETERRSTART+ 8)
384#define MINSTOLD_RETCANTPARSEBUFFER (MINSTOLD_RETERRSTART+ 9)
385#define MINSTOLD_RETVARIABLENOTFOUND (MINSTOLD_RETERRSTART+ 10)
386
387#pragma pack()
Note: See TracBrowser for help on using the repository browser.