771
|
1 /* Automatically-generated Unicode-encapsulation file,
|
|
2 using the command
|
|
3
|
|
4 ../lib-src/make-mswin-unicode.pl --c-output intl-auto-encap-win32.c --h-output intl-auto-encap-win32.h intl-encap-win32.c
|
|
5
|
|
6 Do not edit. See `make-mswin-unicode.pl'.
|
|
7 */
|
|
8
|
|
9 #include <config.h>
|
|
10 #include "lisp.h"
|
|
11
|
|
12 #include "syswindows.h"
|
|
13
|
|
14
|
|
15 /*----------------------------------------------------------------------*/
|
2367
|
16 /* Processing file SHELLAPI.H */
|
|
17 /*----------------------------------------------------------------------*/
|
|
18
|
|
19 UINT
|
|
20 qxeDragQueryFile (HDROP arg1, UINT arg2, Extbyte * arg3, UINT arg4)
|
|
21 {
|
|
22 if (XEUNICODE_P)
|
|
23 return DragQueryFileW (arg1, arg2, (LPWSTR) arg3, arg4);
|
|
24 else
|
|
25 return DragQueryFileA (arg1, arg2, (LPSTR) arg3, arg4);
|
|
26 }
|
|
27
|
|
28 HINSTANCE
|
|
29 qxeShellExecute (HWND hwnd, const Extbyte * lpOperation, const Extbyte * lpFile, const Extbyte * lpParameters, const Extbyte * lpDirectory, INT nShowCmd)
|
|
30 {
|
|
31 if (XEUNICODE_P)
|
|
32 return ShellExecuteW (hwnd, (LPCWSTR) lpOperation, (LPCWSTR) lpFile, (LPCWSTR) lpParameters, (LPCWSTR) lpDirectory, nShowCmd);
|
|
33 else
|
|
34 return ShellExecuteA (hwnd, (LPCSTR) lpOperation, (LPCSTR) lpFile, (LPCSTR) lpParameters, (LPCSTR) lpDirectory, nShowCmd);
|
|
35 }
|
|
36
|
|
37 HINSTANCE
|
|
38 qxeFindExecutable (const Extbyte * lpFile, const Extbyte * lpDirectory, Extbyte * lpResult)
|
|
39 {
|
|
40 if (XEUNICODE_P)
|
|
41 return FindExecutableW ((LPCWSTR) lpFile, (LPCWSTR) lpDirectory, (LPWSTR) lpResult);
|
|
42 else
|
|
43 return FindExecutableA ((LPCSTR) lpFile, (LPCSTR) lpDirectory, (LPSTR) lpResult);
|
|
44 }
|
|
45
|
|
46 /* Error if CommandLineToArgv used: Unicode-only */
|
|
47
|
|
48 INT
|
|
49 qxeShellAbout (HWND hWnd, const Extbyte * szApp, const Extbyte * szOtherStuff, HICON hIcon)
|
|
50 {
|
|
51 if (XEUNICODE_P)
|
|
52 return ShellAboutW (hWnd, (LPCWSTR) szApp, (LPCWSTR) szOtherStuff, hIcon);
|
|
53 else
|
|
54 return ShellAboutA (hWnd, (LPCSTR) szApp, (LPCSTR) szOtherStuff, hIcon);
|
|
55 }
|
|
56
|
|
57 HICON
|
|
58 qxeExtractAssociatedIcon (HINSTANCE hInst, Extbyte * lpIconPath, LPWORD lpiIcon)
|
|
59 {
|
|
60 if (XEUNICODE_P)
|
|
61 return ExtractAssociatedIconW (hInst, (LPWSTR) lpIconPath, lpiIcon);
|
|
62 else
|
|
63 return ExtractAssociatedIconA (hInst, (LPSTR) lpIconPath, lpiIcon);
|
|
64 }
|
|
65
|
|
66 HICON
|
|
67 qxeExtractIcon (HINSTANCE hInst, const Extbyte * lpszExeFileName, UINT nIconIndex)
|
|
68 {
|
|
69 if (XEUNICODE_P)
|
|
70 return ExtractIconW (hInst, (LPCWSTR) lpszExeFileName, nIconIndex);
|
|
71 else
|
|
72 return ExtractIconA (hInst, (LPCSTR) lpszExeFileName, nIconIndex);
|
|
73 }
|
|
74
|
|
75 #if !defined (CYGWIN_HEADERS)
|
|
76
|
|
77 /* NOTE: NT 4.0+ only */
|
|
78 DWORD
|
|
79 qxeDoEnvironmentSubst (Extbyte * szString, UINT cbString)
|
|
80 {
|
|
81 if (XEUNICODE_P)
|
|
82 return DoEnvironmentSubstW ((LPWSTR) szString, cbString);
|
|
83 else
|
|
84 return DoEnvironmentSubstA ((LPSTR) szString, cbString);
|
|
85 }
|
|
86
|
|
87 #endif /* !defined (CYGWIN_HEADERS) */
|
|
88
|
|
89 /* Error if FindEnvironmentString used: causes link error; NT 4.0+ only */
|
|
90
|
|
91 /* Skipping ExtractIconEx because NT 4.0+ only, error in Cygwin prototype */
|
|
92
|
|
93 /* NOTE: NT 4.0+ only */
|
|
94 int
|
|
95 qxeSHFileOperation (LPSHFILEOPSTRUCTW lpFileOp)
|
|
96 {
|
|
97 if (XEUNICODE_P)
|
|
98 return SHFileOperationW (lpFileOp);
|
|
99 else
|
|
100 return SHFileOperationA ((LPSHFILEOPSTRUCTA) lpFileOp);
|
|
101 }
|
|
102
|
|
103 /* NOTE: NT 4.0+ only */
|
|
104 BOOL
|
|
105 qxeShellExecuteEx (LPSHELLEXECUTEINFOW lpExecInfo)
|
|
106 {
|
|
107 if (XEUNICODE_P)
|
|
108 return ShellExecuteExW (lpExecInfo);
|
|
109 else
|
|
110 return ShellExecuteExA ((LPSHELLEXECUTEINFOA) lpExecInfo);
|
|
111 }
|
|
112
|
|
113 /* Error if WinExecError used: causes link error; NT 4.0+ only */
|
|
114
|
|
115 #if !defined (CYGWIN_HEADERS)
|
|
116
|
|
117 /* NOTE: NT 4.0+ only */
|
|
118 HRESULT
|
|
119 qxeSHQueryRecycleBin (const Extbyte * pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo)
|
|
120 {
|
|
121 if (XEUNICODE_P)
|
|
122 return SHQueryRecycleBinW ((LPCWSTR) pszRootPath, pSHQueryRBInfo);
|
|
123 else
|
|
124 return SHQueryRecycleBinA ((LPCSTR) pszRootPath, pSHQueryRBInfo);
|
|
125 }
|
|
126
|
|
127 #endif /* !defined (CYGWIN_HEADERS) */
|
|
128
|
|
129 #if !defined (CYGWIN_HEADERS)
|
|
130
|
|
131 /* NOTE: NT 4.0+ only */
|
|
132 HRESULT
|
|
133 qxeSHEmptyRecycleBin (HWND hwnd, const Extbyte * pszRootPath, DWORD dwFlags)
|
|
134 {
|
|
135 if (XEUNICODE_P)
|
|
136 return SHEmptyRecycleBinW (hwnd, (LPCWSTR) pszRootPath, dwFlags);
|
|
137 else
|
|
138 return SHEmptyRecycleBinA (hwnd, (LPCSTR) pszRootPath, dwFlags);
|
|
139 }
|
|
140
|
|
141 #endif /* !defined (CYGWIN_HEADERS) */
|
|
142
|
|
143 /* Error if Shell_NotifyIcon used: split-sized NOTIFYICONDATA, NT 4.0+ only */
|
|
144
|
|
145 /* Skipping SHGetFileInfo because split-sized SHFILEINFO, NT 4.0+ only */
|
|
146
|
|
147 /* Error if SHGetDiskFreeSpace used: causes link error; NT 4.0+ only */
|
|
148
|
|
149 #if !defined (CYGWIN_HEADERS)
|
|
150
|
|
151 /* NOTE: NT 4.0+ only */
|
|
152 BOOL
|
|
153 qxeSHGetNewLinkInfo (const Extbyte * pszLinkTo, const Extbyte * pszDir, Extbyte * pszName, BOOL * pfMustCopy, UINT uFlags)
|
|
154 {
|
|
155 if (XEUNICODE_P)
|
|
156 return SHGetNewLinkInfoW ((LPCWSTR) pszLinkTo, (LPCWSTR) pszDir, (LPWSTR) pszName, pfMustCopy, uFlags);
|
|
157 else
|
|
158 return SHGetNewLinkInfoA ((LPCSTR) pszLinkTo, (LPCSTR) pszDir, (LPSTR) pszName, pfMustCopy, uFlags);
|
|
159 }
|
|
160
|
|
161 #endif /* !defined (CYGWIN_HEADERS) */
|
|
162
|
|
163 #if !defined (CYGWIN_HEADERS)
|
|
164
|
|
165 /* NOTE: NT 4.0+ only */
|
|
166 BOOL
|
|
167 qxeSHInvokePrinterCommand (HWND hwnd, UINT uAction, const Extbyte * lpBuf1, const Extbyte * lpBuf2, BOOL fModal)
|
|
168 {
|
|
169 if (XEUNICODE_P)
|
|
170 return SHInvokePrinterCommandW (hwnd, uAction, (LPCWSTR) lpBuf1, (LPCWSTR) lpBuf2, fModal);
|
|
171 else
|
|
172 return SHInvokePrinterCommandA (hwnd, uAction, (LPCSTR) lpBuf1, (LPCSTR) lpBuf2, fModal);
|
|
173 }
|
|
174
|
|
175 #endif /* !defined (CYGWIN_HEADERS) */
|
798
|
176
|
|
177
|
|
178 /*----------------------------------------------------------------------*/
|
771
|
179 /* Processing file WINSPOOL.H */
|
|
180 /*----------------------------------------------------------------------*/
|
|
181
|
|
182 #if defined (HAVE_MS_WINDOWS)
|
|
183
|
|
184 /* NOTE: #### problems with DEVMODE pointer in PRINTER_INFO_2 */
|
|
185 BOOL
|
|
186 qxeEnumPrinters (DWORD Flags, Extbyte * Name, DWORD Level, LPBYTE pPrinterEnum, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
|
|
187 {
|
|
188 if (XEUNICODE_P)
|
|
189 return EnumPrintersW (Flags, (LPWSTR) Name, Level, pPrinterEnum, cbBuf, pcbNeeded, pcReturned);
|
|
190 else
|
|
191 return EnumPrintersA (Flags, (LPSTR) Name, Level, pPrinterEnum, cbBuf, pcbNeeded, pcReturned);
|
|
192 }
|
|
193
|
|
194 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
195
|
|
196 #if defined (HAVE_MS_WINDOWS)
|
|
197
|
|
198 /* Skipping OpenPrinter because split-sized DEVMODE pointer in split PRINTER_DEFAULTS */
|
|
199
|
|
200 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
201
|
|
202 #if defined (HAVE_MS_WINDOWS)
|
|
203
|
|
204 /* Error if ResetPrinter used: split-sized DEVMODE pointer in split PRINTER_DEFAULTS */
|
|
205
|
|
206 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
207
|
|
208 #if defined (HAVE_MS_WINDOWS)
|
|
209
|
|
210 /* Error if SetJob used: split-sized DEVMODE pointer in split JOB_INFO_2 */
|
|
211
|
|
212 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
213
|
|
214 #if defined (HAVE_MS_WINDOWS)
|
|
215
|
|
216 /* Error if GetJob used: split-sized DEVMODE pointer in split JOB_INFO_2 */
|
|
217
|
|
218 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
219
|
|
220 #if defined (HAVE_MS_WINDOWS)
|
|
221
|
|
222 /* Error if EnumJobs used: split-sized DEVMODE pointer in split JOB_INFO_2 */
|
|
223
|
|
224 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
225
|
|
226 #if defined (HAVE_MS_WINDOWS)
|
|
227
|
|
228 /* Error if AddPrinter used: split-sized DEVMODE pointer in split PRINTER_INFO_2 */
|
|
229
|
|
230 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
231
|
|
232 #if defined (HAVE_MS_WINDOWS)
|
|
233
|
|
234 /* Error if SetPrinter used: split-sized DEVMODE pointer in split PRINTER_INFO_2 */
|
|
235
|
|
236 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
237
|
|
238 #if defined (HAVE_MS_WINDOWS)
|
|
239
|
|
240 /* Error if GetPrinter used: split-sized DEVMODE pointer in split PRINTER_INFO_2 */
|
|
241
|
|
242 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
243
|
|
244 #if defined (HAVE_MS_WINDOWS)
|
|
245
|
|
246 /* Error if AddPrinterDriver used: not used, complicated interface with split structures */
|
|
247
|
|
248 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
249
|
|
250 #if defined (HAVE_MS_WINDOWS)
|
|
251
|
|
252 /* Error if AddPrinterDriverEx used: not used, complicated interface with split structures */
|
|
253
|
|
254 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
255
|
|
256 #if defined (HAVE_MS_WINDOWS)
|
|
257
|
|
258 /* Error if EnumPrinterDrivers used: not used, complicated interface with split structures */
|
|
259
|
|
260 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
261
|
|
262 #if defined (HAVE_MS_WINDOWS)
|
|
263
|
|
264 /* Error if GetPrinterDriver used: not used, complicated interface with split structures */
|
|
265
|
|
266 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
267
|
|
268 #if defined (HAVE_MS_WINDOWS)
|
|
269
|
|
270 /* Error if GetPrinterDriverDirectory used: not used, complicated interface with split structures */
|
|
271
|
|
272 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
273
|
|
274 #if defined (HAVE_MS_WINDOWS)
|
|
275
|
|
276 /* Error if DeletePrinterDriver used: not used, complicated interface with split structures */
|
|
277
|
|
278 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
279
|
|
280 #if defined (HAVE_MS_WINDOWS)
|
|
281
|
|
282 /* Error if DeletePrinterDriverEx used: not used, complicated interface with split structures */
|
|
283
|
|
284 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
285
|
|
286 #if defined (HAVE_MS_WINDOWS)
|
|
287
|
|
288 /* Error if AddPerMachineConnection used: not used, complicated interface with split structures */
|
|
289
|
|
290 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
291
|
|
292 #if defined (HAVE_MS_WINDOWS)
|
|
293
|
|
294 /* Error if DeletePerMachineConnection used: not used, complicated interface with split structures */
|
|
295
|
|
296 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
297
|
|
298 #if defined (HAVE_MS_WINDOWS)
|
|
299
|
|
300 /* Error if EnumPerMachineConnections used: not used, complicated interface with split structures */
|
|
301
|
|
302 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
303
|
|
304 #if defined (HAVE_MS_WINDOWS)
|
|
305
|
|
306 /* Error if AddPrintProcessor used: not used, complicated interface with split structures */
|
|
307
|
|
308 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
309
|
|
310 #if defined (HAVE_MS_WINDOWS)
|
|
311
|
|
312 /* Error if EnumPrintProcessors used: not used, complicated interface with split structures */
|
|
313
|
|
314 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
315
|
|
316 #if defined (HAVE_MS_WINDOWS)
|
|
317
|
|
318 /* Error if GetPrintProcessorDirectory used: not used, complicated interface with split structures */
|
|
319
|
|
320 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
321
|
|
322 #if defined (HAVE_MS_WINDOWS)
|
|
323
|
|
324 /* Error if EnumPrintProcessorDatatypes used: not used, complicated interface with split structures */
|
|
325
|
|
326 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
327
|
|
328 #if defined (HAVE_MS_WINDOWS)
|
|
329
|
|
330 /* Error if DeletePrintProcessor used: not used, complicated interface with split structures */
|
|
331
|
|
332 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
333
|
|
334 #if defined (HAVE_MS_WINDOWS)
|
|
335
|
|
336 /* Error if StartDocPrinter used: not used, complicated interface with split structures */
|
|
337
|
|
338 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
339
|
|
340 #if defined (HAVE_MS_WINDOWS)
|
|
341
|
|
342 /* Error if AddJob used: not used, complicated interface with split structures */
|
|
343
|
|
344 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
345
|
|
346 #if defined (HAVE_MS_WINDOWS)
|
|
347
|
|
348 /* Skipping DocumentProperties because split-sized DEVMODE, error in Cygwin prototype */
|
|
349
|
|
350 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
351
|
|
352 #if defined (HAVE_MS_WINDOWS)
|
|
353
|
|
354 /* Error if AdvancedDocumentProperties used: not used, complicated interface with split structures */
|
|
355
|
|
356 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
357
|
|
358 #if defined (HAVE_MS_WINDOWS)
|
|
359
|
|
360 /* Error if GetPrinterData used: not used, complicated interface with split structures */
|
|
361
|
|
362 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
363
|
|
364 #if defined (HAVE_MS_WINDOWS)
|
|
365
|
|
366 /* Error if GetPrinterDataEx used: not used, complicated interface with split structures */
|
|
367
|
|
368 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
369
|
|
370 #if defined (HAVE_MS_WINDOWS)
|
|
371
|
|
372 /* Error if EnumPrinterData used: not used, complicated interface with split structures */
|
|
373
|
|
374 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
375
|
|
376 #if defined (HAVE_MS_WINDOWS)
|
|
377
|
|
378 /* Error if EnumPrinterDataEx used: not used, complicated interface with split structures */
|
|
379
|
|
380 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
381
|
|
382 #if defined (HAVE_MS_WINDOWS)
|
|
383
|
|
384 /* Error if EnumPrinterKey used: not used, complicated interface with split structures */
|
|
385
|
|
386 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
387
|
|
388 #if defined (HAVE_MS_WINDOWS)
|
|
389
|
|
390 /* Error if SetPrinterData used: not used, complicated interface with split structures */
|
|
391
|
|
392 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
393
|
|
394 #if defined (HAVE_MS_WINDOWS)
|
|
395
|
|
396 /* Error if SetPrinterDataEx used: not used, complicated interface with split structures */
|
|
397
|
|
398 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
399
|
|
400 #if defined (HAVE_MS_WINDOWS)
|
|
401
|
|
402 /* Error if DeletePrinterData used: not used, complicated interface with split structures */
|
|
403
|
|
404 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
405
|
|
406 #if defined (HAVE_MS_WINDOWS)
|
|
407
|
|
408 /* Error if DeletePrinterDataEx used: not used, complicated interface with split structures */
|
|
409
|
|
410 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
411
|
|
412 #if defined (HAVE_MS_WINDOWS)
|
|
413
|
|
414 /* Error if DeletePrinterKey used: not used, complicated interface with split structures */
|
|
415
|
|
416 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
417
|
|
418 #if defined (HAVE_MS_WINDOWS)
|
|
419
|
|
420 /* Error if PrinterMessageBox used: not used, complicated interface with split structures */
|
|
421
|
|
422 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
423
|
|
424 #if defined (HAVE_MS_WINDOWS)
|
|
425
|
|
426 /* Error if AddForm used: not used, complicated interface with split structures */
|
|
427
|
|
428 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
429
|
|
430 #if defined (HAVE_MS_WINDOWS)
|
|
431
|
|
432 /* Error if DeleteForm used: not used, complicated interface with split structures */
|
|
433
|
|
434 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
435
|
|
436 #if defined (HAVE_MS_WINDOWS)
|
|
437
|
|
438 /* Error if GetForm used: not used, complicated interface with split structures */
|
|
439
|
|
440 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
441
|
|
442 #if defined (HAVE_MS_WINDOWS)
|
|
443
|
|
444 /* Error if SetForm used: not used, complicated interface with split structures */
|
|
445
|
|
446 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
447
|
|
448 #if defined (HAVE_MS_WINDOWS)
|
|
449
|
|
450 /* Error if EnumForms used: not used, complicated interface with split structures */
|
|
451
|
|
452 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
453
|
|
454 #if defined (HAVE_MS_WINDOWS)
|
|
455
|
|
456 /* Error if EnumMonitors used: not used, complicated interface with split structures */
|
|
457
|
|
458 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
459
|
|
460 #if defined (HAVE_MS_WINDOWS)
|
|
461
|
|
462 /* Error if AddMonitor used: not used, complicated interface with split structures */
|
|
463
|
|
464 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
465
|
|
466 #if defined (HAVE_MS_WINDOWS)
|
|
467
|
|
468 /* Error if DeleteMonitor used: not used, complicated interface with split structures */
|
|
469
|
|
470 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
471
|
|
472 #if defined (HAVE_MS_WINDOWS)
|
|
473
|
|
474 /* Error if EnumPorts used: not used, complicated interface with split structures */
|
|
475
|
|
476 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
477
|
|
478 #if defined (HAVE_MS_WINDOWS)
|
|
479
|
|
480 /* Error if AddPort used: not used, complicated interface with split structures */
|
|
481
|
|
482 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
483
|
|
484 #if defined (HAVE_MS_WINDOWS)
|
|
485
|
|
486 /* Error if ConfigurePort used: not used, complicated interface with split structures */
|
|
487
|
|
488 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
489
|
|
490 #if defined (HAVE_MS_WINDOWS)
|
|
491
|
|
492 /* Error if DeletePort used: not used, complicated interface with split structures */
|
|
493
|
|
494 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
495
|
|
496 #if defined (HAVE_MS_WINDOWS)
|
|
497
|
|
498 /* Error if XcvData used: not used, complicated interface with split structures */
|
|
499
|
|
500 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
501
|
|
502 #if defined (HAVE_MS_WINDOWS)
|
|
503
|
|
504 /* Error if SetPort used: not used, complicated interface with split structures */
|
|
505
|
|
506 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
507
|
|
508 #if defined (HAVE_MS_WINDOWS)
|
|
509
|
|
510 /* Error if AddPrinterConnection used: not used, complicated interface with split structures */
|
|
511
|
|
512 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
513
|
|
514 #if defined (HAVE_MS_WINDOWS)
|
|
515
|
|
516 /* Error if DeletePrinterConnection used: not used, complicated interface with split structures */
|
|
517
|
|
518 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
519
|
|
520 #if defined (HAVE_MS_WINDOWS)
|
|
521
|
|
522 /* Error if AddPrintProvidor used: not used, complicated interface with split structures */
|
|
523
|
|
524 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
525
|
|
526 #if defined (HAVE_MS_WINDOWS)
|
|
527
|
|
528 /* Error if DeletePrintProvidor used: not used, complicated interface with split structures */
|
|
529
|
|
530 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
531
|
|
532 #if defined (HAVE_MS_WINDOWS)
|
|
533
|
|
534 /* Error if SetPrinterHTMLView used: not used, complicated interface with split structures */
|
|
535
|
|
536 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
537
|
|
538 #if defined (HAVE_MS_WINDOWS)
|
|
539
|
|
540 /* Error if GetPrinterHTMLView used: not used, complicated interface with split structures */
|
|
541
|
|
542 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
543
|
|
544
|
|
545 /*----------------------------------------------------------------------*/
|
|
546 /* Processing file WINUSER.H */
|
|
547 /*----------------------------------------------------------------------*/
|
|
548
|
|
549 int
|
|
550 qxewvsprintf (Extbyte * arg1, const Extbyte * arg2, va_list arglist)
|
|
551 {
|
|
552 if (XEUNICODE_P)
|
|
553 return wvsprintfW ((LPWSTR) arg1, (LPCWSTR) arg2, arglist);
|
|
554 else
|
|
555 return wvsprintfA ((LPSTR) arg1, (LPCSTR) arg2, arglist);
|
|
556 }
|
|
557
|
|
558 HKL
|
|
559 qxeLoadKeyboardLayout (const Extbyte * pwszKLID, UINT Flags)
|
|
560 {
|
|
561 if (XEUNICODE_P)
|
|
562 return LoadKeyboardLayoutW ((LPCWSTR) pwszKLID, Flags);
|
|
563 else
|
|
564 return LoadKeyboardLayoutA ((LPCSTR) pwszKLID, Flags);
|
|
565 }
|
|
566
|
|
567 BOOL
|
|
568 qxeGetKeyboardLayoutName (Extbyte * pwszKLID)
|
|
569 {
|
|
570 if (XEUNICODE_P)
|
|
571 return GetKeyboardLayoutNameW ((LPWSTR) pwszKLID);
|
|
572 else
|
|
573 return GetKeyboardLayoutNameA ((LPSTR) pwszKLID);
|
|
574 }
|
|
575
|
|
576 /* Error if CreateDesktop used: split-sized LPDEVMODE */
|
|
577
|
|
578 HDESK
|
|
579 qxeOpenDesktop (Extbyte * lpszDesktop, DWORD dwFlags, BOOL fInherit, ACCESS_MASK dwDesiredAccess)
|
|
580 {
|
|
581 if (XEUNICODE_P)
|
|
582 return OpenDesktopW ((LPWSTR) lpszDesktop, dwFlags, fInherit, dwDesiredAccess);
|
|
583 else
|
|
584 return OpenDesktopA ((LPSTR) lpszDesktop, dwFlags, fInherit, dwDesiredAccess);
|
|
585 }
|
|
586
|
|
587 /* NOTE: // callback fun differs only in string pointer type */
|
|
588 BOOL
|
|
589 qxeEnumDesktops (HWINSTA hwinsta, DESKTOPENUMPROCW lpEnumFunc, LPARAM lParam)
|
|
590 {
|
|
591 if (XEUNICODE_P)
|
|
592 return EnumDesktopsW (hwinsta, lpEnumFunc, lParam);
|
|
593 else
|
|
594 return EnumDesktopsA (hwinsta, (DESKTOPENUMPROCA) lpEnumFunc, lParam);
|
|
595 }
|
|
596
|
|
597 HWINSTA
|
|
598 qxeCreateWindowStation (Extbyte * lpwinsta, DWORD dwReserved, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa)
|
|
599 {
|
|
600 if (XEUNICODE_P)
|
|
601 return CreateWindowStationW ((LPWSTR) lpwinsta, dwReserved, dwDesiredAccess, lpsa);
|
|
602 else
|
|
603 return CreateWindowStationA ((LPSTR) lpwinsta, dwReserved, dwDesiredAccess, lpsa);
|
|
604 }
|
|
605
|
|
606 HWINSTA
|
|
607 qxeOpenWindowStation (Extbyte * lpszWinSta, BOOL fInherit, ACCESS_MASK dwDesiredAccess)
|
|
608 {
|
|
609 if (XEUNICODE_P)
|
|
610 return OpenWindowStationW ((LPWSTR) lpszWinSta, fInherit, dwDesiredAccess);
|
|
611 else
|
|
612 return OpenWindowStationA ((LPSTR) lpszWinSta, fInherit, dwDesiredAccess);
|
|
613 }
|
|
614
|
|
615 /* NOTE: // callback fun differs only in string pointer type */
|
|
616 BOOL
|
|
617 qxeEnumWindowStations (WINSTAENUMPROCW lpEnumFunc, LPARAM lParam)
|
|
618 {
|
|
619 if (XEUNICODE_P)
|
|
620 return EnumWindowStationsW (lpEnumFunc, lParam);
|
|
621 else
|
|
622 return EnumWindowStationsA ((WINSTAENUMPROCA) lpEnumFunc, lParam);
|
|
623 }
|
|
624
|
|
625 BOOL
|
|
626 qxeGetUserObjectInformation (HANDLE hObj, int nIndex, PVOID pvInfo, DWORD nLength, LPDWORD lpnLengthNeeded)
|
|
627 {
|
|
628 if (XEUNICODE_P)
|
|
629 return GetUserObjectInformationW (hObj, nIndex, pvInfo, nLength, lpnLengthNeeded);
|
|
630 else
|
|
631 return GetUserObjectInformationA (hObj, nIndex, pvInfo, nLength, lpnLengthNeeded);
|
|
632 }
|
|
633
|
|
634 BOOL
|
|
635 qxeSetUserObjectInformation (HANDLE hObj, int nIndex, PVOID pvInfo, DWORD nLength)
|
|
636 {
|
|
637 if (XEUNICODE_P)
|
|
638 return SetUserObjectInformationW (hObj, nIndex, pvInfo, nLength);
|
|
639 else
|
|
640 return SetUserObjectInformationA (hObj, nIndex, pvInfo, nLength);
|
|
641 }
|
|
642
|
|
643 UINT
|
|
644 qxeRegisterWindowMessage (const Extbyte * lpString)
|
|
645 {
|
|
646 if (XEUNICODE_P)
|
|
647 return RegisterWindowMessageW ((LPCWSTR) lpString);
|
|
648 else
|
|
649 return RegisterWindowMessageA ((LPCSTR) lpString);
|
|
650 }
|
|
651
|
|
652 BOOL
|
|
653 qxeGetMessage (LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax)
|
|
654 {
|
|
655 if (XEUNICODE_P)
|
|
656 return GetMessageW (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
|
|
657 else
|
|
658 return GetMessageA (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
|
|
659 }
|
|
660
|
|
661 LONG
|
|
662 qxeDispatchMessage (CONST MSG * lpMsg)
|
|
663 {
|
|
664 if (XEUNICODE_P)
|
|
665 return DispatchMessageW (lpMsg);
|
|
666 else
|
|
667 return DispatchMessageA (lpMsg);
|
|
668 }
|
|
669
|
|
670 BOOL
|
|
671 qxePeekMessage (LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg)
|
|
672 {
|
|
673 if (XEUNICODE_P)
|
|
674 return PeekMessageW (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
|
|
675 else
|
|
676 return PeekMessageA (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
|
|
677 }
|
|
678
|
|
679 /* Skipping SendMessage because split messages and structures */
|
|
680
|
|
681 LRESULT
|
|
682 qxeSendMessageTimeout (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, UINT fuFlags, UINT uTimeout, LPDWORD lpdwResult)
|
|
683 {
|
|
684 if (XEUNICODE_P)
|
|
685 return SendMessageTimeoutW (hWnd, Msg, wParam, lParam, fuFlags, uTimeout, lpdwResult);
|
|
686 else
|
|
687 return SendMessageTimeoutA (hWnd, Msg, wParam, lParam, fuFlags, uTimeout, lpdwResult);
|
|
688 }
|
|
689
|
|
690 BOOL
|
|
691 qxeSendNotifyMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
|
692 {
|
|
693 if (XEUNICODE_P)
|
|
694 return SendNotifyMessageW (hWnd, Msg, wParam, lParam);
|
|
695 else
|
|
696 return SendNotifyMessageA (hWnd, Msg, wParam, lParam);
|
|
697 }
|
|
698
|
|
699 BOOL
|
|
700 qxeSendMessageCallback (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, SENDASYNCPROC lpResultCallBack, DWORD dwData)
|
|
701 {
|
|
702 if (XEUNICODE_P)
|
|
703 return SendMessageCallbackW (hWnd, Msg, wParam, lParam, lpResultCallBack, dwData);
|
|
704 else
|
|
705 return SendMessageCallbackA (hWnd, Msg, wParam, lParam, lpResultCallBack, dwData);
|
|
706 }
|
|
707
|
|
708 /* Error if BroadcastSystemMessage used: win95 version not split; NT 4.0+ only */
|
|
709
|
|
710 /* Error if RegisterDeviceNotification used: NT 5.0+ only */
|
|
711
|
|
712 BOOL
|
|
713 qxePostMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
|
714 {
|
|
715 if (XEUNICODE_P)
|
|
716 return PostMessageW (hWnd, Msg, wParam, lParam);
|
|
717 else
|
|
718 return PostMessageA (hWnd, Msg, wParam, lParam);
|
|
719 }
|
|
720
|
|
721 BOOL
|
|
722 qxePostThreadMessage (DWORD idThread, UINT Msg, WPARAM wParam, LPARAM lParam)
|
|
723 {
|
|
724 if (XEUNICODE_P)
|
|
725 return PostThreadMessageW (idThread, Msg, wParam, lParam);
|
|
726 else
|
|
727 return PostThreadMessageA (idThread, Msg, wParam, lParam);
|
|
728 }
|
|
729
|
|
730 /* Skipping DefWindowProc because return value is conditionalized on _MAC, messes up parser */
|
|
731
|
|
732 /* Error if CallWindowProc used: two versions, STRICT and non-STRICT */
|
|
733
|
|
734 /* Error if CallWindowProc used: two versions, STRICT and non-STRICT */
|
|
735
|
|
736 /* Skipping RegisterClass because need to intercept so we can provide our own window procedure and handle split notify messages; split-simple WNDCLASS */
|
|
737
|
|
738 /* Skipping UnregisterClass because need to intercept for reasons related to RegisterClass */
|
|
739
|
|
740 BOOL
|
|
741 qxeGetClassInfo (HINSTANCE hInstance, const Extbyte * lpClassName, LPWNDCLASSW lpWndClass)
|
|
742 {
|
|
743 if (XEUNICODE_P)
|
|
744 return GetClassInfoW (hInstance, (LPCWSTR) lpClassName, lpWndClass);
|
|
745 else
|
|
746 return GetClassInfoA (hInstance, (LPCSTR) lpClassName, (LPWNDCLASSA) lpWndClass);
|
|
747 }
|
|
748
|
|
749 /* Skipping RegisterClassEx because need to intercept so we can provide our own window procedure and handle split notify messages; split-simple WNDCLASSEX; NT 4.0+ only */
|
|
750
|
|
751 /* NOTE: NT 4.0+ only */
|
|
752 BOOL
|
|
753 qxeGetClassInfoEx (HINSTANCE arg1, const Extbyte * arg2, LPWNDCLASSEXW arg3)
|
|
754 {
|
|
755 if (XEUNICODE_P)
|
|
756 return GetClassInfoExW (arg1, (LPCWSTR) arg2, arg3);
|
|
757 else
|
|
758 return GetClassInfoExA (arg1, (LPCSTR) arg2, (LPWNDCLASSEXA) arg3);
|
|
759 }
|
|
760
|
|
761 HWND
|
|
762 qxeCreateWindowEx (DWORD dwExStyle, const Extbyte * lpClassName, const Extbyte * lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
|
|
763 {
|
|
764 if (XEUNICODE_P)
|
|
765 return CreateWindowExW (dwExStyle, (LPCWSTR) lpClassName, (LPCWSTR) lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
|
|
766 else
|
|
767 return CreateWindowExA (dwExStyle, (LPCSTR) lpClassName, (LPCSTR) lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
|
|
768 }
|
|
769
|
|
770 HWND
|
|
771 qxeCreateDialogParam (HINSTANCE hInstance, const Extbyte * lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam)
|
|
772 {
|
|
773 if (XEUNICODE_P)
|
|
774 return CreateDialogParamW (hInstance, (LPCWSTR) lpTemplateName, hWndParent, lpDialogFunc, dwInitParam);
|
|
775 else
|
|
776 return CreateDialogParamA (hInstance, (LPCSTR) lpTemplateName, hWndParent, lpDialogFunc, dwInitParam);
|
|
777 }
|
|
778
|
|
779 /* NOTE: error in Cygwin prototype (no split) but fixable with typedef */
|
|
780 HWND
|
|
781 qxeCreateDialogIndirectParam (HINSTANCE hInstance, LPCDLGTEMPLATEW lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam)
|
|
782 {
|
|
783 if (XEUNICODE_P)
|
|
784 return CreateDialogIndirectParamW (hInstance, lpTemplate, hWndParent, lpDialogFunc, dwInitParam);
|
|
785 else
|
|
786 return CreateDialogIndirectParamA (hInstance, (LPCDLGTEMPLATEA) lpTemplate, hWndParent, lpDialogFunc, dwInitParam);
|
|
787 }
|
|
788
|
|
789 int
|
|
790 qxeDialogBoxParam (HINSTANCE hInstance, const Extbyte * lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam)
|
|
791 {
|
|
792 if (XEUNICODE_P)
|
|
793 return DialogBoxParamW (hInstance, (LPCWSTR) lpTemplateName, hWndParent, lpDialogFunc, dwInitParam);
|
|
794 else
|
|
795 return DialogBoxParamA (hInstance, (LPCSTR) lpTemplateName, hWndParent, lpDialogFunc, dwInitParam);
|
|
796 }
|
|
797
|
|
798 /* NOTE: error in Cygwin prototype (no split) but fixable with typedef */
|
|
799 int
|
|
800 qxeDialogBoxIndirectParam (HINSTANCE hInstance, LPCDLGTEMPLATEW hDialogTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam)
|
|
801 {
|
|
802 if (XEUNICODE_P)
|
|
803 return DialogBoxIndirectParamW (hInstance, hDialogTemplate, hWndParent, lpDialogFunc, dwInitParam);
|
|
804 else
|
|
805 return DialogBoxIndirectParamA (hInstance, (LPCDLGTEMPLATEA) hDialogTemplate, hWndParent, lpDialogFunc, dwInitParam);
|
|
806 }
|
|
807
|
|
808 BOOL
|
|
809 qxeSetDlgItemText (HWND hDlg, int nIDDlgItem, const Extbyte * lpString)
|
|
810 {
|
|
811 if (XEUNICODE_P)
|
|
812 return SetDlgItemTextW (hDlg, nIDDlgItem, (LPCWSTR) lpString);
|
|
813 else
|
|
814 return SetDlgItemTextA (hDlg, nIDDlgItem, (LPCSTR) lpString);
|
|
815 }
|
|
816
|
|
817 UINT
|
|
818 qxeGetDlgItemText (HWND hDlg, int nIDDlgItem, Extbyte * lpString, int nMaxCount)
|
|
819 {
|
|
820 if (XEUNICODE_P)
|
|
821 return GetDlgItemTextW (hDlg, nIDDlgItem, (LPWSTR) lpString, nMaxCount);
|
|
822 else
|
|
823 return GetDlgItemTextA (hDlg, nIDDlgItem, (LPSTR) lpString, nMaxCount);
|
|
824 }
|
|
825
|
|
826 LONG
|
|
827 qxeSendDlgItemMessage (HWND hDlg, int nIDDlgItem, UINT Msg, WPARAM wParam, LPARAM lParam)
|
|
828 {
|
|
829 if (XEUNICODE_P)
|
|
830 return SendDlgItemMessageW (hDlg, nIDDlgItem, Msg, wParam, lParam);
|
|
831 else
|
|
832 return SendDlgItemMessageA (hDlg, nIDDlgItem, Msg, wParam, lParam);
|
|
833 }
|
|
834
|
|
835 /* Error if DefDlgProc used: return value is conditionalized on _MAC, messes up parser */
|
|
836
|
|
837 #if !defined (CYGWIN_HEADERS)
|
|
838
|
|
839 BOOL
|
|
840 qxeCallMsgFilter (LPMSG lpMsg, int nCode)
|
|
841 {
|
|
842 if (XEUNICODE_P)
|
|
843 return CallMsgFilterW (lpMsg, nCode);
|
|
844 else
|
|
845 return CallMsgFilterA (lpMsg, nCode);
|
|
846 }
|
|
847
|
|
848 #endif /* !defined (CYGWIN_HEADERS) */
|
|
849
|
|
850 UINT
|
|
851 qxeRegisterClipboardFormat (const Extbyte * lpszFormat)
|
|
852 {
|
|
853 if (XEUNICODE_P)
|
|
854 return RegisterClipboardFormatW ((LPCWSTR) lpszFormat);
|
|
855 else
|
|
856 return RegisterClipboardFormatA ((LPCSTR) lpszFormat);
|
|
857 }
|
|
858
|
|
859 int
|
|
860 qxeGetClipboardFormatName (UINT format, Extbyte * lpszFormatName, int cchMaxCount)
|
|
861 {
|
|
862 if (XEUNICODE_P)
|
|
863 return GetClipboardFormatNameW (format, (LPWSTR) lpszFormatName, cchMaxCount);
|
|
864 else
|
|
865 return GetClipboardFormatNameA (format, (LPSTR) lpszFormatName, cchMaxCount);
|
|
866 }
|
|
867
|
|
868 BOOL
|
|
869 qxeCharToOem (const Extbyte * lpszSrc, LPSTR lpszDst)
|
|
870 {
|
|
871 if (XEUNICODE_P)
|
|
872 return CharToOemW ((LPCWSTR) lpszSrc, lpszDst);
|
|
873 else
|
|
874 return CharToOemA ((LPCSTR) lpszSrc, lpszDst);
|
|
875 }
|
|
876
|
|
877 BOOL
|
|
878 qxeOemToChar (LPCSTR lpszSrc, Extbyte * lpszDst)
|
|
879 {
|
|
880 if (XEUNICODE_P)
|
|
881 return OemToCharW (lpszSrc, (LPWSTR) lpszDst);
|
|
882 else
|
|
883 return OemToCharA (lpszSrc, (LPSTR) lpszDst);
|
|
884 }
|
|
885
|
|
886 BOOL
|
|
887 qxeCharToOemBuff (const Extbyte * lpszSrc, LPSTR lpszDst, DWORD cchDstLength)
|
|
888 {
|
|
889 if (XEUNICODE_P)
|
|
890 return CharToOemBuffW ((LPCWSTR) lpszSrc, lpszDst, cchDstLength);
|
|
891 else
|
|
892 return CharToOemBuffA ((LPCSTR) lpszSrc, lpszDst, cchDstLength);
|
|
893 }
|
|
894
|
|
895 BOOL
|
|
896 qxeOemToCharBuff (LPCSTR lpszSrc, Extbyte * lpszDst, DWORD cchDstLength)
|
|
897 {
|
|
898 if (XEUNICODE_P)
|
|
899 return OemToCharBuffW (lpszSrc, (LPWSTR) lpszDst, cchDstLength);
|
|
900 else
|
|
901 return OemToCharBuffA (lpszSrc, (LPSTR) lpszDst, cchDstLength);
|
|
902 }
|
|
903
|
|
904 Extbyte *
|
|
905 qxeCharUpper (Extbyte * lpsz)
|
|
906 {
|
|
907 if (XEUNICODE_P)
|
|
908 return (Extbyte *) CharUpperW ((LPWSTR) lpsz);
|
|
909 else
|
|
910 return (Extbyte *) CharUpperA ((LPSTR) lpsz);
|
|
911 }
|
|
912
|
|
913 DWORD
|
|
914 qxeCharUpperBuff (Extbyte * lpsz, DWORD cchLength)
|
|
915 {
|
|
916 if (XEUNICODE_P)
|
|
917 return CharUpperBuffW ((LPWSTR) lpsz, cchLength);
|
|
918 else
|
|
919 return CharUpperBuffA ((LPSTR) lpsz, cchLength);
|
|
920 }
|
|
921
|
|
922 Extbyte *
|
|
923 qxeCharLower (Extbyte * lpsz)
|
|
924 {
|
|
925 if (XEUNICODE_P)
|
|
926 return (Extbyte *) CharLowerW ((LPWSTR) lpsz);
|
|
927 else
|
|
928 return (Extbyte *) CharLowerA ((LPSTR) lpsz);
|
|
929 }
|
|
930
|
|
931 DWORD
|
|
932 qxeCharLowerBuff (Extbyte * lpsz, DWORD cchLength)
|
|
933 {
|
|
934 if (XEUNICODE_P)
|
|
935 return CharLowerBuffW ((LPWSTR) lpsz, cchLength);
|
|
936 else
|
|
937 return CharLowerBuffA ((LPSTR) lpsz, cchLength);
|
|
938 }
|
|
939
|
|
940 Extbyte *
|
|
941 qxeCharNext (const Extbyte * lpsz)
|
|
942 {
|
|
943 if (XEUNICODE_P)
|
|
944 return (Extbyte *) CharNextW ((LPCWSTR) lpsz);
|
|
945 else
|
|
946 return (Extbyte *) CharNextA ((LPCSTR) lpsz);
|
|
947 }
|
|
948
|
|
949 Extbyte *
|
|
950 qxeCharPrev (const Extbyte * lpszStart, const Extbyte * lpszCurrent)
|
|
951 {
|
|
952 if (XEUNICODE_P)
|
|
953 return (Extbyte *) CharPrevW ((LPCWSTR) lpszStart, (LPCWSTR) lpszCurrent);
|
|
954 else
|
|
955 return (Extbyte *) CharPrevA ((LPCSTR) lpszStart, (LPCSTR) lpszCurrent);
|
|
956 }
|
|
957
|
|
958 /* Error if IsCharAlpha used: split CHAR */
|
|
959
|
|
960 /* Error if IsCharAlphaNumeric used: split CHAR */
|
|
961
|
|
962 /* Error if IsCharUpper used: split CHAR */
|
|
963
|
|
964 /* Error if IsCharLower used: split CHAR */
|
|
965
|
|
966 int
|
|
967 qxeGetKeyNameText (LONG lParam, Extbyte * lpString, int nSize)
|
|
968 {
|
|
969 if (XEUNICODE_P)
|
|
970 return GetKeyNameTextW (lParam, (LPWSTR) lpString, nSize);
|
|
971 else
|
|
972 return GetKeyNameTextA (lParam, (LPSTR) lpString, nSize);
|
|
973 }
|
|
974
|
|
975 /* Skipping VkKeyScan because split CHAR */
|
|
976
|
|
977 /* Error if VkKeyScanEx used: split CHAR; NT 4.0+ only */
|
|
978
|
|
979 UINT
|
|
980 qxeMapVirtualKey (UINT uCode, UINT uMapType)
|
|
981 {
|
|
982 if (XEUNICODE_P)
|
|
983 return MapVirtualKeyW (uCode, uMapType);
|
|
984 else
|
|
985 return MapVirtualKeyA (uCode, uMapType);
|
|
986 }
|
|
987
|
|
988 /* NOTE: NT 4.0+ only */
|
|
989 UINT
|
|
990 qxeMapVirtualKeyEx (UINT uCode, UINT uMapType, HKL dwhkl)
|
|
991 {
|
|
992 if (XEUNICODE_P)
|
|
993 return MapVirtualKeyExW (uCode, uMapType, dwhkl);
|
|
994 else
|
|
995 return MapVirtualKeyExA (uCode, uMapType, dwhkl);
|
|
996 }
|
|
997
|
|
998 HACCEL
|
|
999 qxeLoadAccelerators (HINSTANCE hInstance, const Extbyte * lpTableName)
|
|
1000 {
|
|
1001 if (XEUNICODE_P)
|
|
1002 return LoadAcceleratorsW (hInstance, (LPCWSTR) lpTableName);
|
|
1003 else
|
|
1004 return LoadAcceleratorsA (hInstance, (LPCSTR) lpTableName);
|
|
1005 }
|
|
1006
|
|
1007 HACCEL
|
|
1008 qxeCreateAcceleratorTable (LPACCEL arg1, int arg2)
|
|
1009 {
|
|
1010 if (XEUNICODE_P)
|
|
1011 return CreateAcceleratorTableW (arg1, arg2);
|
|
1012 else
|
|
1013 return CreateAcceleratorTableA (arg1, arg2);
|
|
1014 }
|
|
1015
|
|
1016 int
|
|
1017 qxeCopyAcceleratorTable (HACCEL hAccelSrc, LPACCEL lpAccelDst, int cAccelEntries)
|
|
1018 {
|
|
1019 if (XEUNICODE_P)
|
|
1020 return CopyAcceleratorTableW (hAccelSrc, lpAccelDst, cAccelEntries);
|
|
1021 else
|
|
1022 return CopyAcceleratorTableA (hAccelSrc, lpAccelDst, cAccelEntries);
|
|
1023 }
|
|
1024
|
|
1025 int
|
|
1026 qxeTranslateAccelerator (HWND hWnd, HACCEL hAccTable, LPMSG lpMsg)
|
|
1027 {
|
|
1028 if (XEUNICODE_P)
|
|
1029 return TranslateAcceleratorW (hWnd, hAccTable, lpMsg);
|
|
1030 else
|
|
1031 return TranslateAcceleratorA (hWnd, hAccTable, lpMsg);
|
|
1032 }
|
|
1033
|
|
1034 HMENU
|
|
1035 qxeLoadMenu (HINSTANCE hInstance, const Extbyte * lpMenuName)
|
|
1036 {
|
|
1037 if (XEUNICODE_P)
|
|
1038 return LoadMenuW (hInstance, (LPCWSTR) lpMenuName);
|
|
1039 else
|
|
1040 return LoadMenuA (hInstance, (LPCSTR) lpMenuName);
|
|
1041 }
|
|
1042
|
|
1043 HMENU
|
|
1044 qxeLoadMenuIndirect (CONST MENUTEMPLATEW * lpMenuTemplate)
|
|
1045 {
|
|
1046 if (XEUNICODE_P)
|
|
1047 return LoadMenuIndirectW (lpMenuTemplate);
|
|
1048 else
|
|
1049 return LoadMenuIndirectA ((CONST MENUTEMPLATEA *) lpMenuTemplate);
|
|
1050 }
|
|
1051
|
|
1052 BOOL
|
|
1053 qxeChangeMenu (HMENU hMenu, UINT cmd, const Extbyte * lpszNewItem, UINT cmdInsert, UINT flags)
|
|
1054 {
|
|
1055 if (XEUNICODE_P)
|
|
1056 return ChangeMenuW (hMenu, cmd, (LPCWSTR) lpszNewItem, cmdInsert, flags);
|
|
1057 else
|
|
1058 return ChangeMenuA (hMenu, cmd, (LPCSTR) lpszNewItem, cmdInsert, flags);
|
|
1059 }
|
|
1060
|
|
1061 int
|
|
1062 qxeGetMenuString (HMENU hMenu, UINT uIDItem, Extbyte * lpString, int nMaxCount, UINT uFlag)
|
|
1063 {
|
|
1064 if (XEUNICODE_P)
|
|
1065 return GetMenuStringW (hMenu, uIDItem, (LPWSTR) lpString, nMaxCount, uFlag);
|
|
1066 else
|
|
1067 return GetMenuStringA (hMenu, uIDItem, (LPSTR) lpString, nMaxCount, uFlag);
|
|
1068 }
|
|
1069
|
|
1070 BOOL
|
|
1071 qxeInsertMenu (HMENU hMenu, UINT uPosition, UINT uFlags, UINT uIDNewItem, const Extbyte * lpNewItem)
|
|
1072 {
|
|
1073 if (XEUNICODE_P)
|
|
1074 return InsertMenuW (hMenu, uPosition, uFlags, uIDNewItem, (LPCWSTR) lpNewItem);
|
|
1075 else
|
|
1076 return InsertMenuA (hMenu, uPosition, uFlags, uIDNewItem, (LPCSTR) lpNewItem);
|
|
1077 }
|
|
1078
|
|
1079 BOOL
|
|
1080 qxeAppendMenu (HMENU hMenu, UINT uFlags, UINT uIDNewItem, const Extbyte * lpNewItem)
|
|
1081 {
|
|
1082 if (XEUNICODE_P)
|
|
1083 return AppendMenuW (hMenu, uFlags, uIDNewItem, (LPCWSTR) lpNewItem);
|
|
1084 else
|
|
1085 return AppendMenuA (hMenu, uFlags, uIDNewItem, (LPCSTR) lpNewItem);
|
|
1086 }
|
|
1087
|
|
1088 BOOL
|
|
1089 qxeModifyMenu (HMENU hMnu, UINT uPosition, UINT uFlags, UINT uIDNewItem, const Extbyte * lpNewItem)
|
|
1090 {
|
|
1091 if (XEUNICODE_P)
|
|
1092 return ModifyMenuW (hMnu, uPosition, uFlags, uIDNewItem, (LPCWSTR) lpNewItem);
|
|
1093 else
|
|
1094 return ModifyMenuA (hMnu, uPosition, uFlags, uIDNewItem, (LPCSTR) lpNewItem);
|
|
1095 }
|
|
1096
|
|
1097 /* NOTE: NT 4.0+ only */
|
|
1098 BOOL
|
|
1099 qxeInsertMenuItem (HMENU arg1, UINT arg2, BOOL arg3, LPCMENUITEMINFOW arg4)
|
|
1100 {
|
|
1101 if (XEUNICODE_P)
|
|
1102 return InsertMenuItemW (arg1, arg2, arg3, arg4);
|
|
1103 else
|
|
1104 return InsertMenuItemA (arg1, arg2, arg3, (LPCMENUITEMINFOA) arg4);
|
|
1105 }
|
|
1106
|
|
1107 /* NOTE: NT 4.0+ only */
|
|
1108 BOOL
|
|
1109 qxeGetMenuItemInfo (HMENU arg1, UINT arg2, BOOL arg3, LPMENUITEMINFOW arg4)
|
|
1110 {
|
|
1111 if (XEUNICODE_P)
|
|
1112 return GetMenuItemInfoW (arg1, arg2, arg3, arg4);
|
|
1113 else
|
|
1114 return GetMenuItemInfoA (arg1, arg2, arg3, (LPMENUITEMINFOA) arg4);
|
|
1115 }
|
|
1116
|
|
1117 /* NOTE: NT 4.0+ only */
|
|
1118 BOOL
|
|
1119 qxeSetMenuItemInfo (HMENU arg1, UINT arg2, BOOL arg3, LPCMENUITEMINFOW arg4)
|
|
1120 {
|
|
1121 if (XEUNICODE_P)
|
|
1122 return SetMenuItemInfoW (arg1, arg2, arg3, arg4);
|
|
1123 else
|
|
1124 return SetMenuItemInfoA (arg1, arg2, arg3, (LPCMENUITEMINFOA) arg4);
|
|
1125 }
|
|
1126
|
|
1127 int
|
|
1128 qxeDrawText (HDC hDC, const Extbyte * lpString, int nCount, LPRECT lpRect, UINT uFormat)
|
|
1129 {
|
|
1130 if (XEUNICODE_P)
|
|
1131 return DrawTextW (hDC, (LPCWSTR) lpString, nCount, lpRect, uFormat);
|
|
1132 else
|
|
1133 return DrawTextA (hDC, (LPCSTR) lpString, nCount, lpRect, uFormat);
|
|
1134 }
|
|
1135
|
|
1136 /* NOTE: NT 4.0+ only */
|
|
1137 int
|
|
1138 qxeDrawTextEx (HDC arg1, Extbyte * arg2, int arg3, LPRECT arg4, UINT arg5, LPDRAWTEXTPARAMS arg6)
|
|
1139 {
|
|
1140 if (XEUNICODE_P)
|
|
1141 return DrawTextExW (arg1, (LPWSTR) arg2, arg3, arg4, arg5, arg6);
|
|
1142 else
|
|
1143 return DrawTextExA (arg1, (LPSTR) arg2, arg3, arg4, arg5, arg6);
|
|
1144 }
|
|
1145
|
|
1146 BOOL
|
|
1147 qxeGrayString (HDC hDC, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc, LPARAM lpData, int nCount, int X, int Y, int nWidth, int nHeight)
|
|
1148 {
|
|
1149 if (XEUNICODE_P)
|
|
1150 return GrayStringW (hDC, hBrush, lpOutputFunc, lpData, nCount, X, Y, nWidth, nHeight);
|
|
1151 else
|
|
1152 return GrayStringA (hDC, hBrush, lpOutputFunc, lpData, nCount, X, Y, nWidth, nHeight);
|
|
1153 }
|
|
1154
|
|
1155 /* NOTE: NT 4.0+ only */
|
|
1156 BOOL
|
|
1157 qxeDrawState (HDC arg1, HBRUSH arg2, DRAWSTATEPROC arg3, LPARAM arg4, WPARAM arg5, int arg6, int arg7, int arg8, int arg9, UINT arg10)
|
|
1158 {
|
|
1159 if (XEUNICODE_P)
|
|
1160 return DrawStateW (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
|
|
1161 else
|
|
1162 return DrawStateA (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
|
|
1163 }
|
|
1164
|
|
1165 LONG
|
|
1166 qxeTabbedTextOut (HDC hDC, int X, int Y, const Extbyte * lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions, int nTabOrigin)
|
|
1167 {
|
|
1168 if (XEUNICODE_P)
|
|
1169 return TabbedTextOutW (hDC, X, Y, (LPCWSTR) lpString, nCount, nTabPositions, lpnTabStopPositions, nTabOrigin);
|
|
1170 else
|
|
1171 return TabbedTextOutA (hDC, X, Y, (LPCSTR) lpString, nCount, nTabPositions, lpnTabStopPositions, nTabOrigin);
|
|
1172 }
|
|
1173
|
|
1174 DWORD
|
|
1175 qxeGetTabbedTextExtent (HDC hDC, const Extbyte * lpString, int nCount, int nTabPositions, LPINT lpnTabStopPositions)
|
|
1176 {
|
|
1177 if (XEUNICODE_P)
|
|
1178 return GetTabbedTextExtentW (hDC, (LPCWSTR) lpString, nCount, nTabPositions, lpnTabStopPositions);
|
|
1179 else
|
|
1180 return GetTabbedTextExtentA (hDC, (LPCSTR) lpString, nCount, nTabPositions, lpnTabStopPositions);
|
|
1181 }
|
|
1182
|
|
1183 BOOL
|
|
1184 qxeSetProp (HWND hWnd, const Extbyte * lpString, HANDLE hData)
|
|
1185 {
|
|
1186 if (XEUNICODE_P)
|
|
1187 return SetPropW (hWnd, (LPCWSTR) lpString, hData);
|
|
1188 else
|
|
1189 return SetPropA (hWnd, (LPCSTR) lpString, hData);
|
|
1190 }
|
|
1191
|
|
1192 HANDLE
|
|
1193 qxeGetProp (HWND hWnd, const Extbyte * lpString)
|
|
1194 {
|
|
1195 if (XEUNICODE_P)
|
|
1196 return GetPropW (hWnd, (LPCWSTR) lpString);
|
|
1197 else
|
|
1198 return GetPropA (hWnd, (LPCSTR) lpString);
|
|
1199 }
|
|
1200
|
|
1201 HANDLE
|
|
1202 qxeRemoveProp (HWND hWnd, const Extbyte * lpString)
|
|
1203 {
|
|
1204 if (XEUNICODE_P)
|
|
1205 return RemovePropW (hWnd, (LPCWSTR) lpString);
|
|
1206 else
|
|
1207 return RemovePropA (hWnd, (LPCSTR) lpString);
|
|
1208 }
|
|
1209
|
|
1210 /* NOTE: // callback fun differs only in string pointer type */
|
|
1211 int
|
|
1212 qxeEnumPropsEx (HWND hWnd, PROPENUMPROCEXW lpEnumFunc, LPARAM lParam)
|
|
1213 {
|
|
1214 if (XEUNICODE_P)
|
|
1215 return EnumPropsExW (hWnd, lpEnumFunc, lParam);
|
|
1216 else
|
|
1217 return EnumPropsExA (hWnd, (PROPENUMPROCEXA) lpEnumFunc, lParam);
|
|
1218 }
|
|
1219
|
|
1220 /* NOTE: // callback fun differs only in string pointer type */
|
|
1221 int
|
|
1222 qxeEnumProps (HWND hWnd, PROPENUMPROCW lpEnumFunc)
|
|
1223 {
|
|
1224 if (XEUNICODE_P)
|
|
1225 return EnumPropsW (hWnd, lpEnumFunc);
|
|
1226 else
|
|
1227 return EnumPropsA (hWnd, (PROPENUMPROCA) lpEnumFunc);
|
|
1228 }
|
|
1229
|
|
1230 BOOL
|
|
1231 qxeSetWindowText (HWND hWnd, const Extbyte * lpString)
|
|
1232 {
|
|
1233 if (XEUNICODE_P)
|
|
1234 return SetWindowTextW (hWnd, (LPCWSTR) lpString);
|
|
1235 else
|
|
1236 return SetWindowTextA (hWnd, (LPCSTR) lpString);
|
|
1237 }
|
|
1238
|
|
1239 int
|
|
1240 qxeGetWindowText (HWND hWnd, Extbyte * lpString, int nMaxCount)
|
|
1241 {
|
|
1242 if (XEUNICODE_P)
|
|
1243 return GetWindowTextW (hWnd, (LPWSTR) lpString, nMaxCount);
|
|
1244 else
|
|
1245 return GetWindowTextA (hWnd, (LPSTR) lpString, nMaxCount);
|
|
1246 }
|
|
1247
|
|
1248 int
|
|
1249 qxeGetWindowTextLength (HWND hWnd)
|
|
1250 {
|
|
1251 if (XEUNICODE_P)
|
|
1252 return GetWindowTextLengthW (hWnd);
|
|
1253 else
|
|
1254 return GetWindowTextLengthA (hWnd);
|
|
1255 }
|
|
1256
|
|
1257 int
|
|
1258 qxeMessageBox (HWND hWnd, const Extbyte * lpText, const Extbyte * lpCaption, UINT uType)
|
|
1259 {
|
|
1260 if (XEUNICODE_P)
|
|
1261 return MessageBoxW (hWnd, (LPCWSTR) lpText, (LPCWSTR) lpCaption, uType);
|
|
1262 else
|
|
1263 return MessageBoxA (hWnd, (LPCSTR) lpText, (LPCSTR) lpCaption, uType);
|
|
1264 }
|
|
1265
|
|
1266 int
|
|
1267 qxeMessageBoxEx (HWND hWnd, const Extbyte * lpText, const Extbyte * lpCaption, UINT uType, WORD wLanguageId)
|
|
1268 {
|
|
1269 if (XEUNICODE_P)
|
|
1270 return MessageBoxExW (hWnd, (LPCWSTR) lpText, (LPCWSTR) lpCaption, uType, wLanguageId);
|
|
1271 else
|
|
1272 return MessageBoxExA (hWnd, (LPCSTR) lpText, (LPCSTR) lpCaption, uType, wLanguageId);
|
|
1273 }
|
|
1274
|
|
1275 /* NOTE: NT 4.0+ only */
|
|
1276 int
|
|
1277 qxeMessageBoxIndirect (LPMSGBOXPARAMSW arg1)
|
|
1278 {
|
|
1279 if (XEUNICODE_P)
|
|
1280 return MessageBoxIndirectW (arg1);
|
|
1281 else
|
|
1282 return MessageBoxIndirectA ((LPMSGBOXPARAMSA) arg1);
|
|
1283 }
|
|
1284
|
|
1285 LONG
|
|
1286 qxeGetWindowLong (HWND hWnd, int nIndex)
|
|
1287 {
|
|
1288 if (XEUNICODE_P)
|
|
1289 return GetWindowLongW (hWnd, nIndex);
|
|
1290 else
|
|
1291 return GetWindowLongA (hWnd, nIndex);
|
|
1292 }
|
|
1293
|
|
1294 LONG
|
|
1295 qxeSetWindowLong (HWND hWnd, int nIndex, LONG dwNewLong)
|
|
1296 {
|
|
1297 if (XEUNICODE_P)
|
|
1298 return SetWindowLongW (hWnd, nIndex, dwNewLong);
|
|
1299 else
|
|
1300 return SetWindowLongA (hWnd, nIndex, dwNewLong);
|
|
1301 }
|
|
1302
|
|
1303 DWORD
|
|
1304 qxeGetClassLong (HWND hWnd, int nIndex)
|
|
1305 {
|
|
1306 if (XEUNICODE_P)
|
|
1307 return GetClassLongW (hWnd, nIndex);
|
|
1308 else
|
|
1309 return GetClassLongA (hWnd, nIndex);
|
|
1310 }
|
|
1311
|
|
1312 DWORD
|
|
1313 qxeSetClassLong (HWND hWnd, int nIndex, LONG dwNewLong)
|
|
1314 {
|
|
1315 if (XEUNICODE_P)
|
|
1316 return SetClassLongW (hWnd, nIndex, dwNewLong);
|
|
1317 else
|
|
1318 return SetClassLongA (hWnd, nIndex, dwNewLong);
|
|
1319 }
|
|
1320
|
|
1321 HWND
|
|
1322 qxeFindWindow (const Extbyte * lpClassName, const Extbyte * lpWindowName)
|
|
1323 {
|
|
1324 if (XEUNICODE_P)
|
|
1325 return FindWindowW ((LPCWSTR) lpClassName, (LPCWSTR) lpWindowName);
|
|
1326 else
|
|
1327 return FindWindowA ((LPCSTR) lpClassName, (LPCSTR) lpWindowName);
|
|
1328 }
|
|
1329
|
|
1330 /* NOTE: NT 4.0+ only */
|
|
1331 HWND
|
|
1332 qxeFindWindowEx (HWND arg1, HWND arg2, const Extbyte * arg3, const Extbyte * arg4)
|
|
1333 {
|
|
1334 if (XEUNICODE_P)
|
|
1335 return FindWindowExW (arg1, arg2, (LPCWSTR) arg3, (LPCWSTR) arg4);
|
|
1336 else
|
|
1337 return FindWindowExA (arg1, arg2, (LPCSTR) arg3, (LPCSTR) arg4);
|
|
1338 }
|
|
1339
|
|
1340 int
|
|
1341 qxeGetClassName (HWND hWnd, Extbyte * lpClassName, int nMaxCount)
|
|
1342 {
|
|
1343 if (XEUNICODE_P)
|
|
1344 return GetClassNameW (hWnd, (LPWSTR) lpClassName, nMaxCount);
|
|
1345 else
|
|
1346 return GetClassNameA (hWnd, (LPSTR) lpClassName, nMaxCount);
|
|
1347 }
|
|
1348
|
|
1349 /* Error if SetWindowsHook used: obsolete; two versions, STRICT and non-STRICT */
|
|
1350
|
|
1351 /* Error if SetWindowsHook used: obsolete; two versions, STRICT and non-STRICT */
|
|
1352
|
|
1353 HHOOK
|
|
1354 qxeSetWindowsHookEx (int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId)
|
|
1355 {
|
|
1356 if (XEUNICODE_P)
|
|
1357 return SetWindowsHookExW (idHook, lpfn, hmod, dwThreadId);
|
|
1358 else
|
|
1359 return SetWindowsHookExA (idHook, lpfn, hmod, dwThreadId);
|
|
1360 }
|
|
1361
|
|
1362 HBITMAP
|
|
1363 qxeLoadBitmap (HINSTANCE hInstance, const Extbyte * lpBitmapName)
|
|
1364 {
|
|
1365 if (XEUNICODE_P)
|
|
1366 return LoadBitmapW (hInstance, (LPCWSTR) lpBitmapName);
|
|
1367 else
|
|
1368 return LoadBitmapA (hInstance, (LPCSTR) lpBitmapName);
|
|
1369 }
|
|
1370
|
|
1371 HCURSOR
|
|
1372 qxeLoadCursor (HINSTANCE hInstance, const Extbyte * lpCursorName)
|
|
1373 {
|
|
1374 if (XEUNICODE_P)
|
|
1375 return LoadCursorW (hInstance, (LPCWSTR) lpCursorName);
|
|
1376 else
|
|
1377 return LoadCursorA (hInstance, (LPCSTR) lpCursorName);
|
|
1378 }
|
|
1379
|
|
1380 HCURSOR
|
|
1381 qxeLoadCursorFromFile (const Extbyte * lpFileName)
|
|
1382 {
|
|
1383 if (XEUNICODE_P)
|
|
1384 return LoadCursorFromFileW ((LPCWSTR) lpFileName);
|
|
1385 else
|
|
1386 return LoadCursorFromFileA ((LPCSTR) lpFileName);
|
|
1387 }
|
|
1388
|
|
1389 HICON
|
|
1390 qxeLoadIcon (HINSTANCE hInstance, const Extbyte * lpIconName)
|
|
1391 {
|
|
1392 if (XEUNICODE_P)
|
|
1393 return LoadIconW (hInstance, (LPCWSTR) lpIconName);
|
|
1394 else
|
|
1395 return LoadIconA (hInstance, (LPCSTR) lpIconName);
|
|
1396 }
|
|
1397
|
|
1398 /* NOTE: NT 4.0+ only */
|
|
1399 HANDLE
|
|
1400 qxeLoadImage (HINSTANCE arg1, const Extbyte * arg2, UINT arg3, int arg4, int arg5, UINT arg6)
|
|
1401 {
|
|
1402 if (XEUNICODE_P)
|
|
1403 return LoadImageW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6);
|
|
1404 else
|
|
1405 return LoadImageA (arg1, (LPCSTR) arg2, arg3, arg4, arg5, arg6);
|
|
1406 }
|
|
1407
|
|
1408 int
|
|
1409 qxeLoadString (HINSTANCE hInstance, UINT uID, Extbyte * lpBuffer, int nBufferMax)
|
|
1410 {
|
|
1411 if (XEUNICODE_P)
|
|
1412 return LoadStringW (hInstance, uID, (LPWSTR) lpBuffer, nBufferMax);
|
|
1413 else
|
|
1414 return LoadStringA (hInstance, uID, (LPSTR) lpBuffer, nBufferMax);
|
|
1415 }
|
|
1416
|
|
1417 BOOL
|
|
1418 qxeIsDialogMessage (HWND hDlg, LPMSG lpMsg)
|
|
1419 {
|
|
1420 if (XEUNICODE_P)
|
|
1421 return IsDialogMessageW (hDlg, lpMsg);
|
|
1422 else
|
|
1423 return IsDialogMessageA (hDlg, lpMsg);
|
|
1424 }
|
|
1425
|
|
1426 int
|
|
1427 qxeDlgDirList (HWND hDlg, Extbyte * lpPathSpec, int nIDListBox, int nIDStaticPath, UINT uFileType)
|
|
1428 {
|
|
1429 if (XEUNICODE_P)
|
|
1430 return DlgDirListW (hDlg, (LPWSTR) lpPathSpec, nIDListBox, nIDStaticPath, uFileType);
|
|
1431 else
|
|
1432 return DlgDirListA (hDlg, (LPSTR) lpPathSpec, nIDListBox, nIDStaticPath, uFileType);
|
|
1433 }
|
|
1434
|
|
1435 BOOL
|
|
1436 qxeDlgDirSelectEx (HWND hDlg, Extbyte * lpString, int nCount, int nIDListBox)
|
|
1437 {
|
|
1438 if (XEUNICODE_P)
|
|
1439 return DlgDirSelectExW (hDlg, (LPWSTR) lpString, nCount, nIDListBox);
|
|
1440 else
|
|
1441 return DlgDirSelectExA (hDlg, (LPSTR) lpString, nCount, nIDListBox);
|
|
1442 }
|
|
1443
|
|
1444 int
|
|
1445 qxeDlgDirListComboBox (HWND hDlg, Extbyte * lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT uFiletype)
|
|
1446 {
|
|
1447 if (XEUNICODE_P)
|
|
1448 return DlgDirListComboBoxW (hDlg, (LPWSTR) lpPathSpec, nIDComboBox, nIDStaticPath, uFiletype);
|
|
1449 else
|
|
1450 return DlgDirListComboBoxA (hDlg, (LPSTR) lpPathSpec, nIDComboBox, nIDStaticPath, uFiletype);
|
|
1451 }
|
|
1452
|
|
1453 BOOL
|
|
1454 qxeDlgDirSelectComboBoxEx (HWND hDlg, Extbyte * lpString, int nCount, int nIDComboBox)
|
|
1455 {
|
|
1456 if (XEUNICODE_P)
|
|
1457 return DlgDirSelectComboBoxExW (hDlg, (LPWSTR) lpString, nCount, nIDComboBox);
|
|
1458 else
|
|
1459 return DlgDirSelectComboBoxExA (hDlg, (LPSTR) lpString, nCount, nIDComboBox);
|
|
1460 }
|
|
1461
|
|
1462 LRESULT
|
|
1463 qxeDefFrameProc (HWND hWnd, HWND hWndMDIClient, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|
1464 {
|
|
1465 if (XEUNICODE_P)
|
|
1466 return DefFrameProcW (hWnd, hWndMDIClient, uMsg, wParam, lParam);
|
|
1467 else
|
|
1468 return DefFrameProcA (hWnd, hWndMDIClient, uMsg, wParam, lParam);
|
|
1469 }
|
|
1470
|
|
1471 /* Error if DefMDIChildProc used: return value is conditionalized on _MAC, messes up parser */
|
|
1472
|
|
1473 HWND
|
|
1474 qxeCreateMDIWindow (Extbyte * lpClassName, Extbyte * lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HINSTANCE hInstance, LPARAM lParam)
|
|
1475 {
|
|
1476 if (XEUNICODE_P)
|
|
1477 return CreateMDIWindowW ((LPWSTR) lpClassName, (LPWSTR) lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hInstance, lParam);
|
|
1478 else
|
|
1479 return CreateMDIWindowA ((LPSTR) lpClassName, (LPSTR) lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hInstance, lParam);
|
|
1480 }
|
|
1481
|
|
1482 BOOL
|
|
1483 qxeWinHelp (HWND hWndMain, const Extbyte * lpszHelp, UINT uCommand, DWORD dwData)
|
|
1484 {
|
|
1485 if (XEUNICODE_P)
|
|
1486 return WinHelpW (hWndMain, (LPCWSTR) lpszHelp, uCommand, dwData);
|
|
1487 else
|
|
1488 return WinHelpA (hWndMain, (LPCSTR) lpszHelp, uCommand, dwData);
|
|
1489 }
|
|
1490
|
|
1491 /* Error if ChangeDisplaySettings used: split-sized LPDEVMODE */
|
|
1492
|
|
1493 /* Error if ChangeDisplaySettingsEx used: split-sized LPDEVMODE; NT 5.0/Win98+ only */
|
|
1494
|
|
1495 /* Error if EnumDisplaySettings used: split-sized LPDEVMODE */
|
|
1496
|
|
1497 /* Error if EnumDisplayDevices used: split-sized PDISPLAY_DEVICE; NT 5.0+ only, no Win98 */
|
|
1498
|
|
1499 /* NOTE: probs w/ICONMETRICS, NONCLIENTMETRICS */
|
|
1500 BOOL
|
|
1501 qxeSystemParametersInfo (UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
|
|
1502 {
|
|
1503 if (XEUNICODE_P)
|
|
1504 return SystemParametersInfoW (uiAction, uiParam, pvParam, fWinIni);
|
|
1505 else
|
|
1506 return SystemParametersInfoA (uiAction, uiParam, pvParam, fWinIni);
|
|
1507 }
|
|
1508
|
|
1509 /* Error if GetMonitorInfo used: NT 5.0/Win98+ only */
|
|
1510
|
|
1511 /* Error if GetWindowModuleFileName used: NT 5.0+ only */
|
|
1512
|
|
1513 /* Error if RealGetWindowClass used: NT 5.0+ only */
|
|
1514
|
|
1515 /* Error if GetAltTabInfo used: NT 5.0+ only */
|
|
1516
|
|
1517
|
|
1518 /*----------------------------------------------------------------------*/
|
3728
|
1519 /* Processing file IME.H */
|
|
1520 /*----------------------------------------------------------------------*/
|
|
1521
|
|
1522 /* Error if SendIMEMessageEx used: obsolete, no docs available */
|
|
1523
|
|
1524
|
|
1525 /*----------------------------------------------------------------------*/
|
|
1526 /* Processing file IMM.H */
|
|
1527 /*----------------------------------------------------------------------*/
|
|
1528
|
|
1529 #if defined (HAVE_MS_WINDOWS)
|
|
1530
|
|
1531 HKL
|
|
1532 qxeImmInstallIME (const Extbyte * lpszIMEFileName, const Extbyte * lpszLayoutText)
|
|
1533 {
|
|
1534 if (XEUNICODE_P)
|
|
1535 return ImmInstallIMEW ((LPCWSTR) lpszIMEFileName, (LPCWSTR) lpszLayoutText);
|
|
1536 else
|
|
1537 return ImmInstallIMEA ((LPCSTR) lpszIMEFileName, (LPCSTR) lpszLayoutText);
|
|
1538 }
|
|
1539
|
|
1540 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1541
|
|
1542 #if defined (HAVE_MS_WINDOWS)
|
|
1543
|
|
1544 UINT
|
|
1545 qxeImmGetDescription (HKL arg1, Extbyte * arg2, UINT uBufLen)
|
|
1546 {
|
|
1547 if (XEUNICODE_P)
|
|
1548 return ImmGetDescriptionW (arg1, (LPWSTR) arg2, uBufLen);
|
|
1549 else
|
|
1550 return ImmGetDescriptionA (arg1, (LPSTR) arg2, uBufLen);
|
|
1551 }
|
|
1552
|
|
1553 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1554
|
|
1555 #if defined (HAVE_MS_WINDOWS)
|
|
1556
|
|
1557 UINT
|
|
1558 qxeImmGetIMEFileName (HKL arg1, Extbyte * arg2, UINT uBufLen)
|
|
1559 {
|
|
1560 if (XEUNICODE_P)
|
|
1561 return ImmGetIMEFileNameW (arg1, (LPWSTR) arg2, uBufLen);
|
|
1562 else
|
|
1563 return ImmGetIMEFileNameA (arg1, (LPSTR) arg2, uBufLen);
|
|
1564 }
|
|
1565
|
|
1566 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1567
|
|
1568 #if defined (HAVE_MS_WINDOWS)
|
|
1569
|
|
1570 LONG
|
|
1571 qxeImmGetCompositionString (HIMC arg1, DWORD arg2, LPVOID arg3, DWORD arg4)
|
|
1572 {
|
|
1573 if (XEUNICODE_P)
|
|
1574 return ImmGetCompositionStringW (arg1, arg2, arg3, arg4);
|
|
1575 else
|
|
1576 return ImmGetCompositionStringA (arg1, arg2, arg3, arg4);
|
|
1577 }
|
|
1578
|
|
1579 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1580
|
|
1581 #if defined (HAVE_MS_WINDOWS)
|
|
1582
|
|
1583 /* Skipping ImmSetCompositionString because different prototypes in VC6 and VC7 */
|
|
1584
|
|
1585 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1586
|
|
1587 #if defined (HAVE_MS_WINDOWS)
|
|
1588
|
|
1589 DWORD
|
|
1590 qxeImmGetCandidateListCount (HIMC arg1, LPDWORD lpdwListCount)
|
|
1591 {
|
|
1592 if (XEUNICODE_P)
|
|
1593 return ImmGetCandidateListCountW (arg1, lpdwListCount);
|
|
1594 else
|
|
1595 return ImmGetCandidateListCountA (arg1, lpdwListCount);
|
|
1596 }
|
|
1597
|
|
1598 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1599
|
|
1600 #if defined (HAVE_MS_WINDOWS)
|
|
1601
|
|
1602 DWORD
|
|
1603 qxeImmGetCandidateList (HIMC arg1, DWORD deIndex, LPCANDIDATELIST arg3, DWORD dwBufLen)
|
|
1604 {
|
|
1605 if (XEUNICODE_P)
|
|
1606 return ImmGetCandidateListW (arg1, deIndex, arg3, dwBufLen);
|
|
1607 else
|
|
1608 return ImmGetCandidateListA (arg1, deIndex, arg3, dwBufLen);
|
|
1609 }
|
|
1610
|
|
1611 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1612
|
|
1613 #if defined (HAVE_MS_WINDOWS)
|
|
1614
|
|
1615 DWORD
|
|
1616 qxeImmGetGuideLine (HIMC arg1, DWORD dwIndex, Extbyte * arg3, DWORD dwBufLen)
|
|
1617 {
|
|
1618 if (XEUNICODE_P)
|
|
1619 return ImmGetGuideLineW (arg1, dwIndex, (LPWSTR) arg3, dwBufLen);
|
|
1620 else
|
|
1621 return ImmGetGuideLineA (arg1, dwIndex, (LPSTR) arg3, dwBufLen);
|
|
1622 }
|
|
1623
|
|
1624 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1625
|
|
1626 #if defined (HAVE_MS_WINDOWS)
|
|
1627
|
|
1628 /* Skipping ImmGetCompositionFont because split-sized LOGFONT */
|
|
1629
|
|
1630 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1631
|
|
1632 #if defined (HAVE_MS_WINDOWS)
|
|
1633
|
|
1634 /* Skipping ImmSetCompositionFont because split-sized LOGFONT */
|
|
1635
|
|
1636 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1637
|
|
1638 #if defined (HAVE_MS_WINDOWS)
|
|
1639
|
|
1640 /* NOTE: // split-simple REGISTERWORD */
|
|
1641 BOOL
|
|
1642 qxeImmConfigureIME (HKL arg1, HWND arg2, DWORD arg3, LPVOID arg4)
|
|
1643 {
|
|
1644 if (XEUNICODE_P)
|
|
1645 return ImmConfigureIMEW (arg1, arg2, arg3, arg4);
|
|
1646 else
|
|
1647 return ImmConfigureIMEA (arg1, arg2, arg3, arg4);
|
|
1648 }
|
|
1649
|
|
1650 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1651
|
|
1652 #if defined (HAVE_MS_WINDOWS)
|
|
1653
|
|
1654 /* NOTE: // strings of various sorts */
|
|
1655 LRESULT
|
|
1656 qxeImmEscape (HKL arg1, HIMC arg2, UINT arg3, LPVOID arg4)
|
|
1657 {
|
|
1658 if (XEUNICODE_P)
|
|
1659 return ImmEscapeW (arg1, arg2, arg3, arg4);
|
|
1660 else
|
|
1661 return ImmEscapeA (arg1, arg2, arg3, arg4);
|
|
1662 }
|
|
1663
|
|
1664 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1665
|
|
1666 #if defined (HAVE_MS_WINDOWS)
|
|
1667
|
|
1668 DWORD
|
|
1669 qxeImmGetConversionList (HKL arg1, HIMC arg2, const Extbyte * arg3, LPCANDIDATELIST arg4, DWORD dwBufLen, UINT uFlag)
|
|
1670 {
|
|
1671 if (XEUNICODE_P)
|
|
1672 return ImmGetConversionListW (arg1, arg2, (LPCWSTR) arg3, arg4, dwBufLen, uFlag);
|
|
1673 else
|
|
1674 return ImmGetConversionListA (arg1, arg2, (LPCSTR) arg3, arg4, dwBufLen, uFlag);
|
|
1675 }
|
|
1676
|
|
1677 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1678
|
|
1679 #if defined (HAVE_MS_WINDOWS)
|
|
1680
|
|
1681 BOOL
|
|
1682 qxeImmIsUIMessage (HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
|
|
1683 {
|
|
1684 if (XEUNICODE_P)
|
|
1685 return ImmIsUIMessageW (arg1, arg2, arg3, arg4);
|
|
1686 else
|
|
1687 return ImmIsUIMessageA (arg1, arg2, arg3, arg4);
|
|
1688 }
|
|
1689
|
|
1690 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1691
|
|
1692 #if defined (HAVE_MS_WINDOWS)
|
|
1693
|
|
1694 BOOL
|
|
1695 qxeImmRegisterWord (HKL arg1, const Extbyte * lpszReading, DWORD arg3, const Extbyte * lpszRegister)
|
|
1696 {
|
|
1697 if (XEUNICODE_P)
|
|
1698 return ImmRegisterWordW (arg1, (LPCWSTR) lpszReading, arg3, (LPCWSTR) lpszRegister);
|
|
1699 else
|
|
1700 return ImmRegisterWordA (arg1, (LPCSTR) lpszReading, arg3, (LPCSTR) lpszRegister);
|
|
1701 }
|
|
1702
|
|
1703 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1704
|
|
1705 #if defined (HAVE_MS_WINDOWS)
|
|
1706
|
|
1707 BOOL
|
|
1708 qxeImmUnregisterWord (HKL arg1, const Extbyte * lpszReading, DWORD arg3, const Extbyte * lpszUnregister)
|
|
1709 {
|
|
1710 if (XEUNICODE_P)
|
|
1711 return ImmUnregisterWordW (arg1, (LPCWSTR) lpszReading, arg3, (LPCWSTR) lpszUnregister);
|
|
1712 else
|
|
1713 return ImmUnregisterWordA (arg1, (LPCSTR) lpszReading, arg3, (LPCSTR) lpszUnregister);
|
|
1714 }
|
|
1715
|
|
1716 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1717
|
|
1718 #if defined (HAVE_MS_WINDOWS)
|
|
1719
|
|
1720 /* Error if ImmGetRegisterWordStyle used: split-sized STYLEBUF */
|
|
1721
|
|
1722 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1723
|
|
1724 #if defined (HAVE_MS_WINDOWS)
|
|
1725
|
|
1726 UINT
|
|
1727 qxeImmEnumRegisterWord (HKL arg1, REGISTERWORDENUMPROCW arg2, const Extbyte * lpszReading, DWORD arg4, const Extbyte * lpszRegister, LPVOID arg6)
|
|
1728 {
|
|
1729 if (XEUNICODE_P)
|
|
1730 return ImmEnumRegisterWordW (arg1, arg2, (LPCWSTR) lpszReading, arg4, (LPCWSTR) lpszRegister, arg6);
|
|
1731 else
|
|
1732 return ImmEnumRegisterWordA (arg1, (REGISTERWORDENUMPROCA) arg2, (LPCSTR) lpszReading, arg4, (LPCSTR) lpszRegister, arg6);
|
|
1733 }
|
|
1734
|
|
1735 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1736
|
|
1737 #if defined (HAVE_MS_WINDOWS)
|
|
1738
|
|
1739 /* Error if ImmGetImeMenuItems used: split-sized IMEMENUITEMINFO */
|
|
1740
|
|
1741 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
1742
|
|
1743
|
|
1744 /*----------------------------------------------------------------------*/
|
|
1745 /* Processing file MMSYSTEM.H */
|
|
1746 /*----------------------------------------------------------------------*/
|
|
1747
|
|
1748 BOOL
|
|
1749 qxesndPlaySound (const Extbyte * pszSound, UINT fuSound)
|
|
1750 {
|
|
1751 if (XEUNICODE_P)
|
|
1752 return sndPlaySoundW ((LPCWSTR) pszSound, fuSound);
|
|
1753 else
|
|
1754 return sndPlaySoundA ((LPCSTR) pszSound, fuSound);
|
|
1755 }
|
|
1756
|
|
1757 BOOL
|
|
1758 qxePlaySound (const Extbyte * pszSound, HMODULE hmod, DWORD fdwSound)
|
|
1759 {
|
|
1760 if (XEUNICODE_P)
|
|
1761 return PlaySoundW ((LPCWSTR) pszSound, hmod, fdwSound);
|
|
1762 else
|
|
1763 return PlaySoundA ((LPCSTR) pszSound, hmod, fdwSound);
|
|
1764 }
|
|
1765
|
|
1766 /* Error if waveOutGetDevCaps used: split-sized LPWAVEOUTCAPS */
|
|
1767
|
|
1768 MMRESULT
|
|
1769 qxewaveOutGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText)
|
|
1770 {
|
|
1771 if (XEUNICODE_P)
|
|
1772 return waveOutGetErrorTextW (mmrError, (LPWSTR) pszText, cchText);
|
|
1773 else
|
|
1774 return waveOutGetErrorTextA (mmrError, (LPSTR) pszText, cchText);
|
|
1775 }
|
|
1776
|
|
1777 /* Error if waveInGetDevCaps used: split-sized LPWAVEINCAPS */
|
|
1778
|
|
1779 MMRESULT
|
|
1780 qxewaveInGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText)
|
|
1781 {
|
|
1782 if (XEUNICODE_P)
|
|
1783 return waveInGetErrorTextW (mmrError, (LPWSTR) pszText, cchText);
|
|
1784 else
|
|
1785 return waveInGetErrorTextA (mmrError, (LPSTR) pszText, cchText);
|
|
1786 }
|
|
1787
|
|
1788 /* Error if midiOutGetDevCaps used: split-sized LPMIDIOUTCAPS */
|
|
1789
|
|
1790 MMRESULT
|
|
1791 qxemidiOutGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText)
|
|
1792 {
|
|
1793 if (XEUNICODE_P)
|
|
1794 return midiOutGetErrorTextW (mmrError, (LPWSTR) pszText, cchText);
|
|
1795 else
|
|
1796 return midiOutGetErrorTextA (mmrError, (LPSTR) pszText, cchText);
|
|
1797 }
|
|
1798
|
|
1799 /* Error if midiInGetDevCaps used: split-sized LPMIDIOUTCAPS */
|
|
1800
|
|
1801 MMRESULT
|
|
1802 qxemidiInGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText)
|
|
1803 {
|
|
1804 if (XEUNICODE_P)
|
|
1805 return midiInGetErrorTextW (mmrError, (LPWSTR) pszText, cchText);
|
|
1806 else
|
|
1807 return midiInGetErrorTextA (mmrError, (LPSTR) pszText, cchText);
|
|
1808 }
|
|
1809
|
|
1810 /* Error if auxGetDevCaps used: split-sized LPAUXCAPS */
|
|
1811
|
|
1812 /* Error if mixerGetDevCaps used: split-sized LPMIXERCAPS */
|
|
1813
|
|
1814 /* Error if mixerGetLineInfo used: split-sized LPMIXERLINE */
|
|
1815
|
|
1816 /* Error if mixerGetLineControls used: split-sized LPMIXERCONTROL */
|
|
1817
|
|
1818 /* Error if mixerGetControlDetails used: split-sized LPMIXERCONTROL in LPMIXERLINECONTROLS in LPMIXERCONTROLDETAILS */
|
|
1819
|
|
1820 /* Error if joyGetDevCaps used: split-sized LPJOYCAPS */
|
|
1821
|
|
1822 FOURCC
|
|
1823 qxemmioStringToFOURCC (const Extbyte * sz, UINT uFlags)
|
|
1824 {
|
|
1825 if (XEUNICODE_P)
|
|
1826 return mmioStringToFOURCCW ((LPCWSTR) sz, uFlags);
|
|
1827 else
|
|
1828 return mmioStringToFOURCCA ((LPCSTR) sz, uFlags);
|
|
1829 }
|
|
1830
|
|
1831 LPMMIOPROC
|
|
1832 qxemmioInstallIOProc (FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
|
|
1833 {
|
|
1834 if (XEUNICODE_P)
|
|
1835 return mmioInstallIOProcW (fccIOProc, pIOProc, dwFlags);
|
|
1836 else
|
|
1837 return mmioInstallIOProcA (fccIOProc, pIOProc, dwFlags);
|
|
1838 }
|
|
1839
|
|
1840 HMMIO
|
|
1841 qxemmioOpen (Extbyte * pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen)
|
|
1842 {
|
|
1843 if (XEUNICODE_P)
|
|
1844 return mmioOpenW ((LPWSTR) pszFileName, pmmioinfo, fdwOpen);
|
|
1845 else
|
|
1846 return mmioOpenA ((LPSTR) pszFileName, pmmioinfo, fdwOpen);
|
|
1847 }
|
|
1848
|
|
1849 MMRESULT
|
|
1850 qxemmioRename (const Extbyte * pszFileName, const Extbyte * pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename)
|
|
1851 {
|
|
1852 if (XEUNICODE_P)
|
|
1853 return mmioRenameW ((LPCWSTR) pszFileName, (LPCWSTR) pszNewFileName, pmmioinfo, fdwRename);
|
|
1854 else
|
|
1855 return mmioRenameA ((LPCSTR) pszFileName, (LPCSTR) pszNewFileName, pmmioinfo, fdwRename);
|
|
1856 }
|
|
1857
|
|
1858 MCIERROR
|
|
1859 qxemciSendCommand (MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2)
|
|
1860 {
|
|
1861 if (XEUNICODE_P)
|
|
1862 return mciSendCommandW (mciId, uMsg, dwParam1, dwParam2);
|
|
1863 else
|
|
1864 return mciSendCommandA (mciId, uMsg, dwParam1, dwParam2);
|
|
1865 }
|
|
1866
|
|
1867 MCIERROR
|
|
1868 qxemciSendString (const Extbyte * lpstrCommand, Extbyte * lpstrReturnString, UINT uReturnLength, HWND hwndCallback)
|
|
1869 {
|
|
1870 if (XEUNICODE_P)
|
|
1871 return mciSendStringW ((LPCWSTR) lpstrCommand, (LPWSTR) lpstrReturnString, uReturnLength, hwndCallback);
|
|
1872 else
|
|
1873 return mciSendStringA ((LPCSTR) lpstrCommand, (LPSTR) lpstrReturnString, uReturnLength, hwndCallback);
|
|
1874 }
|
|
1875
|
|
1876 MCIDEVICEID
|
|
1877 qxemciGetDeviceID (const Extbyte * pszDevice)
|
|
1878 {
|
|
1879 if (XEUNICODE_P)
|
|
1880 return mciGetDeviceIDW ((LPCWSTR) pszDevice);
|
|
1881 else
|
|
1882 return mciGetDeviceIDA ((LPCSTR) pszDevice);
|
|
1883 }
|
|
1884
|
|
1885 #if !defined (MINGW)
|
|
1886
|
|
1887 /* Error if mciGetDeviceIDFromElementID used: missing from Win98se version of ADVAPI32.dll */
|
|
1888
|
|
1889 #endif /* !defined (MINGW) */
|
|
1890
|
|
1891 BOOL
|
|
1892 qxemciGetErrorString (MCIERROR mcierr, Extbyte * pszText, UINT cchText)
|
|
1893 {
|
|
1894 if (XEUNICODE_P)
|
|
1895 return mciGetErrorStringW (mcierr, (LPWSTR) pszText, cchText);
|
|
1896 else
|
|
1897 return mciGetErrorStringA (mcierr, (LPSTR) pszText, cchText);
|
|
1898 }
|
|
1899
|
|
1900
|
|
1901 /*----------------------------------------------------------------------*/
|
|
1902 /* Processing file WINCON.H */
|
|
1903 /*----------------------------------------------------------------------*/
|
|
1904
|
|
1905 BOOL
|
|
1906 qxePeekConsoleInput (HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsRead)
|
|
1907 {
|
|
1908 if (XEUNICODE_P)
|
|
1909 return PeekConsoleInputW (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead);
|
|
1910 else
|
|
1911 return PeekConsoleInputA (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead);
|
|
1912 }
|
|
1913
|
|
1914 BOOL
|
|
1915 qxeReadConsoleInput (HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsRead)
|
|
1916 {
|
|
1917 if (XEUNICODE_P)
|
|
1918 return ReadConsoleInputW (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead);
|
|
1919 else
|
|
1920 return ReadConsoleInputA (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead);
|
|
1921 }
|
|
1922
|
|
1923 BOOL
|
|
1924 qxeWriteConsoleInput (HANDLE hConsoleInput, CONST INPUT_RECORD * lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsWritten)
|
|
1925 {
|
|
1926 if (XEUNICODE_P)
|
|
1927 return WriteConsoleInputW (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsWritten);
|
|
1928 else
|
|
1929 return WriteConsoleInputA (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsWritten);
|
|
1930 }
|
|
1931
|
|
1932 BOOL
|
|
1933 qxeReadConsoleOutput (HANDLE hConsoleOutput, PCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, PSMALL_RECT lpReadRegion)
|
|
1934 {
|
|
1935 if (XEUNICODE_P)
|
|
1936 return ReadConsoleOutputW (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpReadRegion);
|
|
1937 else
|
|
1938 return ReadConsoleOutputA (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpReadRegion);
|
|
1939 }
|
|
1940
|
|
1941 BOOL
|
|
1942 qxeWriteConsoleOutput (HANDLE hConsoleOutput, CONST CHAR_INFO * lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, PSMALL_RECT lpWriteRegion)
|
|
1943 {
|
|
1944 if (XEUNICODE_P)
|
|
1945 return WriteConsoleOutputW (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpWriteRegion);
|
|
1946 else
|
|
1947 return WriteConsoleOutputA (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpWriteRegion);
|
|
1948 }
|
|
1949
|
|
1950 BOOL
|
|
1951 qxeReadConsoleOutputCharacter (HANDLE hConsoleOutput, Extbyte * lpCharacter, DWORD nLength, COORD dwReadCoord, LPDWORD lpNumberOfCharsRead)
|
|
1952 {
|
|
1953 if (XEUNICODE_P)
|
|
1954 return ReadConsoleOutputCharacterW (hConsoleOutput, (LPWSTR) lpCharacter, nLength, dwReadCoord, lpNumberOfCharsRead);
|
|
1955 else
|
|
1956 return ReadConsoleOutputCharacterA (hConsoleOutput, (LPSTR) lpCharacter, nLength, dwReadCoord, lpNumberOfCharsRead);
|
|
1957 }
|
|
1958
|
|
1959 BOOL
|
|
1960 qxeWriteConsoleOutputCharacter (HANDLE hConsoleOutput, const Extbyte * lpCharacter, DWORD nLength, COORD dwWriteCoord, LPDWORD lpNumberOfCharsWritten)
|
|
1961 {
|
|
1962 if (XEUNICODE_P)
|
|
1963 return WriteConsoleOutputCharacterW (hConsoleOutput, (LPCWSTR) lpCharacter, nLength, dwWriteCoord, lpNumberOfCharsWritten);
|
|
1964 else
|
|
1965 return WriteConsoleOutputCharacterA (hConsoleOutput, (LPCSTR) lpCharacter, nLength, dwWriteCoord, lpNumberOfCharsWritten);
|
|
1966 }
|
|
1967
|
|
1968 /* Error if FillConsoleOutputCharacter used: split CHAR */
|
|
1969
|
|
1970 BOOL
|
|
1971 qxeScrollConsoleScreenBuffer (HANDLE hConsoleOutput, CONST SMALL_RECT * lpScrollRectangle, CONST SMALL_RECT * lpClipRectangle, COORD dwDestinationOrigin, CONST CHAR_INFO * lpFill)
|
|
1972 {
|
|
1973 if (XEUNICODE_P)
|
|
1974 return ScrollConsoleScreenBufferW (hConsoleOutput, lpScrollRectangle, lpClipRectangle, dwDestinationOrigin, lpFill);
|
|
1975 else
|
|
1976 return ScrollConsoleScreenBufferA (hConsoleOutput, lpScrollRectangle, lpClipRectangle, dwDestinationOrigin, lpFill);
|
|
1977 }
|
|
1978
|
|
1979 DWORD
|
|
1980 qxeGetConsoleTitle (Extbyte * lpConsoleTitle, DWORD nSize)
|
|
1981 {
|
|
1982 if (XEUNICODE_P)
|
|
1983 return GetConsoleTitleW ((LPWSTR) lpConsoleTitle, nSize);
|
|
1984 else
|
|
1985 return GetConsoleTitleA ((LPSTR) lpConsoleTitle, nSize);
|
|
1986 }
|
|
1987
|
|
1988 BOOL
|
|
1989 qxeSetConsoleTitle (const Extbyte * lpConsoleTitle)
|
|
1990 {
|
|
1991 if (XEUNICODE_P)
|
|
1992 return SetConsoleTitleW ((LPCWSTR) lpConsoleTitle);
|
|
1993 else
|
|
1994 return SetConsoleTitleA ((LPCSTR) lpConsoleTitle);
|
|
1995 }
|
|
1996
|
|
1997 BOOL
|
|
1998 qxeReadConsole (HANDLE hConsoleInput, LPVOID lpBuffer, DWORD nNumberOfCharsToRead, LPDWORD lpNumberOfCharsRead, LPVOID lpReserved)
|
|
1999 {
|
|
2000 if (XEUNICODE_P)
|
|
2001 return ReadConsoleW (hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, lpReserved);
|
|
2002 else
|
|
2003 return ReadConsoleA (hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, lpReserved);
|
|
2004 }
|
|
2005
|
|
2006 BOOL
|
|
2007 qxeWriteConsole (HANDLE hConsoleOutput, CONST VOID * lpBuffer, DWORD nNumberOfCharsToWrite, LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved)
|
|
2008 {
|
|
2009 if (XEUNICODE_P)
|
|
2010 return WriteConsoleW (hConsoleOutput, lpBuffer, nNumberOfCharsToWrite, lpNumberOfCharsWritten, lpReserved);
|
|
2011 else
|
|
2012 return WriteConsoleA (hConsoleOutput, lpBuffer, nNumberOfCharsToWrite, lpNumberOfCharsWritten, lpReserved);
|
|
2013 }
|
|
2014
|
|
2015
|
|
2016 /*----------------------------------------------------------------------*/
|
|
2017 /* Processing file WINNETWK.H */
|
|
2018 /*----------------------------------------------------------------------*/
|
|
2019
|
|
2020 #if defined (HAVE_MS_WINDOWS)
|
|
2021
|
|
2022 DWORD
|
|
2023 qxeWNetAddConnection (const Extbyte * lpRemoteName, const Extbyte * lpPassword, const Extbyte * lpLocalName)
|
|
2024 {
|
|
2025 if (XEUNICODE_P)
|
|
2026 return WNetAddConnectionW ((LPCWSTR) lpRemoteName, (LPCWSTR) lpPassword, (LPCWSTR) lpLocalName);
|
|
2027 else
|
|
2028 return WNetAddConnectionA ((LPCSTR) lpRemoteName, (LPCSTR) lpPassword, (LPCSTR) lpLocalName);
|
|
2029 }
|
|
2030
|
|
2031 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2032
|
|
2033 #if defined (HAVE_MS_WINDOWS)
|
|
2034
|
|
2035 DWORD
|
|
2036 qxeWNetAddConnection2 (LPNETRESOURCEW lpNetResource, const Extbyte * lpPassword, const Extbyte * lpUserName, DWORD dwFlags)
|
|
2037 {
|
|
2038 if (XEUNICODE_P)
|
|
2039 return WNetAddConnection2W (lpNetResource, (LPCWSTR) lpPassword, (LPCWSTR) lpUserName, dwFlags);
|
|
2040 else
|
|
2041 return WNetAddConnection2A ((LPNETRESOURCEA) lpNetResource, (LPCSTR) lpPassword, (LPCSTR) lpUserName, dwFlags);
|
|
2042 }
|
|
2043
|
|
2044 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2045
|
|
2046 #if defined (HAVE_MS_WINDOWS)
|
|
2047
|
|
2048 DWORD
|
|
2049 qxeWNetAddConnection3 (HWND hwndOwner, LPNETRESOURCEW lpNetResource, const Extbyte * lpPassword, const Extbyte * lpUserName, DWORD dwFlags)
|
|
2050 {
|
|
2051 if (XEUNICODE_P)
|
|
2052 return WNetAddConnection3W (hwndOwner, lpNetResource, (LPCWSTR) lpPassword, (LPCWSTR) lpUserName, dwFlags);
|
|
2053 else
|
|
2054 return WNetAddConnection3A (hwndOwner, (LPNETRESOURCEA) lpNetResource, (LPCSTR) lpPassword, (LPCSTR) lpUserName, dwFlags);
|
|
2055 }
|
|
2056
|
|
2057 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2058
|
|
2059 #if defined (HAVE_MS_WINDOWS)
|
|
2060
|
|
2061 DWORD
|
|
2062 qxeWNetCancelConnection (const Extbyte * lpName, BOOL fForce)
|
|
2063 {
|
|
2064 if (XEUNICODE_P)
|
|
2065 return WNetCancelConnectionW ((LPCWSTR) lpName, fForce);
|
|
2066 else
|
|
2067 return WNetCancelConnectionA ((LPCSTR) lpName, fForce);
|
|
2068 }
|
|
2069
|
|
2070 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2071
|
|
2072 #if defined (HAVE_MS_WINDOWS)
|
|
2073
|
|
2074 DWORD
|
|
2075 qxeWNetCancelConnection2 (const Extbyte * lpName, DWORD dwFlags, BOOL fForce)
|
|
2076 {
|
|
2077 if (XEUNICODE_P)
|
|
2078 return WNetCancelConnection2W ((LPCWSTR) lpName, dwFlags, fForce);
|
|
2079 else
|
|
2080 return WNetCancelConnection2A ((LPCSTR) lpName, dwFlags, fForce);
|
|
2081 }
|
|
2082
|
|
2083 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2084
|
|
2085 #if defined (HAVE_MS_WINDOWS)
|
|
2086
|
|
2087 DWORD
|
|
2088 qxeWNetGetConnection (const Extbyte * lpLocalName, Extbyte * lpRemoteName, LPDWORD lpnLength)
|
|
2089 {
|
|
2090 if (XEUNICODE_P)
|
|
2091 return WNetGetConnectionW ((LPCWSTR) lpLocalName, (LPWSTR) lpRemoteName, lpnLength);
|
|
2092 else
|
|
2093 return WNetGetConnectionA ((LPCSTR) lpLocalName, (LPSTR) lpRemoteName, lpnLength);
|
|
2094 }
|
|
2095
|
|
2096 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2097
|
|
2098 #if defined (HAVE_MS_WINDOWS)
|
|
2099
|
|
2100 DWORD
|
|
2101 qxeWNetUseConnection (HWND hwndOwner, LPNETRESOURCEW lpNetResource, const Extbyte * lpUserID, const Extbyte * lpPassword, DWORD dwFlags, Extbyte * lpAccessName, LPDWORD lpBufferSize, LPDWORD lpResult)
|
|
2102 {
|
|
2103 if (XEUNICODE_P)
|
|
2104 return WNetUseConnectionW (hwndOwner, lpNetResource, (LPCWSTR) lpUserID, (LPCWSTR) lpPassword, dwFlags, (LPWSTR) lpAccessName, lpBufferSize, lpResult);
|
|
2105 else
|
|
2106 return WNetUseConnectionA (hwndOwner, (LPNETRESOURCEA) lpNetResource, (LPCSTR) lpUserID, (LPCSTR) lpPassword, dwFlags, (LPSTR) lpAccessName, lpBufferSize, lpResult);
|
|
2107 }
|
|
2108
|
|
2109 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2110
|
|
2111 #if defined (HAVE_MS_WINDOWS)
|
|
2112
|
|
2113 /* NOTE: contains split-simple LPNETRESOURCE */
|
|
2114 DWORD
|
|
2115 qxeWNetConnectionDialog1 (LPCONNECTDLGSTRUCTW lpConnDlgStruct)
|
|
2116 {
|
|
2117 if (XEUNICODE_P)
|
|
2118 return WNetConnectionDialog1W (lpConnDlgStruct);
|
|
2119 else
|
|
2120 return WNetConnectionDialog1A ((LPCONNECTDLGSTRUCTA) lpConnDlgStruct);
|
|
2121 }
|
|
2122
|
|
2123 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2124
|
|
2125 #if defined (HAVE_MS_WINDOWS)
|
|
2126
|
|
2127 DWORD
|
|
2128 qxeWNetDisconnectDialog1 (LPDISCDLGSTRUCTW lpConnDlgStruct)
|
|
2129 {
|
|
2130 if (XEUNICODE_P)
|
|
2131 return WNetDisconnectDialog1W (lpConnDlgStruct);
|
|
2132 else
|
|
2133 return WNetDisconnectDialog1A ((LPDISCDLGSTRUCTA) lpConnDlgStruct);
|
|
2134 }
|
|
2135
|
|
2136 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2137
|
|
2138 #if defined (HAVE_MS_WINDOWS)
|
|
2139
|
|
2140 DWORD
|
|
2141 qxeWNetOpenEnum (DWORD dwScope, DWORD dwType, DWORD dwUsage, LPNETRESOURCEW lpNetResource, LPHANDLE lphEnum)
|
|
2142 {
|
|
2143 if (XEUNICODE_P)
|
|
2144 return WNetOpenEnumW (dwScope, dwType, dwUsage, lpNetResource, lphEnum);
|
|
2145 else
|
|
2146 return WNetOpenEnumA (dwScope, dwType, dwUsage, (LPNETRESOURCEA) lpNetResource, lphEnum);
|
|
2147 }
|
|
2148
|
|
2149 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2150
|
|
2151 #if defined (HAVE_MS_WINDOWS)
|
|
2152
|
|
2153 DWORD
|
|
2154 qxeWNetEnumResource (HANDLE hEnum, LPDWORD lpcCount, LPVOID lpBuffer, LPDWORD lpBufferSize)
|
|
2155 {
|
|
2156 if (XEUNICODE_P)
|
|
2157 return WNetEnumResourceW (hEnum, lpcCount, lpBuffer, lpBufferSize);
|
|
2158 else
|
|
2159 return WNetEnumResourceA (hEnum, lpcCount, lpBuffer, lpBufferSize);
|
|
2160 }
|
|
2161
|
|
2162 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2163
|
|
2164 #if defined (HAVE_MS_WINDOWS)
|
|
2165
|
|
2166 DWORD
|
|
2167 qxeWNetGetUniversalName (const Extbyte * lpLocalPath, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpBufferSize)
|
|
2168 {
|
|
2169 if (XEUNICODE_P)
|
|
2170 return WNetGetUniversalNameW ((LPCWSTR) lpLocalPath, dwInfoLevel, lpBuffer, lpBufferSize);
|
|
2171 else
|
|
2172 return WNetGetUniversalNameA ((LPCSTR) lpLocalPath, dwInfoLevel, lpBuffer, lpBufferSize);
|
|
2173 }
|
|
2174
|
|
2175 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2176
|
|
2177 #if defined (HAVE_MS_WINDOWS)
|
|
2178
|
|
2179 DWORD
|
|
2180 qxeWNetGetUser (const Extbyte * lpName, Extbyte * lpUserName, LPDWORD lpnLength)
|
|
2181 {
|
|
2182 if (XEUNICODE_P)
|
|
2183 return WNetGetUserW ((LPCWSTR) lpName, (LPWSTR) lpUserName, lpnLength);
|
|
2184 else
|
|
2185 return WNetGetUserA ((LPCSTR) lpName, (LPSTR) lpUserName, lpnLength);
|
|
2186 }
|
|
2187
|
|
2188 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2189
|
|
2190 #if defined (HAVE_MS_WINDOWS)
|
|
2191
|
|
2192 DWORD
|
|
2193 qxeWNetGetProviderName (DWORD dwNetType, Extbyte * lpProviderName, LPDWORD lpBufferSize)
|
|
2194 {
|
|
2195 if (XEUNICODE_P)
|
|
2196 return WNetGetProviderNameW (dwNetType, (LPWSTR) lpProviderName, lpBufferSize);
|
|
2197 else
|
|
2198 return WNetGetProviderNameA (dwNetType, (LPSTR) lpProviderName, lpBufferSize);
|
|
2199 }
|
|
2200
|
|
2201 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2202
|
|
2203 #if defined (HAVE_MS_WINDOWS)
|
|
2204
|
|
2205 DWORD
|
|
2206 qxeWNetGetNetworkInformation (const Extbyte * lpProvider, LPNETINFOSTRUCT lpNetInfoStruct)
|
|
2207 {
|
|
2208 if (XEUNICODE_P)
|
|
2209 return WNetGetNetworkInformationW ((LPCWSTR) lpProvider, lpNetInfoStruct);
|
|
2210 else
|
|
2211 return WNetGetNetworkInformationA ((LPCSTR) lpProvider, lpNetInfoStruct);
|
|
2212 }
|
|
2213
|
|
2214 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2215
|
|
2216 #if defined (HAVE_MS_WINDOWS)
|
|
2217
|
|
2218 DWORD
|
|
2219 qxeWNetGetLastError (LPDWORD lpError, Extbyte * lpErrorBuf, DWORD nErrorBufSize, Extbyte * lpNameBuf, DWORD nNameBufSize)
|
|
2220 {
|
|
2221 if (XEUNICODE_P)
|
|
2222 return WNetGetLastErrorW (lpError, (LPWSTR) lpErrorBuf, nErrorBufSize, (LPWSTR) lpNameBuf, nNameBufSize);
|
|
2223 else
|
|
2224 return WNetGetLastErrorA (lpError, (LPSTR) lpErrorBuf, nErrorBufSize, (LPSTR) lpNameBuf, nNameBufSize);
|
|
2225 }
|
|
2226
|
|
2227 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2228
|
|
2229 #if defined (HAVE_MS_WINDOWS)
|
|
2230
|
|
2231 DWORD
|
|
2232 qxeMultinetGetConnectionPerformance (LPNETRESOURCEW lpNetResource, LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct)
|
|
2233 {
|
|
2234 if (XEUNICODE_P)
|
|
2235 return MultinetGetConnectionPerformanceW (lpNetResource, lpNetConnectInfoStruct);
|
|
2236 else
|
|
2237 return MultinetGetConnectionPerformanceA ((LPNETRESOURCEA) lpNetResource, lpNetConnectInfoStruct);
|
|
2238 }
|
|
2239
|
|
2240 #endif /* defined (HAVE_MS_WINDOWS) */
|
|
2241
|
|
2242
|
|
2243 /*----------------------------------------------------------------------*/
|
2367
|
2244 /* Processing file DDEML.H */
|
|
2245 /*----------------------------------------------------------------------*/
|
|
2246
|
|
2247 UINT
|
|
2248 qxeDdeInitialize (LPDWORD pidInst, PFNCALLBACK pfnCallback, DWORD afCmd, DWORD ulRes)
|
|
2249 {
|
|
2250 if (XEUNICODE_P)
|
|
2251 return DdeInitializeW (pidInst, pfnCallback, afCmd, ulRes);
|
|
2252 else
|
|
2253 return DdeInitializeA (pidInst, pfnCallback, afCmd, ulRes);
|
|
2254 }
|
|
2255
|
|
2256 /* Skipping DdeCreateStringHandle because error in Cygwin prototype */
|
|
2257
|
|
2258 DWORD
|
|
2259 qxeDdeQueryString (DWORD idInst, HSZ hsz, Extbyte * psz, DWORD cchMax, int iCodePage)
|
|
2260 {
|
|
2261 if (XEUNICODE_P)
|
|
2262 return DdeQueryStringW (idInst, hsz, (LPWSTR) psz, cchMax, iCodePage);
|
|
2263 else
|
|
2264 return DdeQueryStringA (idInst, hsz, (LPSTR) psz, cchMax, iCodePage);
|
|
2265 }
|
|
2266
|
|
2267
|
|
2268 /*----------------------------------------------------------------------*/
|
|
2269 /* Processing file WINGDI.H */
|
|
2270 /*----------------------------------------------------------------------*/
|
|
2271
|
|
2272 int
|
|
2273 qxeAddFontResource (const Extbyte * arg1)
|
|
2274 {
|
|
2275 if (XEUNICODE_P)
|
|
2276 return AddFontResourceW ((LPCWSTR) arg1);
|
|
2277 else
|
|
2278 return AddFontResourceA ((LPCSTR) arg1);
|
|
2279 }
|
|
2280
|
|
2281 HMETAFILE
|
|
2282 qxeCopyMetaFile (HMETAFILE arg1, const Extbyte * arg2)
|
|
2283 {
|
|
2284 if (XEUNICODE_P)
|
|
2285 return CopyMetaFileW (arg1, (LPCWSTR) arg2);
|
|
2286 else
|
|
2287 return CopyMetaFileA (arg1, (LPCSTR) arg2);
|
|
2288 }
|
|
2289
|
|
2290 /* Skipping CreateDC because split-sized DEVMODE */
|
|
2291
|
|
2292 /* Skipping CreateFontIndirect because split-sized LOGFONT */
|
|
2293
|
|
2294 HFONT
|
|
2295 qxeCreateFont (int arg1, int arg2, int arg3, int arg4, int arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12, DWORD arg13, const Extbyte * arg14)
|
|
2296 {
|
|
2297 if (XEUNICODE_P)
|
|
2298 return CreateFontW (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, (LPCWSTR) arg14);
|
|
2299 else
|
|
2300 return CreateFontA (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, (LPCSTR) arg14);
|
|
2301 }
|
|
2302
|
|
2303 /* Skipping CreateIC because split-sized DEVMODE */
|
|
2304
|
|
2305 HDC
|
|
2306 qxeCreateMetaFile (const Extbyte * arg1)
|
|
2307 {
|
|
2308 if (XEUNICODE_P)
|
|
2309 return CreateMetaFileW ((LPCWSTR) arg1);
|
|
2310 else
|
|
2311 return CreateMetaFileA ((LPCSTR) arg1);
|
|
2312 }
|
|
2313
|
|
2314 BOOL
|
|
2315 qxeCreateScalableFontResource (DWORD arg1, const Extbyte * arg2, const Extbyte * arg3, const Extbyte * arg4)
|
|
2316 {
|
|
2317 if (XEUNICODE_P)
|
|
2318 return CreateScalableFontResourceW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, (LPCWSTR) arg4);
|
|
2319 else
|
|
2320 return CreateScalableFontResourceA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, (LPCSTR) arg4);
|
|
2321 }
|
|
2322
|
|
2323 /* Skipping DeviceCapabilities because split-sized DEVMODE */
|
|
2324
|
|
2325 /* Skipping EnumFontFamiliesEx because split-complex FONTENUMPROC; NT 4.0+ only */
|
|
2326
|
|
2327 /* Error if EnumFontFamilies used: split-complex FONTENUMPROC */
|
|
2328
|
|
2329 /* Error if EnumFonts used: split-complex FONTENUMPROC */
|
|
2330
|
|
2331 BOOL
|
|
2332 qxeGetCharWidth (HDC arg1, UINT arg2, UINT arg3, LPINT arg4)
|
|
2333 {
|
|
2334 if (XEUNICODE_P)
|
|
2335 return GetCharWidthW (arg1, arg2, arg3, arg4);
|
|
2336 else
|
|
2337 return GetCharWidthA (arg1, arg2, arg3, arg4);
|
771
|
2338 }
|
|
2339
|
|
2340 BOOL
|
2367
|
2341 qxeGetCharWidth32 (HDC arg1, UINT arg2, UINT arg3, LPINT arg4)
|
|
2342 {
|
|
2343 if (XEUNICODE_P)
|
|
2344 return GetCharWidth32W (arg1, arg2, arg3, arg4);
|
|
2345 else
|
|
2346 return GetCharWidth32A (arg1, arg2, arg3, arg4);
|
|
2347 }
|
|
2348
|
|
2349 BOOL
|
|
2350 qxeGetCharWidthFloat (HDC arg1, UINT arg2, UINT arg3, PFLOAT arg4)
|
|
2351 {
|
|
2352 if (XEUNICODE_P)
|
|
2353 return GetCharWidthFloatW (arg1, arg2, arg3, arg4);
|
|
2354 else
|
|
2355 return GetCharWidthFloatA (arg1, arg2, arg3, arg4);
|
|
2356 }
|
|
2357
|
|
2358 BOOL
|
|
2359 qxeGetCharABCWidths (HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
|
|
2360 {
|
|
2361 if (XEUNICODE_P)
|
|
2362 return GetCharABCWidthsW (arg1, arg2, arg3, arg4);
|
|
2363 else
|
|
2364 return GetCharABCWidthsA (arg1, arg2, arg3, arg4);
|
|
2365 }
|
|
2366
|
|
2367 BOOL
|
|
2368 qxeGetCharABCWidthsFloat (HDC arg1, UINT arg2, UINT arg3, LPABCFLOAT arg4)
|
|
2369 {
|
|
2370 if (XEUNICODE_P)
|
|
2371 return GetCharABCWidthsFloatW (arg1, arg2, arg3, arg4);
|
|
2372 else
|
|
2373 return GetCharABCWidthsFloatA (arg1, arg2, arg3, arg4);
|
|
2374 }
|
|
2375
|
|
2376 DWORD
|
|
2377 qxeGetGlyphOutline (HDC arg1, UINT arg2, UINT arg3, LPGLYPHMETRICS arg4, DWORD arg5, LPVOID arg6, CONST MAT2 * arg7)
|
|
2378 {
|
|
2379 if (XEUNICODE_P)
|
|
2380 return GetGlyphOutlineW (arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|
2381 else
|
|
2382 return GetGlyphOutlineA (arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|
2383 }
|
|
2384
|
|
2385 HMETAFILE
|
|
2386 qxeGetMetaFile (const Extbyte * arg1)
|
|
2387 {
|
|
2388 if (XEUNICODE_P)
|
|
2389 return GetMetaFileW ((LPCWSTR) arg1);
|
|
2390 else
|
|
2391 return GetMetaFileA ((LPCSTR) arg1);
|
|
2392 }
|
|
2393
|
|
2394 /* Error if GetOutlineTextMetrics used: split-sized LPOUTLINETEXTMETRIC */
|
|
2395
|
|
2396 BOOL
|
|
2397 qxeGetTextExtentPoint (HDC arg1, const Extbyte * arg2, int arg3, LPSIZE arg4)
|
|
2398 {
|
|
2399 if (XEUNICODE_P)
|
|
2400 return GetTextExtentPointW (arg1, (LPCWSTR) arg2, arg3, arg4);
|
|
2401 else
|
|
2402 return GetTextExtentPointA (arg1, (LPCSTR) arg2, arg3, arg4);
|
|
2403 }
|
|
2404
|
|
2405 BOOL
|
|
2406 qxeGetTextExtentPoint32 (HDC arg1, const Extbyte * arg2, int arg3, LPSIZE arg4)
|
|
2407 {
|
|
2408 if (XEUNICODE_P)
|
|
2409 return GetTextExtentPoint32W (arg1, (LPCWSTR) arg2, arg3, arg4);
|
|
2410 else
|
|
2411 return GetTextExtentPoint32A (arg1, (LPCSTR) arg2, arg3, arg4);
|
|
2412 }
|
|
2413
|
|
2414 BOOL
|
|
2415 qxeGetTextExtentExPoint (HDC arg1, const Extbyte * arg2, int arg3, int arg4, LPINT arg5, LPINT arg6, LPSIZE arg7)
|
|
2416 {
|
|
2417 if (XEUNICODE_P)
|
|
2418 return GetTextExtentExPointW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6, arg7);
|
|
2419 else
|
|
2420 return GetTextExtentExPointA (arg1, (LPCSTR) arg2, arg3, arg4, arg5, arg6, arg7);
|
|
2421 }
|
|
2422
|
|
2423 /* NOTE: NT 4.0+ only */
|
|
2424 DWORD
|
|
2425 qxeGetCharacterPlacement (HDC arg1, const Extbyte * arg2, int arg3, int arg4, LPGCP_RESULTSW arg5, DWORD arg6)
|
|
2426 {
|
|
2427 if (XEUNICODE_P)
|
|
2428 return GetCharacterPlacementW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6);
|
|
2429 else
|
|
2430 return GetCharacterPlacementA (arg1, (LPCSTR) arg2, arg3, arg4, (LPGCP_RESULTSA) arg5, arg6);
|
|
2431 }
|
|
2432
|
|
2433 /* Error if GetGlyphIndices used: NT 5.0+ only */
|
|
2434
|
|
2435 /* Error if AddFontResourceEx used: NT 5.0+ only */
|
|
2436
|
|
2437 /* Error if RemoveFontResourceEx used: NT 5.0+ only */
|
|
2438
|
|
2439 /* Error if CreateFontIndirectEx used: split-sized ENUMLOGFONTEXDV; NT 5.0+ only */
|
|
2440
|
|
2441 /* Skipping ResetDC because split-sized DEVMODE */
|
|
2442
|
|
2443 BOOL
|
|
2444 qxeRemoveFontResource (const Extbyte * arg1)
|
|
2445 {
|
|
2446 if (XEUNICODE_P)
|
|
2447 return RemoveFontResourceW ((LPCWSTR) arg1);
|
|
2448 else
|
|
2449 return RemoveFontResourceA ((LPCSTR) arg1);
|
|
2450 }
|
|
2451
|
|
2452 HENHMETAFILE
|
|
2453 qxeCopyEnhMetaFile (HENHMETAFILE arg1, const Extbyte * arg2)
|
|
2454 {
|
|
2455 if (XEUNICODE_P)
|
|
2456 return CopyEnhMetaFileW (arg1, (LPCWSTR) arg2);
|
|
2457 else
|
|
2458 return CopyEnhMetaFileA (arg1, (LPCSTR) arg2);
|
|
2459 }
|
|
2460
|
|
2461 HDC
|
|
2462 qxeCreateEnhMetaFile (HDC arg1, const Extbyte * arg2, CONST RECT * arg3, const Extbyte * arg4)
|
|
2463 {
|
|
2464 if (XEUNICODE_P)
|
|
2465 return CreateEnhMetaFileW (arg1, (LPCWSTR) arg2, arg3, (LPCWSTR) arg4);
|
|
2466 else
|
|
2467 return CreateEnhMetaFileA (arg1, (LPCSTR) arg2, arg3, (LPCSTR) arg4);
|
|
2468 }
|
|
2469
|
|
2470 HENHMETAFILE
|
|
2471 qxeGetEnhMetaFile (const Extbyte * arg1)
|
|
2472 {
|
|
2473 if (XEUNICODE_P)
|
|
2474 return GetEnhMetaFileW ((LPCWSTR) arg1);
|
|
2475 else
|
|
2476 return GetEnhMetaFileA ((LPCSTR) arg1);
|
|
2477 }
|
|
2478
|
|
2479 UINT
|
|
2480 qxeGetEnhMetaFileDescription (HENHMETAFILE arg1, UINT arg2, Extbyte * arg3)
|
|
2481 {
|
|
2482 if (XEUNICODE_P)
|
|
2483 return GetEnhMetaFileDescriptionW (arg1, arg2, (LPWSTR) arg3);
|
|
2484 else
|
|
2485 return GetEnhMetaFileDescriptionA (arg1, arg2, (LPSTR) arg3);
|
|
2486 }
|
|
2487
|
|
2488 /* Skipping GetTextMetrics because split-sized LPTEXTMETRIC */
|
|
2489
|
|
2490 int
|
|
2491 qxeStartDoc (HDC arg1, CONST DOCINFOW * arg2)
|
|
2492 {
|
|
2493 if (XEUNICODE_P)
|
|
2494 return StartDocW (arg1, arg2);
|
|
2495 else
|
|
2496 return StartDocA (arg1, (CONST DOCINFOA *) arg2);
|
|
2497 }
|
|
2498
|
|
2499 /* Skipping GetObject because split-sized LOGFONT */
|
|
2500
|
|
2501 BOOL
|
|
2502 qxeTextOut (HDC arg1, int arg2, int arg3, const Extbyte * arg4, int arg5)
|
|
2503 {
|
|
2504 if (XEUNICODE_P)
|
|
2505 return TextOutW (arg1, arg2, arg3, (LPCWSTR) arg4, arg5);
|
|
2506 else
|
|
2507 return TextOutA (arg1, arg2, arg3, (LPCSTR) arg4, arg5);
|
|
2508 }
|
|
2509
|
|
2510 BOOL
|
|
2511 qxeExtTextOut (HDC arg1, int arg2, int arg3, UINT arg4, CONST RECT * arg5, const Extbyte * arg6, UINT arg7, CONST INT * arg8)
|
|
2512 {
|
|
2513 if (XEUNICODE_P)
|
|
2514 return ExtTextOutW (arg1, arg2, arg3, arg4, arg5, (LPCWSTR) arg6, arg7, arg8);
|
|
2515 else
|
|
2516 return ExtTextOutA (arg1, arg2, arg3, arg4, arg5, (LPCSTR) arg6, arg7, arg8);
|
|
2517 }
|
|
2518
|
|
2519 BOOL
|
|
2520 qxePolyTextOut (HDC arg1, CONST POLYTEXTW * arg2, int arg3)
|
|
2521 {
|
|
2522 if (XEUNICODE_P)
|
|
2523 return PolyTextOutW (arg1, arg2, arg3);
|
|
2524 else
|
|
2525 return PolyTextOutA (arg1, (CONST POLYTEXTA *) arg2, arg3);
|
|
2526 }
|
|
2527
|
|
2528 int
|
|
2529 qxeGetTextFace (HDC arg1, int arg2, Extbyte * arg3)
|
|
2530 {
|
|
2531 if (XEUNICODE_P)
|
|
2532 return GetTextFaceW (arg1, arg2, (LPWSTR) arg3);
|
|
2533 else
|
|
2534 return GetTextFaceA (arg1, arg2, (LPSTR) arg3);
|
|
2535 }
|
|
2536
|
|
2537 DWORD
|
|
2538 qxeGetKerningPairs (HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
|
|
2539 {
|
|
2540 if (XEUNICODE_P)
|
|
2541 return GetKerningPairsW (arg1, arg2, arg3);
|
|
2542 else
|
|
2543 return GetKerningPairsA (arg1, arg2, arg3);
|
|
2544 }
|
|
2545
|
|
2546 /* Error if GetLogColorSpace used: split-sized LPLOGCOLORSPACE; NT 4.0+ only */
|
|
2547
|
|
2548 /* Error if CreateColorSpace used: split-sized LPLOGCOLORSPACE; NT 4.0+ only */
|
|
2549
|
|
2550 /* Skipping GetICMProfile because NT 4.0+ only, error in Cygwin prototype */
|
|
2551
|
|
2552 /* NOTE: NT 4.0+ only */
|
|
2553 BOOL
|
|
2554 qxeSetICMProfile (HDC arg1, Extbyte * arg2)
|
|
2555 {
|
|
2556 if (XEUNICODE_P)
|
|
2557 return SetICMProfileW (arg1, (LPWSTR) arg2);
|
|
2558 else
|
|
2559 return SetICMProfileA (arg1, (LPSTR) arg2);
|
|
2560 }
|
|
2561
|
|
2562 /* NOTE: NT 4.0+ only */
|
|
2563 int
|
|
2564 qxeEnumICMProfiles (HDC arg1, ICMENUMPROCW arg2, LPARAM arg3)
|
|
2565 {
|
|
2566 if (XEUNICODE_P)
|
|
2567 return EnumICMProfilesW (arg1, arg2, arg3);
|
|
2568 else
|
|
2569 return EnumICMProfilesA (arg1, (ICMENUMPROCA) arg2, arg3);
|
|
2570 }
|
|
2571
|
|
2572 /* Skipping UpdateICMRegKey because NT 4.0+ only, error in Cygwin prototype */
|
|
2573
|
|
2574 /* Error if wglUseFontBitmaps used: causes link error */
|
|
2575
|
|
2576 /* Error if wglUseFontOutlines used: causes link error */
|
|
2577
|
|
2578
|
|
2579 /*----------------------------------------------------------------------*/
|
3728
|
2580 /* Processing file WINNLS.H */
|
2367
|
2581 /*----------------------------------------------------------------------*/
|
771
|
2582
|
3728
|
2583 /* Error if GetCPInfoEx used: not used, not examined yet */
|
|
2584
|
|
2585 /* Error if CompareString used: not used, not examined yet */
|
|
2586
|
|
2587 /* Error if LCMapString used: not used, not examined yet */
|
|
2588
|
|
2589 int
|
|
2590 qxeGetLocaleInfo (LCID Locale, LCTYPE LCType, Extbyte * lpLCData, int cchData)
|
|
2591 {
|
|
2592 if (XEUNICODE_P)
|
|
2593 return GetLocaleInfoW (Locale, LCType, (LPWSTR) lpLCData, cchData);
|
|
2594 else
|
|
2595 return GetLocaleInfoA (Locale, LCType, (LPSTR) lpLCData, cchData);
|
|
2596 }
|
|
2597
|
771
|
2598 BOOL
|
3728
|
2599 qxeSetLocaleInfo (LCID Locale, LCTYPE LCType, const Extbyte * lpLCData)
|
|
2600 {
|
|
2601 if (XEUNICODE_P)
|
|
2602 return SetLocaleInfoW (Locale, LCType, (LPCWSTR) lpLCData);
|
|
2603 else
|
|
2604 return SetLocaleInfoA (Locale, LCType, (LPCSTR) lpLCData);
|
|
2605 }
|
|
2606
|
|
2607 /* Error if GetTimeFormat used: not used, not examined yet */
|
|
2608
|
|
2609 /* Error if GetDateFormat used: not used, not examined yet */
|
|
2610
|
|
2611 /* Error if GetNumberFormat used: not used, not examined yet */
|
|
2612
|
|
2613 /* Error if GetCurrencyFormat used: not used, not examined yet */
|
|
2614
|
|
2615 /* Error if EnumCalendarInfo used: not used, not examined yet */
|
|
2616
|
|
2617 /* Error if EnumCalendarInfoEx used: not used, not examined yet */
|
|
2618
|
|
2619 /* Error if EnumTimeFormats used: not used, not examined yet */
|
|
2620
|
|
2621 /* Error if EnumDateFormats used: not used, not examined yet */
|
|
2622
|
|
2623 /* Error if EnumDateFormatsEx used: not used, not examined yet */
|
|
2624
|
|
2625 /* Error if GetStringTypeEx used: not used, not examined yet */
|
|
2626
|
|
2627 /* Error if GetStringType used: no such fun; A and W versions have different nos. of args */
|
|
2628
|
|
2629 /* Error if FoldString used: not used, not examined yet */
|
|
2630
|
|
2631 /* Error if EnumSystemLocales used: not used, not examined yet */
|
|
2632
|
|
2633 /* Error if EnumSystemCodePages used: not used, not examined yet */
|
|
2634
|
|
2635
|
|
2636 /*----------------------------------------------------------------------*/
|
|
2637 /* Processing file WINREG.H */
|
|
2638 /*----------------------------------------------------------------------*/
|
|
2639
|
|
2640 /* Skipping RegConnectRegistry because error in Cygwin prototype */
|
|
2641
|
|
2642 LONG
|
|
2643
|
|
2644 qxeRegCreateKey (HKEY hKey, const Extbyte * lpSubKey, PHKEY phkResult)
|
|
2645 {
|
|
2646 if (XEUNICODE_P)
|
|
2647 return RegCreateKeyW (hKey, (LPCWSTR) lpSubKey, phkResult);
|
|
2648 else
|
|
2649 return RegCreateKeyA (hKey, (LPCSTR) lpSubKey, phkResult);
|
|
2650 }
|
|
2651
|
|
2652 LONG
|
|
2653
|
|
2654 qxeRegCreateKeyEx (HKEY hKey, const Extbyte * lpSubKey, DWORD Reserved, Extbyte * lpClass, DWORD dwOptions, REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition)
|
|
2655 {
|
|
2656 if (XEUNICODE_P)
|
|
2657 return RegCreateKeyExW (hKey, (LPCWSTR) lpSubKey, Reserved, (LPWSTR) lpClass, dwOptions, samDesired, lpSecurityAttributes, phkResult, lpdwDisposition);
|
|
2658 else
|
|
2659 return RegCreateKeyExA (hKey, (LPCSTR) lpSubKey, Reserved, (LPSTR) lpClass, dwOptions, samDesired, lpSecurityAttributes, phkResult, lpdwDisposition);
|
|
2660 }
|
|
2661
|
|
2662 LONG
|
|
2663
|
|
2664 qxeRegDeleteKey (HKEY hKey, const Extbyte * lpSubKey)
|
|
2665 {
|
|
2666 if (XEUNICODE_P)
|
|
2667 return RegDeleteKeyW (hKey, (LPCWSTR) lpSubKey);
|
|
2668 else
|
|
2669 return RegDeleteKeyA (hKey, (LPCSTR) lpSubKey);
|
|
2670 }
|
|
2671
|
|
2672 LONG
|
|
2673
|
|
2674 qxeRegDeleteValue (HKEY hKey, const Extbyte * lpValueName)
|
|
2675 {
|
|
2676 if (XEUNICODE_P)
|
|
2677 return RegDeleteValueW (hKey, (LPCWSTR) lpValueName);
|
|
2678 else
|
|
2679 return RegDeleteValueA (hKey, (LPCSTR) lpValueName);
|
|
2680 }
|
|
2681
|
|
2682 LONG
|
|
2683
|
|
2684 qxeRegEnumKey (HKEY hKey, DWORD dwIndex, Extbyte * lpName, DWORD cbName)
|
|
2685 {
|
|
2686 if (XEUNICODE_P)
|
|
2687 return RegEnumKeyW (hKey, dwIndex, (LPWSTR) lpName, cbName);
|
|
2688 else
|
|
2689 return RegEnumKeyA (hKey, dwIndex, (LPSTR) lpName, cbName);
|
|
2690 }
|
|
2691
|
|
2692 LONG
|
|
2693
|
|
2694 qxeRegEnumKeyEx (HKEY hKey, DWORD dwIndex, Extbyte * lpName, LPDWORD lpcbName, LPDWORD lpReserved, Extbyte * lpClass, LPDWORD lpcbClass, PFILETIME lpftLastWriteTime)
|
|
2695 {
|
|
2696 if (XEUNICODE_P)
|
|
2697 return RegEnumKeyExW (hKey, dwIndex, (LPWSTR) lpName, lpcbName, lpReserved, (LPWSTR) lpClass, lpcbClass, lpftLastWriteTime);
|
|
2698 else
|
|
2699 return RegEnumKeyExA (hKey, dwIndex, (LPSTR) lpName, lpcbName, lpReserved, (LPSTR) lpClass, lpcbClass, lpftLastWriteTime);
|
|
2700 }
|
|
2701
|
|
2702 LONG
|
|
2703
|
|
2704 qxeRegEnumValue (HKEY hKey, DWORD dwIndex, Extbyte * lpValueName, LPDWORD lpcbValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData)
|
|
2705 {
|
|
2706 if (XEUNICODE_P)
|
|
2707 return RegEnumValueW (hKey, dwIndex, (LPWSTR) lpValueName, lpcbValueName, lpReserved, lpType, lpData, lpcbData);
|
|
2708 else
|
|
2709 return RegEnumValueA (hKey, dwIndex, (LPSTR) lpValueName, lpcbValueName, lpReserved, lpType, lpData, lpcbData);
|
|
2710 }
|
|
2711
|
|
2712 LONG
|
|
2713
|
|
2714 qxeRegLoadKey (HKEY hKey, const Extbyte * lpSubKey, const Extbyte * lpFile)
|
|
2715 {
|
|
2716 if (XEUNICODE_P)
|
|
2717 return RegLoadKeyW (hKey, (LPCWSTR) lpSubKey, (LPCWSTR) lpFile);
|
|
2718 else
|
|
2719 return RegLoadKeyA (hKey, (LPCSTR) lpSubKey, (LPCSTR) lpFile);
|
|
2720 }
|
|
2721
|
|
2722 LONG
|
|
2723
|
|
2724 qxeRegOpenKey (HKEY hKey, const Extbyte * lpSubKey, PHKEY phkResult)
|
|
2725 {
|
|
2726 if (XEUNICODE_P)
|
|
2727 return RegOpenKeyW (hKey, (LPCWSTR) lpSubKey, phkResult);
|
|
2728 else
|
|
2729 return RegOpenKeyA (hKey, (LPCSTR) lpSubKey, phkResult);
|
|
2730 }
|
|
2731
|
|
2732 LONG
|
|
2733
|
|
2734 qxeRegOpenKeyEx (HKEY hKey, const Extbyte * lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
|
|
2735 {
|
|
2736 if (XEUNICODE_P)
|
|
2737 return RegOpenKeyExW (hKey, (LPCWSTR) lpSubKey, ulOptions, samDesired, phkResult);
|
|
2738 else
|
|
2739 return RegOpenKeyExA (hKey, (LPCSTR) lpSubKey, ulOptions, samDesired, phkResult);
|
|
2740 }
|
|
2741
|
|
2742 LONG
|
|
2743
|
|
2744 qxeRegQueryInfoKey (HKEY hKey, Extbyte * lpClass, LPDWORD lpcbClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcbMaxSubKeyLen, LPDWORD lpcbMaxClassLen, LPDWORD lpcValues, LPDWORD lpcbMaxValueNameLen, LPDWORD lpcbMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
|
|
2745 {
|
|
2746 if (XEUNICODE_P)
|
|
2747 return RegQueryInfoKeyW (hKey, (LPWSTR) lpClass, lpcbClass, lpReserved, lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen, lpcbMaxValueLen, lpcbSecurityDescriptor, lpftLastWriteTime);
|
|
2748 else
|
|
2749 return RegQueryInfoKeyA (hKey, (LPSTR) lpClass, lpcbClass, lpReserved, lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen, lpcbMaxValueLen, lpcbSecurityDescriptor, lpftLastWriteTime);
|
|
2750 }
|
|
2751
|
|
2752 LONG
|
|
2753
|
|
2754 qxeRegQueryValue (HKEY hKey, const Extbyte * lpSubKey, Extbyte * lpValue, PLONG lpcbValue)
|
|
2755 {
|
|
2756 if (XEUNICODE_P)
|
|
2757 return RegQueryValueW (hKey, (LPCWSTR) lpSubKey, (LPWSTR) lpValue, lpcbValue);
|
|
2758 else
|
|
2759 return RegQueryValueA (hKey, (LPCSTR) lpSubKey, (LPSTR) lpValue, lpcbValue);
|
|
2760 }
|
|
2761
|
|
2762 LONG
|
|
2763
|
|
2764 qxeRegQueryMultipleValues (HKEY hKey, PVALENTW val_list, DWORD num_vals, Extbyte * lpValueBuf, LPDWORD ldwTotsize)
|
|
2765 {
|
|
2766 if (XEUNICODE_P)
|
|
2767 return RegQueryMultipleValuesW (hKey, val_list, num_vals, (LPWSTR) lpValueBuf, ldwTotsize);
|
|
2768 else
|
|
2769 return RegQueryMultipleValuesA (hKey, (PVALENTA) val_list, num_vals, (LPSTR) lpValueBuf, ldwTotsize);
|
|
2770 }
|
|
2771
|
|
2772 LONG
|
|
2773
|
|
2774 qxeRegQueryValueEx (HKEY hKey, const Extbyte * lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData)
|
|
2775 {
|
|
2776 if (XEUNICODE_P)
|
|
2777 return RegQueryValueExW (hKey, (LPCWSTR) lpValueName, lpReserved, lpType, lpData, lpcbData);
|
|
2778 else
|
|
2779 return RegQueryValueExA (hKey, (LPCSTR) lpValueName, lpReserved, lpType, lpData, lpcbData);
|
|
2780 }
|
|
2781
|
|
2782 LONG
|
|
2783
|
|
2784 qxeRegReplaceKey (HKEY hKey, const Extbyte * lpSubKey, const Extbyte * lpNewFile, const Extbyte * lpOldFile)
|
|
2785 {
|
|
2786 if (XEUNICODE_P)
|
|
2787 return RegReplaceKeyW (hKey, (LPCWSTR) lpSubKey, (LPCWSTR) lpNewFile, (LPCWSTR) lpOldFile);
|
|
2788 else
|
|
2789 return RegReplaceKeyA (hKey, (LPCSTR) lpSubKey, (LPCSTR) lpNewFile, (LPCSTR) lpOldFile);
|
|
2790 }
|
|
2791
|
|
2792 LONG
|
|
2793
|
|
2794 qxeRegRestoreKey (HKEY hKey, const Extbyte * lpFile, DWORD dwFlags)
|
|
2795 {
|
|
2796 if (XEUNICODE_P)
|
|
2797 return RegRestoreKeyW (hKey, (LPCWSTR) lpFile, dwFlags);
|
|
2798 else
|
|
2799 return RegRestoreKeyA (hKey, (LPCSTR) lpFile, dwFlags);
|
|
2800 }
|
|
2801
|
|
2802 LONG
|
|
2803
|
|
2804 qxeRegSaveKey (HKEY hKey, const Extbyte * lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
|
|
2805 {
|
|
2806 if (XEUNICODE_P)
|
|
2807 return RegSaveKeyW (hKey, (LPCWSTR) lpFile, lpSecurityAttributes);
|
|
2808 else
|
|
2809 return RegSaveKeyA (hKey, (LPCSTR) lpFile, lpSecurityAttributes);
|
|
2810 }
|
|
2811
|
|
2812 LONG
|
|
2813
|
|
2814 qxeRegSetValue (HKEY hKey, const Extbyte * lpSubKey, DWORD dwType, const Extbyte * lpData, DWORD cbData)
|
|
2815 {
|
|
2816 if (XEUNICODE_P)
|
|
2817 return RegSetValueW (hKey, (LPCWSTR) lpSubKey, dwType, (LPCWSTR) lpData, cbData);
|
|
2818 else
|
|
2819 return RegSetValueA (hKey, (LPCSTR) lpSubKey, dwType, (LPCSTR) lpData, cbData);
|
|
2820 }
|
|
2821
|
|
2822 LONG
|
|
2823
|
|
2824 qxeRegSetValueEx (HKEY hKey, const Extbyte * lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE* lpData, DWORD cbData)
|
|
2825 {
|
|
2826 if (XEUNICODE_P)
|
|
2827 return RegSetValueExW (hKey, (LPCWSTR) lpValueName, Reserved, dwType, lpData, cbData);
|
|
2828 else
|
|
2829 return RegSetValueExA (hKey, (LPCSTR) lpValueName, Reserved, dwType, lpData, cbData);
|
|
2830 }
|
|
2831
|
|
2832 LONG
|
|
2833
|
|
2834 qxeRegUnLoadKey (HKEY hKey, const Extbyte * lpSubKey)
|
|
2835 {
|
|
2836 if (XEUNICODE_P)
|
|
2837 return RegUnLoadKeyW (hKey, (LPCWSTR) lpSubKey);
|
|
2838 else
|
|
2839 return RegUnLoadKeyA (hKey, (LPCSTR) lpSubKey);
|
|
2840 }
|
|
2841
|
|
2842 BOOL
|
|
2843
|
|
2844 qxeInitiateSystemShutdown (Extbyte * lpMachineName, Extbyte * lpMessage, DWORD dwTimeout, BOOL bForceAppsClosed, BOOL bRebootAfterShutdown)
|
|
2845 {
|
|
2846 if (XEUNICODE_P)
|
|
2847 return InitiateSystemShutdownW ((LPWSTR) lpMachineName, (LPWSTR) lpMessage, dwTimeout, bForceAppsClosed, bRebootAfterShutdown);
|
|
2848 else
|
|
2849 return InitiateSystemShutdownA ((LPSTR) lpMachineName, (LPSTR) lpMessage, dwTimeout, bForceAppsClosed, bRebootAfterShutdown);
|
|
2850 }
|
|
2851
|
|
2852 BOOL
|
|
2853
|
|
2854 qxeAbortSystemShutdown (Extbyte * lpMachineName)
|
|
2855 {
|
|
2856 if (XEUNICODE_P)
|
|
2857 return AbortSystemShutdownW ((LPWSTR) lpMachineName);
|
|
2858 else
|
|
2859 return AbortSystemShutdownA ((LPSTR) lpMachineName);
|
|
2860 }
|
2367
|
2861
|
|
2862
|
|
2863 /*----------------------------------------------------------------------*/
|
|
2864 /* Processing file COMMDLG.H */
|
|
2865 /*----------------------------------------------------------------------*/
|
|
2866
|
|
2867 BOOL
|
|
2868 qxeGetOpenFileName (LPOPENFILENAMEW arg1)
|
|
2869 {
|
|
2870 if (XEUNICODE_P)
|
|
2871 return GetOpenFileNameW (arg1);
|
|
2872 else
|
|
2873 return GetOpenFileNameA ((LPOPENFILENAMEA) arg1);
|
|
2874 }
|
|
2875
|
|
2876 BOOL
|
|
2877 qxeGetSaveFileName (LPOPENFILENAMEW arg1)
|
|
2878 {
|
|
2879 if (XEUNICODE_P)
|
|
2880 return GetSaveFileNameW (arg1);
|
|
2881 else
|
|
2882 return GetSaveFileNameA ((LPOPENFILENAMEA) arg1);
|
|
2883 }
|
|
2884
|
|
2885 short
|
|
2886 qxeGetFileTitle (const Extbyte * arg1, Extbyte * arg2, WORD arg3)
|
|
2887 {
|
|
2888 if (XEUNICODE_P)
|
|
2889 return GetFileTitleW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3);
|
|
2890 else
|
|
2891 return GetFileTitleA ((LPCSTR) arg1, (LPSTR) arg2, arg3);
|
|
2892 }
|
|
2893
|
|
2894 BOOL
|
|
2895 qxeChooseColor (LPCHOOSECOLORW arg1)
|
|
2896 {
|
|
2897 if (XEUNICODE_P)
|
|
2898 return ChooseColorW (arg1);
|
|
2899 else
|
|
2900 return ChooseColorA ((LPCHOOSECOLORA) arg1);
|
|
2901 }
|
|
2902
|
|
2903 HWND
|
|
2904 qxeFindText (LPFINDREPLACEW arg1)
|
|
2905 {
|
|
2906 if (XEUNICODE_P)
|
|
2907 return FindTextW (arg1);
|
|
2908 else
|
|
2909 return FindTextA ((LPFINDREPLACEA) arg1);
|
|
2910 }
|
|
2911
|
|
2912 HWND
|
|
2913 qxeReplaceText (LPFINDREPLACEW arg1)
|
|
2914 {
|
|
2915 if (XEUNICODE_P)
|
|
2916 return ReplaceTextW (arg1);
|
|
2917 else
|
|
2918 return ReplaceTextA ((LPFINDREPLACEA) arg1);
|
|
2919 }
|
|
2920
|
|
2921 /* Error if AfxReplaceText used: mac only */
|
|
2922
|
|
2923 /* Error if ChooseFont used: split-sized LPLOGFONT in LPCHOOSEFONT */
|
|
2924
|
|
2925 /* Skipping PrintDlg because LPPRINTDLG with split-sized DEVMODE handle */
|
|
2926
|
|
2927 /* Skipping PageSetupDlg because LPPAGESETUPDLG with split-sized DEVMODE handle */
|
|
2928
|
|
2929
|
|
2930 /*----------------------------------------------------------------------*/
|
3728
|
2931 /* Processing file SHLOBJ.H */
|
2367
|
2932 /*----------------------------------------------------------------------*/
|
|
2933
|
|
2934 BOOL
|
3728
|
2935 qxeSHGetPathFromIDList (LPCITEMIDLIST pidl, Extbyte * pszPath)
|
|
2936 {
|
|
2937 if (XEUNICODE_P)
|
|
2938 return SHGetPathFromIDListW (pidl, (LPWSTR) pszPath);
|
|
2939 else
|
|
2940 return SHGetPathFromIDListA (pidl, (LPSTR) pszPath);
|
|
2941 }
|
|
2942
|
|
2943 /* Skipping SHGetSpecialFolderPath because error in Cygwin prototype, missing from Cygwin libraries */
|
|
2944
|
|
2945 /* Skipping SHBrowseForFolder because need to intercept callback for SendMessage */
|
|
2946
|
|
2947 /* Skipping SHGetDataFromIDList because split-sized WIN32_FIND_DATA or split-simple NETRESOURCE, missing from Cygwin libraries */
|
771
|
2948
|
|
2949
|
|
2950 /*----------------------------------------------------------------------*/
|
|
2951 /* Processing file WINBASE.H */
|
|
2952 /*----------------------------------------------------------------------*/
|
|
2953
|
|
2954 BOOL
|
|
2955 qxeGetBinaryType (const Extbyte * lpApplicationName, LPDWORD lpBinaryType)
|
|
2956 {
|
|
2957 if (XEUNICODE_P)
|
|
2958 return GetBinaryTypeW ((LPCWSTR) lpApplicationName, lpBinaryType);
|
|
2959 else
|
|
2960 return GetBinaryTypeA ((LPCSTR) lpApplicationName, lpBinaryType);
|
|
2961 }
|
|
2962
|
|
2963 DWORD
|
|
2964 qxeGetShortPathName (const Extbyte * lpszLongPath, Extbyte * lpszShortPath, DWORD cchBuffer)
|
|
2965 {
|
|
2966 if (XEUNICODE_P)
|
|
2967 return GetShortPathNameW ((LPCWSTR) lpszLongPath, (LPWSTR) lpszShortPath, cchBuffer);
|
|
2968 else
|
|
2969 return GetShortPathNameA ((LPCSTR) lpszLongPath, (LPSTR) lpszShortPath, cchBuffer);
|
|
2970 }
|
|
2971
|
1684
|
2972 /* Error if GetLongPathName used: Win98/2K+ only */
|
771
|
2973
|
827
|
2974 /* Skipping GetEnvironmentStrings because misnamed ANSI version of the function */
|
|
2975
|
771
|
2976 BOOL
|
|
2977 qxeFreeEnvironmentStrings (Extbyte * arg1)
|
|
2978 {
|
|
2979 if (XEUNICODE_P)
|
|
2980 return FreeEnvironmentStringsW ((LPWSTR) arg1);
|
|
2981 else
|
|
2982 return FreeEnvironmentStringsA ((LPSTR) arg1);
|
|
2983 }
|
|
2984
|
|
2985 DWORD
|
|
2986 qxeFormatMessage (DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, Extbyte * lpBuffer, DWORD nSize, va_list * Arguments)
|
|
2987 {
|
|
2988 if (XEUNICODE_P)
|
|
2989 return FormatMessageW (dwFlags, lpSource, dwMessageId, dwLanguageId, (LPWSTR) lpBuffer, nSize, Arguments);
|
|
2990 else
|
|
2991 return FormatMessageA (dwFlags, lpSource, dwMessageId, dwLanguageId, (LPSTR) lpBuffer, nSize, Arguments);
|
|
2992 }
|
|
2993
|
|
2994 HANDLE
|
|
2995 qxeCreateMailslot (const Extbyte * lpName, DWORD nMaxMessageSize, DWORD lReadTimeout, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
|
|
2996 {
|
|
2997 if (XEUNICODE_P)
|
|
2998 return CreateMailslotW ((LPCWSTR) lpName, nMaxMessageSize, lReadTimeout, lpSecurityAttributes);
|
|
2999 else
|
|
3000 return CreateMailslotA ((LPCSTR) lpName, nMaxMessageSize, lReadTimeout, lpSecurityAttributes);
|
|
3001 }
|
|
3002
|
|
3003 #if !defined (CYGWIN_HEADERS)
|
|
3004
|
778
|
3005 /* Error if EncryptFile used: Win2K+ only */
|
771
|
3006
|
|
3007 #endif /* !defined (CYGWIN_HEADERS) */
|
|
3008
|
|
3009 #if !defined (CYGWIN_HEADERS)
|
|
3010
|
778
|
3011 /* Error if DecryptFile used: Win2K+ only */
|
771
|
3012
|
|
3013 #endif /* !defined (CYGWIN_HEADERS) */
|
|
3014
|
|
3015 /* Error if OpenRaw used: error "The procedure entry point OpenRawW could not be located in the dynamic link library ADVAPI32.dll." */
|
|
3016
|
|
3017 /* Error if QueryRecoveryAgents used: split-sized LPRECOVERY_AGENT_INFORMATION */
|
|
3018
|
|
3019 int
|
|
3020 qxelstrcmp (const Extbyte * lpString1, const Extbyte * lpString2)
|
|
3021 {
|
|
3022 if (XEUNICODE_P)
|
|
3023 return lstrcmpW ((LPCWSTR) lpString1, (LPCWSTR) lpString2);
|
|
3024 else
|
|
3025 return lstrcmpA ((LPCSTR) lpString1, (LPCSTR) lpString2);
|
|
3026 }
|
|
3027
|
|
3028 int
|
|
3029 qxelstrcmpi (const Extbyte * lpString1, const Extbyte * lpString2)
|
|
3030 {
|
|
3031 if (XEUNICODE_P)
|
|
3032 return lstrcmpiW ((LPCWSTR) lpString1, (LPCWSTR) lpString2);
|
|
3033 else
|
|
3034 return lstrcmpiA ((LPCSTR) lpString1, (LPCSTR) lpString2);
|
|
3035 }
|
|
3036
|
|
3037 Extbyte *
|
|
3038 qxelstrcpyn (Extbyte * lpString1, const Extbyte * lpString2, int iMaxLength)
|
|
3039 {
|
|
3040 if (XEUNICODE_P)
|
|
3041 return (Extbyte *) lstrcpynW ((LPWSTR) lpString1, (LPCWSTR) lpString2, iMaxLength);
|
|
3042 else
|
|
3043 return (Extbyte *) lstrcpynA ((LPSTR) lpString1, (LPCSTR) lpString2, iMaxLength);
|
|
3044 }
|
|
3045
|
|
3046 Extbyte *
|
|
3047 qxelstrcpy (Extbyte * lpString1, const Extbyte * lpString2)
|
|
3048 {
|
|
3049 if (XEUNICODE_P)
|
|
3050 return (Extbyte *) lstrcpyW ((LPWSTR) lpString1, (LPCWSTR) lpString2);
|
|
3051 else
|
|
3052 return (Extbyte *) lstrcpyA ((LPSTR) lpString1, (LPCSTR) lpString2);
|
|
3053 }
|
|
3054
|
|
3055 Extbyte *
|
|
3056 qxelstrcat (Extbyte * lpString1, const Extbyte * lpString2)
|
|
3057 {
|
|
3058 if (XEUNICODE_P)
|
|
3059 return (Extbyte *) lstrcatW ((LPWSTR) lpString1, (LPCWSTR) lpString2);
|
|
3060 else
|
|
3061 return (Extbyte *) lstrcatA ((LPSTR) lpString1, (LPCSTR) lpString2);
|
|
3062 }
|
|
3063
|
|
3064 int
|
|
3065 qxelstrlen (const Extbyte * lpString)
|
|
3066 {
|
|
3067 if (XEUNICODE_P)
|
|
3068 return lstrlenW ((LPCWSTR) lpString);
|
|
3069 else
|
|
3070 return lstrlenA ((LPCSTR) lpString);
|
|
3071 }
|
|
3072
|
|
3073 HANDLE
|
|
3074 qxeCreateMutex (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner, const Extbyte * lpName)
|
|
3075 {
|
|
3076 if (XEUNICODE_P)
|
|
3077 return CreateMutexW (lpMutexAttributes, bInitialOwner, (LPCWSTR) lpName);
|
|
3078 else
|
|
3079 return CreateMutexA (lpMutexAttributes, bInitialOwner, (LPCSTR) lpName);
|
|
3080 }
|
|
3081
|
|
3082 HANDLE
|
|
3083 qxeOpenMutex (DWORD dwDesiredAccess, BOOL bInheritHandle, const Extbyte * lpName)
|
|
3084 {
|
|
3085 if (XEUNICODE_P)
|
|
3086 return OpenMutexW (dwDesiredAccess, bInheritHandle, (LPCWSTR) lpName);
|
|
3087 else
|
|
3088 return OpenMutexA (dwDesiredAccess, bInheritHandle, (LPCSTR) lpName);
|
|
3089 }
|
|
3090
|
|
3091 HANDLE
|
|
3092 qxeCreateEvent (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, const Extbyte * lpName)
|
|
3093 {
|
|
3094 if (XEUNICODE_P)
|
|
3095 return CreateEventW (lpEventAttributes, bManualReset, bInitialState, (LPCWSTR) lpName);
|
|
3096 else
|
|
3097 return CreateEventA (lpEventAttributes, bManualReset, bInitialState, (LPCSTR) lpName);
|
|
3098 }
|
|
3099
|
|
3100 HANDLE
|
|
3101 qxeOpenEvent (DWORD dwDesiredAccess, BOOL bInheritHandle, const Extbyte * lpName)
|
|
3102 {
|
|
3103 if (XEUNICODE_P)
|
|
3104 return OpenEventW (dwDesiredAccess, bInheritHandle, (LPCWSTR) lpName);
|
|
3105 else
|
|
3106 return OpenEventA (dwDesiredAccess, bInheritHandle, (LPCSTR) lpName);
|
|
3107 }
|
|
3108
|
|
3109 HANDLE
|
|
3110 qxeCreateSemaphore (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, const Extbyte * lpName)
|
|
3111 {
|
|
3112 if (XEUNICODE_P)
|
|
3113 return CreateSemaphoreW (lpSemaphoreAttributes, lInitialCount, lMaximumCount, (LPCWSTR) lpName);
|
|
3114 else
|
|
3115 return CreateSemaphoreA (lpSemaphoreAttributes, lInitialCount, lMaximumCount, (LPCSTR) lpName);
|
|
3116 }
|
|
3117
|
|
3118 HANDLE
|
|
3119 qxeOpenSemaphore (DWORD dwDesiredAccess, BOOL bInheritHandle, const Extbyte * lpName)
|
|
3120 {
|
|
3121 if (XEUNICODE_P)
|
|
3122 return OpenSemaphoreW (dwDesiredAccess, bInheritHandle, (LPCWSTR) lpName);
|
|
3123 else
|
|
3124 return OpenSemaphoreA (dwDesiredAccess, bInheritHandle, (LPCSTR) lpName);
|
|
3125 }
|
|
3126
|
|
3127 HANDLE
|
|
3128 qxeCreateWaitableTimer (LPSECURITY_ATTRIBUTES lpTimerAttributes, BOOL bManualReset, const Extbyte * lpTimerName)
|
|
3129 {
|
|
3130 if (XEUNICODE_P)
|
|
3131 return CreateWaitableTimerW (lpTimerAttributes, bManualReset, (LPCWSTR) lpTimerName);
|
|
3132 else
|
|
3133 return CreateWaitableTimerA (lpTimerAttributes, bManualReset, (LPCSTR) lpTimerName);
|
|
3134 }
|
|
3135
|
|
3136 HANDLE
|
|
3137 qxeOpenWaitableTimer (DWORD dwDesiredAccess, BOOL bInheritHandle, const Extbyte * lpTimerName)
|
|
3138 {
|
|
3139 if (XEUNICODE_P)
|
|
3140 return OpenWaitableTimerW (dwDesiredAccess, bInheritHandle, (LPCWSTR) lpTimerName);
|
|
3141 else
|
|
3142 return OpenWaitableTimerA (dwDesiredAccess, bInheritHandle, (LPCSTR) lpTimerName);
|
|
3143 }
|
|
3144
|
|
3145 HANDLE
|
|
3146 qxeCreateFileMapping (HANDLE hFile, LPSECURITY_ATTRIBUTES lpFileMappingAttributes, DWORD flProtect, DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, const Extbyte * lpName)
|
|
3147 {
|
|
3148 if (XEUNICODE_P)
|
|
3149 return CreateFileMappingW (hFile, lpFileMappingAttributes, flProtect, dwMaximumSizeHigh, dwMaximumSizeLow, (LPCWSTR) lpName);
|
|
3150 else
|
|
3151 return CreateFileMappingA (hFile, lpFileMappingAttributes, flProtect, dwMaximumSizeHigh, dwMaximumSizeLow, (LPCSTR) lpName);
|
|
3152 }
|
|
3153
|
|
3154 HANDLE
|
|
3155 qxeOpenFileMapping (DWORD dwDesiredAccess, BOOL bInheritHandle, const Extbyte * lpName)
|
|
3156 {
|
|
3157 if (XEUNICODE_P)
|
|
3158 return OpenFileMappingW (dwDesiredAccess, bInheritHandle, (LPCWSTR) lpName);
|
|
3159 else
|
|
3160 return OpenFileMappingA (dwDesiredAccess, bInheritHandle, (LPCSTR) lpName);
|
|
3161 }
|
|
3162
|
|
3163 DWORD
|
|
3164 qxeGetLogicalDriveStrings (DWORD nBufferLength, Extbyte * lpBuffer)
|
|
3165 {
|
|
3166 if (XEUNICODE_P)
|
|
3167 return GetLogicalDriveStringsW (nBufferLength, (LPWSTR) lpBuffer);
|
|
3168 else
|
|
3169 return GetLogicalDriveStringsA (nBufferLength, (LPSTR) lpBuffer);
|
|
3170 }
|
|
3171
|
|
3172 HMODULE
|
|
3173 qxeLoadLibrary (const Extbyte * lpLibFileName)
|
|
3174 {
|
|
3175 if (XEUNICODE_P)
|
|
3176 return LoadLibraryW ((LPCWSTR) lpLibFileName);
|
|
3177 else
|
|
3178 return LoadLibraryA ((LPCSTR) lpLibFileName);
|
|
3179 }
|
|
3180
|
|
3181 HMODULE
|
|
3182 qxeLoadLibraryEx (const Extbyte * lpLibFileName, HANDLE hFile, DWORD dwFlags)
|
|
3183 {
|
|
3184 if (XEUNICODE_P)
|
|
3185 return LoadLibraryExW ((LPCWSTR) lpLibFileName, hFile, dwFlags);
|
|
3186 else
|
|
3187 return LoadLibraryExA ((LPCSTR) lpLibFileName, hFile, dwFlags);
|
|
3188 }
|
|
3189
|
|
3190 DWORD
|
|
3191 qxeGetModuleFileName (HMODULE hModule, Extbyte * lpFilename, DWORD nSize)
|
|
3192 {
|
|
3193 if (XEUNICODE_P)
|
|
3194 return GetModuleFileNameW (hModule, (LPWSTR) lpFilename, nSize);
|
|
3195 else
|
|
3196 return GetModuleFileNameA (hModule, (LPSTR) lpFilename, nSize);
|
|
3197 }
|
|
3198
|
|
3199 HMODULE
|
|
3200 qxeGetModuleHandle (const Extbyte * lpModuleName)
|
|
3201 {
|
|
3202 if (XEUNICODE_P)
|
|
3203 return GetModuleHandleW ((LPCWSTR) lpModuleName);
|
|
3204 else
|
|
3205 return GetModuleHandleA ((LPCSTR) lpModuleName);
|
|
3206 }
|
|
3207
|
|
3208 BOOL
|
|
3209 qxeCreateProcess (const Extbyte * lpApplicationName, Extbyte * lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, const Extbyte * lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
|
|
3210 {
|
|
3211 if (XEUNICODE_P)
|
|
3212 return CreateProcessW ((LPCWSTR) lpApplicationName, (LPWSTR) lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, (LPCWSTR) lpCurrentDirectory, lpStartupInfo, lpProcessInformation);
|
|
3213 else
|
|
3214 return CreateProcessA ((LPCSTR) lpApplicationName, (LPSTR) lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, (LPCSTR) lpCurrentDirectory, (LPSTARTUPINFOA) lpStartupInfo, lpProcessInformation);
|
|
3215 }
|
|
3216
|
|
3217 VOID
|
|
3218 qxeFatalAppExit (UINT uAction, const Extbyte * lpMessageText)
|
|
3219 {
|
|
3220 if (XEUNICODE_P)
|
|
3221 FatalAppExitW (uAction, (LPCWSTR) lpMessageText);
|
|
3222 else
|
|
3223 FatalAppExitA (uAction, (LPCSTR) lpMessageText);
|
|
3224 }
|
|
3225
|
|
3226 VOID
|
|
3227 qxeGetStartupInfo (LPSTARTUPINFOW lpStartupInfo)
|
|
3228 {
|
|
3229 if (XEUNICODE_P)
|
|
3230 GetStartupInfoW (lpStartupInfo);
|
|
3231 else
|
|
3232 GetStartupInfoA ((LPSTARTUPINFOA) lpStartupInfo);
|
|
3233 }
|
|
3234
|
|
3235 Extbyte *
|
|
3236 qxeGetCommandLine (void)
|
|
3237 {
|
|
3238 if (XEUNICODE_P)
|
|
3239 return (Extbyte *) GetCommandLineW ();
|
|
3240 else
|
|
3241 return (Extbyte *) GetCommandLineA ();
|
|
3242 }
|
|
3243
|
|
3244 DWORD
|
|
3245 qxeGetEnvironmentVariable (const Extbyte * lpName, Extbyte * lpBuffer, DWORD nSize)
|
|
3246 {
|
|
3247 if (XEUNICODE_P)
|
|
3248 return GetEnvironmentVariableW ((LPCWSTR) lpName, (LPWSTR) lpBuffer, nSize);
|
|
3249 else
|
|
3250 return GetEnvironmentVariableA ((LPCSTR) lpName, (LPSTR) lpBuffer, nSize);
|
|
3251 }
|
|
3252
|
|
3253 BOOL
|
|
3254 qxeSetEnvironmentVariable (const Extbyte * lpName, const Extbyte * lpValue)
|
|
3255 {
|
|
3256 if (XEUNICODE_P)
|
|
3257 return SetEnvironmentVariableW ((LPCWSTR) lpName, (LPCWSTR) lpValue);
|
|
3258 else
|
|
3259 return SetEnvironmentVariableA ((LPCSTR) lpName, (LPCSTR) lpValue);
|
|
3260 }
|
|
3261
|
|
3262 DWORD
|
|
3263 qxeExpandEnvironmentStrings (const Extbyte * lpSrc, Extbyte * lpDst, DWORD nSize)
|
|
3264 {
|
|
3265 if (XEUNICODE_P)
|
|
3266 return ExpandEnvironmentStringsW ((LPCWSTR) lpSrc, (LPWSTR) lpDst, nSize);
|
|
3267 else
|
|
3268 return ExpandEnvironmentStringsA ((LPCSTR) lpSrc, (LPSTR) lpDst, nSize);
|
|
3269 }
|
|
3270
|
|
3271 VOID
|
|
3272 qxeOutputDebugString (const Extbyte * lpOutputString)
|
|
3273 {
|
|
3274 if (XEUNICODE_P)
|
|
3275 OutputDebugStringW ((LPCWSTR) lpOutputString);
|
|
3276 else
|
|
3277 OutputDebugStringA ((LPCSTR) lpOutputString);
|
|
3278 }
|
|
3279
|
|
3280 HRSRC
|
|
3281 qxeFindResource (HMODULE hModule, const Extbyte * lpName, const Extbyte * lpType)
|
|
3282 {
|
|
3283 if (XEUNICODE_P)
|
|
3284 return FindResourceW (hModule, (LPCWSTR) lpName, (LPCWSTR) lpType);
|
|
3285 else
|
|
3286 return FindResourceA (hModule, (LPCSTR) lpName, (LPCSTR) lpType);
|
|
3287 }
|
|
3288
|
|
3289 HRSRC
|
|
3290 qxeFindResourceEx (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, WORD wLanguage)
|
|
3291 {
|
|
3292 if (XEUNICODE_P)
|
|
3293 return FindResourceExW (hModule, (LPCWSTR) lpType, (LPCWSTR) lpName, wLanguage);
|
|
3294 else
|
|
3295 return FindResourceExA (hModule, (LPCSTR) lpType, (LPCSTR) lpName, wLanguage);
|
|
3296 }
|
|
3297
|
3728
|
3298 /* Skipping EnumResourceTypes because different prototypes in VC6 and VC7 */
|
|
3299
|
|
3300 /* Skipping EnumResourceNames because different prototypes in VC6 and VC7 */
|
|
3301
|
|
3302 /* Skipping EnumResourceLanguages because different prototypes in VC6 and VC7 */
|
|
3303
|
771
|
3304 HANDLE
|
|
3305 qxeBeginUpdateResource (const Extbyte * pFileName, BOOL bDeleteExistingResources)
|
|
3306 {
|
|
3307 if (XEUNICODE_P)
|
|
3308 return BeginUpdateResourceW ((LPCWSTR) pFileName, bDeleteExistingResources);
|
|
3309 else
|
|
3310 return BeginUpdateResourceA ((LPCSTR) pFileName, bDeleteExistingResources);
|
|
3311 }
|
|
3312
|
|
3313 BOOL
|
|
3314 qxeUpdateResource (HANDLE hUpdate, const Extbyte * lpType, const Extbyte * lpName, WORD wLanguage, LPVOID lpData, DWORD cbData)
|
|
3315 {
|
|
3316 if (XEUNICODE_P)
|
|
3317 return UpdateResourceW (hUpdate, (LPCWSTR) lpType, (LPCWSTR) lpName, wLanguage, lpData, cbData);
|
|
3318 else
|
|
3319 return UpdateResourceA (hUpdate, (LPCSTR) lpType, (LPCSTR) lpName, wLanguage, lpData, cbData);
|
|
3320 }
|
|
3321
|
|
3322 BOOL
|
|
3323 qxeEndUpdateResource (HANDLE hUpdate, BOOL fDiscard)
|
|
3324 {
|
|
3325 if (XEUNICODE_P)
|
|
3326 return EndUpdateResourceW (hUpdate, fDiscard);
|
|
3327 else
|
|
3328 return EndUpdateResourceA (hUpdate, fDiscard);
|
|
3329 }
|
|
3330
|
|
3331 ATOM
|
|
3332 qxeGlobalAddAtom (const Extbyte * lpString)
|
|
3333 {
|
|
3334 if (XEUNICODE_P)
|
|
3335 return GlobalAddAtomW ((LPCWSTR) lpString);
|
|
3336 else
|
|
3337 return GlobalAddAtomA ((LPCSTR) lpString);
|
|
3338 }
|
|
3339
|
|
3340 ATOM
|
|
3341 qxeGlobalFindAtom (const Extbyte * lpString)
|
|
3342 {
|
|
3343 if (XEUNICODE_P)
|
|
3344 return GlobalFindAtomW ((LPCWSTR) lpString);
|
|
3345 else
|
|
3346 return GlobalFindAtomA ((LPCSTR) lpString);
|
|
3347 }
|
|
3348
|
|
3349 UINT
|
|
3350 qxeGlobalGetAtomName (ATOM nAtom, Extbyte * lpBuffer, int nSize)
|
|
3351 {
|
|
3352 if (XEUNICODE_P)
|
|
3353 return GlobalGetAtomNameW (nAtom, (LPWSTR) lpBuffer, nSize);
|
|
3354 else
|
|
3355 return GlobalGetAtomNameA (nAtom, (LPSTR) lpBuffer, nSize);
|
|
3356 }
|
|
3357
|
|
3358 ATOM
|
|
3359 qxeAddAtom (const Extbyte * lpString)
|
|
3360 {
|
|
3361 if (XEUNICODE_P)
|
|
3362 return AddAtomW ((LPCWSTR) lpString);
|
|
3363 else
|
|
3364 return AddAtomA ((LPCSTR) lpString);
|
|
3365 }
|
|
3366
|
|
3367 ATOM
|
|
3368 qxeFindAtom (const Extbyte * lpString)
|
|
3369 {
|
|
3370 if (XEUNICODE_P)
|
|
3371 return FindAtomW ((LPCWSTR) lpString);
|
|
3372 else
|
|
3373 return FindAtomA ((LPCSTR) lpString);
|
|
3374 }
|
|
3375
|
|
3376 UINT
|
|
3377 qxeGetAtomName (ATOM nAtom, Extbyte * lpBuffer, int nSize)
|
|
3378 {
|
|
3379 if (XEUNICODE_P)
|
|
3380 return GetAtomNameW (nAtom, (LPWSTR) lpBuffer, nSize);
|
|
3381 else
|
|
3382 return GetAtomNameA (nAtom, (LPSTR) lpBuffer, nSize);
|
|
3383 }
|
|
3384
|
|
3385 UINT
|
|
3386 qxeGetProfileInt (const Extbyte * lpAppName, const Extbyte * lpKeyName, INT nDefault)
|
|
3387 {
|
|
3388 if (XEUNICODE_P)
|
|
3389 return GetProfileIntW ((LPCWSTR) lpAppName, (LPCWSTR) lpKeyName, nDefault);
|
|
3390 else
|
|
3391 return GetProfileIntA ((LPCSTR) lpAppName, (LPCSTR) lpKeyName, nDefault);
|
|
3392 }
|
|
3393
|
|
3394 DWORD
|
|
3395 qxeGetProfileString (const Extbyte * lpAppName, const Extbyte * lpKeyName, const Extbyte * lpDefault, Extbyte * lpReturnedString, DWORD nSize)
|
|
3396 {
|
|
3397 if (XEUNICODE_P)
|
|
3398 return GetProfileStringW ((LPCWSTR) lpAppName, (LPCWSTR) lpKeyName, (LPCWSTR) lpDefault, (LPWSTR) lpReturnedString, nSize);
|
|
3399 else
|
|
3400 return GetProfileStringA ((LPCSTR) lpAppName, (LPCSTR) lpKeyName, (LPCSTR) lpDefault, (LPSTR) lpReturnedString, nSize);
|
|
3401 }
|
|
3402
|
|
3403 BOOL
|
|
3404 qxeWriteProfileString (const Extbyte * lpAppName, const Extbyte * lpKeyName, const Extbyte * lpString)
|
|
3405 {
|
|
3406 if (XEUNICODE_P)
|
|
3407 return WriteProfileStringW ((LPCWSTR) lpAppName, (LPCWSTR) lpKeyName, (LPCWSTR) lpString);
|
|
3408 else
|
|
3409 return WriteProfileStringA ((LPCSTR) lpAppName, (LPCSTR) lpKeyName, (LPCSTR) lpString);
|
|
3410 }
|
|
3411
|
|
3412 DWORD
|
|
3413 qxeGetProfileSection (const Extbyte * lpAppName, Extbyte * lpReturnedString, DWORD nSize)
|
|
3414 {
|
|
3415 if (XEUNICODE_P)
|
|
3416 return GetProfileSectionW ((LPCWSTR) lpAppName, (LPWSTR) lpReturnedString, nSize);
|
|
3417 else
|
|
3418 return GetProfileSectionA ((LPCSTR) lpAppName, (LPSTR) lpReturnedString, nSize);
|
|
3419 }
|
|
3420
|
|
3421 BOOL
|
|
3422 qxeWriteProfileSection (const Extbyte * lpAppName, const Extbyte * lpString)
|
|
3423 {
|
|
3424 if (XEUNICODE_P)
|
|
3425 return WriteProfileSectionW ((LPCWSTR) lpAppName, (LPCWSTR) lpString);
|
|
3426 else
|
|
3427 return WriteProfileSectionA ((LPCSTR) lpAppName, (LPCSTR) lpString);
|
|
3428 }
|
|
3429
|
|
3430 UINT
|
|
3431 qxeGetPrivateProfileInt (const Extbyte * lpAppName, const Extbyte * lpKeyName, INT nDefault, const Extbyte * lpFileName)
|
|
3432 {
|
|
3433 if (XEUNICODE_P)
|
|
3434 return GetPrivateProfileIntW ((LPCWSTR) lpAppName, (LPCWSTR) lpKeyName, nDefault, (LPCWSTR) lpFileName);
|
|
3435 else
|
|
3436 return GetPrivateProfileIntA ((LPCSTR) lpAppName, (LPCSTR) lpKeyName, nDefault, (LPCSTR) lpFileName);
|
|
3437 }
|
|
3438
|
|
3439 DWORD
|
|
3440 qxeGetPrivateProfileString (const Extbyte * lpAppName, const Extbyte * lpKeyName, const Extbyte * lpDefault, Extbyte * lpReturnedString, DWORD nSize, const Extbyte * lpFileName)
|
|
3441 {
|
|
3442 if (XEUNICODE_P)
|
|
3443 return GetPrivateProfileStringW ((LPCWSTR) lpAppName, (LPCWSTR) lpKeyName, (LPCWSTR) lpDefault, (LPWSTR) lpReturnedString, nSize, (LPCWSTR) lpFileName);
|
|
3444 else
|
|
3445 return GetPrivateProfileStringA ((LPCSTR) lpAppName, (LPCSTR) lpKeyName, (LPCSTR) lpDefault, (LPSTR) lpReturnedString, nSize, (LPCSTR) lpFileName);
|
|
3446 }
|
|
3447
|
|
3448 BOOL
|
|
3449 qxeWritePrivateProfileString (const Extbyte * lpAppName, const Extbyte * lpKeyName, const Extbyte * lpString, const Extbyte * lpFileName)
|
|
3450 {
|
|
3451 if (XEUNICODE_P)
|
|
3452 return WritePrivateProfileStringW ((LPCWSTR) lpAppName, (LPCWSTR) lpKeyName, (LPCWSTR) lpString, (LPCWSTR) lpFileName);
|
|
3453 else
|
|
3454 return WritePrivateProfileStringA ((LPCSTR) lpAppName, (LPCSTR) lpKeyName, (LPCSTR) lpString, (LPCSTR) lpFileName);
|
|
3455 }
|
|
3456
|
|
3457 DWORD
|
|
3458 qxeGetPrivateProfileSection (const Extbyte * lpAppName, Extbyte * lpReturnedString, DWORD nSize, const Extbyte * lpFileName)
|
|
3459 {
|
|
3460 if (XEUNICODE_P)
|
|
3461 return GetPrivateProfileSectionW ((LPCWSTR) lpAppName, (LPWSTR) lpReturnedString, nSize, (LPCWSTR) lpFileName);
|
|
3462 else
|
|
3463 return GetPrivateProfileSectionA ((LPCSTR) lpAppName, (LPSTR) lpReturnedString, nSize, (LPCSTR) lpFileName);
|
|
3464 }
|
|
3465
|
|
3466 BOOL
|
|
3467 qxeWritePrivateProfileSection (const Extbyte * lpAppName, const Extbyte * lpString, const Extbyte * lpFileName)
|
|
3468 {
|
|
3469 if (XEUNICODE_P)
|
|
3470 return WritePrivateProfileSectionW ((LPCWSTR) lpAppName, (LPCWSTR) lpString, (LPCWSTR) lpFileName);
|
|
3471 else
|
|
3472 return WritePrivateProfileSectionA ((LPCSTR) lpAppName, (LPCSTR) lpString, (LPCSTR) lpFileName);
|
|
3473 }
|
|
3474
|
|
3475 DWORD
|
|
3476 qxeGetPrivateProfileSectionNames (Extbyte * lpszReturnBuffer, DWORD nSize, const Extbyte * lpFileName)
|
|
3477 {
|
|
3478 if (XEUNICODE_P)
|
|
3479 return GetPrivateProfileSectionNamesW ((LPWSTR) lpszReturnBuffer, nSize, (LPCWSTR) lpFileName);
|
|
3480 else
|
|
3481 return GetPrivateProfileSectionNamesA ((LPSTR) lpszReturnBuffer, nSize, (LPCSTR) lpFileName);
|
|
3482 }
|
|
3483
|
|
3484 BOOL
|
|
3485 qxeGetPrivateProfileStruct (const Extbyte * lpszSection, const Extbyte * lpszKey, LPVOID lpStruct, UINT uSizeStruct, const Extbyte * szFile)
|
|
3486 {
|
|
3487 if (XEUNICODE_P)
|
|
3488 return GetPrivateProfileStructW ((LPCWSTR) lpszSection, (LPCWSTR) lpszKey, lpStruct, uSizeStruct, (LPCWSTR) szFile);
|
|
3489 else
|
|
3490 return GetPrivateProfileStructA ((LPCSTR) lpszSection, (LPCSTR) lpszKey, lpStruct, uSizeStruct, (LPCSTR) szFile);
|
|
3491 }
|
|
3492
|
|
3493 BOOL
|
|
3494 qxeWritePrivateProfileStruct (const Extbyte * lpszSection, const Extbyte * lpszKey, LPVOID lpStruct, UINT uSizeStruct, const Extbyte * szFile)
|
|
3495 {
|
|
3496 if (XEUNICODE_P)
|
|
3497 return WritePrivateProfileStructW ((LPCWSTR) lpszSection, (LPCWSTR) lpszKey, lpStruct, uSizeStruct, (LPCWSTR) szFile);
|
|
3498 else
|
|
3499 return WritePrivateProfileStructA ((LPCSTR) lpszSection, (LPCSTR) lpszKey, lpStruct, uSizeStruct, (LPCSTR) szFile);
|
|
3500 }
|
|
3501
|
|
3502 UINT
|
|
3503 qxeGetDriveType (const Extbyte * lpRootPathName)
|
|
3504 {
|
|
3505 if (XEUNICODE_P)
|
|
3506 return GetDriveTypeW ((LPCWSTR) lpRootPathName);
|
|
3507 else
|
|
3508 return GetDriveTypeA ((LPCSTR) lpRootPathName);
|
|
3509 }
|
|
3510
|
|
3511 UINT
|
|
3512 qxeGetSystemDirectory (Extbyte * lpBuffer, UINT uSize)
|
|
3513 {
|
|
3514 if (XEUNICODE_P)
|
|
3515 return GetSystemDirectoryW ((LPWSTR) lpBuffer, uSize);
|
|
3516 else
|
|
3517 return GetSystemDirectoryA ((LPSTR) lpBuffer, uSize);
|
|
3518 }
|
|
3519
|
|
3520 DWORD
|
|
3521 qxeGetTempPath (DWORD nBufferLength, Extbyte * lpBuffer)
|
|
3522 {
|
|
3523 if (XEUNICODE_P)
|
|
3524 return GetTempPathW (nBufferLength, (LPWSTR) lpBuffer);
|
|
3525 else
|
|
3526 return GetTempPathA (nBufferLength, (LPSTR) lpBuffer);
|
|
3527 }
|
|
3528
|
|
3529 UINT
|
|
3530 qxeGetTempFileName (const Extbyte * lpPathName, const Extbyte * lpPrefixString, UINT uUnique, Extbyte * lpTempFileName)
|
|
3531 {
|
|
3532 if (XEUNICODE_P)
|
|
3533 return GetTempFileNameW ((LPCWSTR) lpPathName, (LPCWSTR) lpPrefixString, uUnique, (LPWSTR) lpTempFileName);
|
|
3534 else
|
|
3535 return GetTempFileNameA ((LPCSTR) lpPathName, (LPCSTR) lpPrefixString, uUnique, (LPSTR) lpTempFileName);
|
|
3536 }
|
|
3537
|
|
3538 UINT
|
|
3539 qxeGetWindowsDirectory (Extbyte * lpBuffer, UINT uSize)
|
|
3540 {
|
|
3541 if (XEUNICODE_P)
|
|
3542 return GetWindowsDirectoryW ((LPWSTR) lpBuffer, uSize);
|
|
3543 else
|
|
3544 return GetWindowsDirectoryA ((LPSTR) lpBuffer, uSize);
|
|
3545 }
|
|
3546
|
|
3547 BOOL
|
|
3548 qxeSetCurrentDirectory (const Extbyte * lpPathName)
|
|
3549 {
|
|
3550 if (XEUNICODE_P)
|
|
3551 return SetCurrentDirectoryW ((LPCWSTR) lpPathName);
|
|
3552 else
|
|
3553 return SetCurrentDirectoryA ((LPCSTR) lpPathName);
|
|
3554 }
|
|
3555
|
|
3556 DWORD
|
|
3557 qxeGetCurrentDirectory (DWORD nBufferLength, Extbyte * lpBuffer)
|
|
3558 {
|
|
3559 if (XEUNICODE_P)
|
|
3560 return GetCurrentDirectoryW (nBufferLength, (LPWSTR) lpBuffer);
|
|
3561 else
|
|
3562 return GetCurrentDirectoryA (nBufferLength, (LPSTR) lpBuffer);
|
|
3563 }
|
|
3564
|
|
3565 BOOL
|
|
3566 qxeGetDiskFreeSpace (const Extbyte * lpRootPathName, LPDWORD lpSectorsPerCluster, LPDWORD lpBytesPerSector, LPDWORD lpNumberOfFreeClusters, LPDWORD lpTotalNumberOfClusters)
|
|
3567 {
|
|
3568 if (XEUNICODE_P)
|
|
3569 return GetDiskFreeSpaceW ((LPCWSTR) lpRootPathName, lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters);
|
|
3570 else
|
|
3571 return GetDiskFreeSpaceA ((LPCSTR) lpRootPathName, lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters);
|
|
3572 }
|
|
3573
|
|
3574 BOOL
|
|
3575 qxeGetDiskFreeSpaceEx (const Extbyte * lpDirectoryName, PULARGE_INTEGER lpFreeBytesAvailableToCaller, PULARGE_INTEGER lpTotalNumberOfBytes, PULARGE_INTEGER lpTotalNumberOfFreeBytes)
|
|
3576 {
|
|
3577 if (XEUNICODE_P)
|
|
3578 return GetDiskFreeSpaceExW ((LPCWSTR) lpDirectoryName, lpFreeBytesAvailableToCaller, lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes);
|
|
3579 else
|
|
3580 return GetDiskFreeSpaceExA ((LPCSTR) lpDirectoryName, lpFreeBytesAvailableToCaller, lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes);
|
|
3581 }
|
|
3582
|
|
3583 BOOL
|
|
3584 qxeCreateDirectory (const Extbyte * lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
|
|
3585 {
|
|
3586 if (XEUNICODE_P)
|
|
3587 return CreateDirectoryW ((LPCWSTR) lpPathName, lpSecurityAttributes);
|
|
3588 else
|
|
3589 return CreateDirectoryA ((LPCSTR) lpPathName, lpSecurityAttributes);
|
|
3590 }
|
|
3591
|
|
3592 BOOL
|
|
3593 qxeCreateDirectoryEx (const Extbyte * lpTemplateDirectory, const Extbyte * lpNewDirectory, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
|
|
3594 {
|
|
3595 if (XEUNICODE_P)
|
|
3596 return CreateDirectoryExW ((LPCWSTR) lpTemplateDirectory, (LPCWSTR) lpNewDirectory, lpSecurityAttributes);
|
|
3597 else
|
|
3598 return CreateDirectoryExA ((LPCSTR) lpTemplateDirectory, (LPCSTR) lpNewDirectory, lpSecurityAttributes);
|
|
3599 }
|
|
3600
|
|
3601 BOOL
|
|
3602 qxeRemoveDirectory (const Extbyte * lpPathName)
|
|
3603 {
|
|
3604 if (XEUNICODE_P)
|
|
3605 return RemoveDirectoryW ((LPCWSTR) lpPathName);
|
|
3606 else
|
|
3607 return RemoveDirectoryA ((LPCSTR) lpPathName);
|
|
3608 }
|
|
3609
|
|
3610 DWORD
|
|
3611 qxeGetFullPathName (const Extbyte * lpFileName, DWORD nBufferLength, Extbyte * lpBuffer, Extbyte * * lpFilePart)
|
|
3612 {
|
|
3613 if (XEUNICODE_P)
|
|
3614 return GetFullPathNameW ((LPCWSTR) lpFileName, nBufferLength, (LPWSTR) lpBuffer, (LPWSTR *) lpFilePart);
|
|
3615 else
|
|
3616 return GetFullPathNameA ((LPCSTR) lpFileName, nBufferLength, (LPSTR) lpBuffer, (LPSTR *) lpFilePart);
|
|
3617 }
|
|
3618
|
|
3619 BOOL
|
|
3620 qxeDefineDosDevice (DWORD dwFlags, const Extbyte * lpDeviceName, const Extbyte * lpTargetPath)
|
|
3621 {
|
|
3622 if (XEUNICODE_P)
|
|
3623 return DefineDosDeviceW (dwFlags, (LPCWSTR) lpDeviceName, (LPCWSTR) lpTargetPath);
|
|
3624 else
|
|
3625 return DefineDosDeviceA (dwFlags, (LPCSTR) lpDeviceName, (LPCSTR) lpTargetPath);
|
|
3626 }
|
|
3627
|
|
3628 DWORD
|
|
3629 qxeQueryDosDevice (const Extbyte * lpDeviceName, Extbyte * lpTargetPath, DWORD ucchMax)
|
|
3630 {
|
|
3631 if (XEUNICODE_P)
|
|
3632 return QueryDosDeviceW ((LPCWSTR) lpDeviceName, (LPWSTR) lpTargetPath, ucchMax);
|
|
3633 else
|
|
3634 return QueryDosDeviceA ((LPCSTR) lpDeviceName, (LPSTR) lpTargetPath, ucchMax);
|
|
3635 }
|
|
3636
|
|
3637 HANDLE
|
|
3638 qxeCreateFile (const Extbyte * lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
|
|
3639 {
|
|
3640 if (XEUNICODE_P)
|
|
3641 return CreateFileW ((LPCWSTR) lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
|
|
3642 else
|
|
3643 return CreateFileA ((LPCSTR) lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
|
|
3644 }
|
|
3645
|
|
3646 BOOL
|
|
3647 qxeSetFileAttributes (const Extbyte * lpFileName, DWORD dwFileAttributes)
|
|
3648 {
|
|
3649 if (XEUNICODE_P)
|
|
3650 return SetFileAttributesW ((LPCWSTR) lpFileName, dwFileAttributes);
|
|
3651 else
|
|
3652 return SetFileAttributesA ((LPCSTR) lpFileName, dwFileAttributes);
|
|
3653 }
|
|
3654
|
|
3655 DWORD
|
|
3656 qxeGetFileAttributes (const Extbyte * lpFileName)
|
|
3657 {
|
|
3658 if (XEUNICODE_P)
|
|
3659 return GetFileAttributesW ((LPCWSTR) lpFileName);
|
|
3660 else
|
|
3661 return GetFileAttributesA ((LPCSTR) lpFileName);
|
|
3662 }
|
|
3663
|
|
3664 BOOL
|
|
3665 qxeGetFileAttributesEx (const Extbyte * lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, LPVOID lpFileInformation)
|
|
3666 {
|
|
3667 if (XEUNICODE_P)
|
|
3668 return GetFileAttributesExW ((LPCWSTR) lpFileName, fInfoLevelId, lpFileInformation);
|
|
3669 else
|
|
3670 return GetFileAttributesExA ((LPCSTR) lpFileName, fInfoLevelId, lpFileInformation);
|
|
3671 }
|
|
3672
|
|
3673 DWORD
|
|
3674 qxeGetCompressedFileSize (const Extbyte * lpFileName, LPDWORD lpFileSizeHigh)
|
|
3675 {
|
|
3676 if (XEUNICODE_P)
|
|
3677 return GetCompressedFileSizeW ((LPCWSTR) lpFileName, lpFileSizeHigh);
|
|
3678 else
|
|
3679 return GetCompressedFileSizeA ((LPCSTR) lpFileName, lpFileSizeHigh);
|
|
3680 }
|
|
3681
|
|
3682 BOOL
|
|
3683 qxeDeleteFile (const Extbyte * lpFileName)
|
|
3684 {
|
|
3685 if (XEUNICODE_P)
|
|
3686 return DeleteFileW ((LPCWSTR) lpFileName);
|
|
3687 else
|
|
3688 return DeleteFileA ((LPCSTR) lpFileName);
|
|
3689 }
|
|
3690
|
|
3691 /* Error if FindFirstFileEx used: split-sized LPWIN32_FIND_DATA; not used, NT 4.0+ only */
|
|
3692
|
|
3693 /* Skipping FindFirstFile because split-sized LPWIN32_FIND_DATA */
|
|
3694
|
|
3695 /* Skipping FindNextFile because split-sized LPWIN32_FIND_DATA */
|
|
3696
|
|
3697 DWORD
|
|
3698 qxeSearchPath (const Extbyte * lpPath, const Extbyte * lpFileName, const Extbyte * lpExtension, DWORD nBufferLength, Extbyte * lpBuffer, Extbyte * * lpFilePart)
|
|
3699 {
|
|
3700 if (XEUNICODE_P)
|
|
3701 return SearchPathW ((LPCWSTR) lpPath, (LPCWSTR) lpFileName, (LPCWSTR) lpExtension, nBufferLength, (LPWSTR) lpBuffer, (LPWSTR *) lpFilePart);
|
|
3702 else
|
|
3703 return SearchPathA ((LPCSTR) lpPath, (LPCSTR) lpFileName, (LPCSTR) lpExtension, nBufferLength, (LPSTR) lpBuffer, (LPSTR *) lpFilePart);
|
|
3704 }
|
|
3705
|
|
3706 BOOL
|
|
3707 qxeCopyFile (const Extbyte * lpExistingFileName, const Extbyte * lpNewFileName, BOOL bFailIfExists)
|
|
3708 {
|
|
3709 if (XEUNICODE_P)
|
|
3710 return CopyFileW ((LPCWSTR) lpExistingFileName, (LPCWSTR) lpNewFileName, bFailIfExists);
|
|
3711 else
|
|
3712 return CopyFileA ((LPCSTR) lpExistingFileName, (LPCSTR) lpNewFileName, bFailIfExists);
|
|
3713 }
|
|
3714
|
|
3715 /* NOTE: NT 4.0+ only */
|
|
3716 BOOL
|
|
3717 qxeCopyFileEx (const Extbyte * lpExistingFileName, const Extbyte * lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags)
|
|
3718 {
|
|
3719 if (XEUNICODE_P)
|
|
3720 return CopyFileExW ((LPCWSTR) lpExistingFileName, (LPCWSTR) lpNewFileName, lpProgressRoutine, lpData, pbCancel, dwCopyFlags);
|
|
3721 else
|
|
3722 return CopyFileExA ((LPCSTR) lpExistingFileName, (LPCSTR) lpNewFileName, lpProgressRoutine, lpData, pbCancel, dwCopyFlags);
|
|
3723 }
|
|
3724
|
|
3725 BOOL
|
|
3726 qxeMoveFile (const Extbyte * lpExistingFileName, const Extbyte * lpNewFileName)
|
|
3727 {
|
|
3728 if (XEUNICODE_P)
|
|
3729 return MoveFileW ((LPCWSTR) lpExistingFileName, (LPCWSTR) lpNewFileName);
|
|
3730 else
|
|
3731 return MoveFileA ((LPCSTR) lpExistingFileName, (LPCSTR) lpNewFileName);
|
|
3732 }
|
|
3733
|
|
3734 BOOL
|
|
3735 qxeMoveFileEx (const Extbyte * lpExistingFileName, const Extbyte * lpNewFileName, DWORD dwFlags)
|
|
3736 {
|
|
3737 if (XEUNICODE_P)
|
|
3738 return MoveFileExW ((LPCWSTR) lpExistingFileName, (LPCWSTR) lpNewFileName, dwFlags);
|
|
3739 else
|
|
3740 return MoveFileExA ((LPCSTR) lpExistingFileName, (LPCSTR) lpNewFileName, dwFlags);
|
|
3741 }
|
|
3742
|
|
3743 /* Error if MoveFileWithProgress used: NT 5.0+ only */
|
|
3744
|
|
3745 /* Error if CreateHardLink used: NT 5.0+ only */
|
|
3746
|
|
3747 HANDLE
|
|
3748 qxeCreateNamedPipe (const Extbyte * lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
|
|
3749 {
|
|
3750 if (XEUNICODE_P)
|
|
3751 return CreateNamedPipeW ((LPCWSTR) lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes);
|
|
3752 else
|
|
3753 return CreateNamedPipeA ((LPCSTR) lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes);
|
|
3754 }
|
|
3755
|
|
3756 BOOL
|
|
3757 qxeGetNamedPipeHandleState (HANDLE hNamedPipe, LPDWORD lpState, LPDWORD lpCurInstances, LPDWORD lpMaxCollectionCount, LPDWORD lpCollectDataTimeout, Extbyte * lpUserName, DWORD nMaxUserNameSize)
|
|
3758 {
|
|
3759 if (XEUNICODE_P)
|
|
3760 return GetNamedPipeHandleStateW (hNamedPipe, lpState, lpCurInstances, lpMaxCollectionCount, lpCollectDataTimeout, (LPWSTR) lpUserName, nMaxUserNameSize);
|
|
3761 else
|
|
3762 return GetNamedPipeHandleStateA (hNamedPipe, lpState, lpCurInstances, lpMaxCollectionCount, lpCollectDataTimeout, (LPSTR) lpUserName, nMaxUserNameSize);
|
|
3763 }
|
|
3764
|
|
3765 BOOL
|
|
3766 qxeCallNamedPipe (const Extbyte * lpNamedPipeName, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesRead, DWORD nTimeOut)
|
|
3767 {
|
|
3768 if (XEUNICODE_P)
|
|
3769 return CallNamedPipeW ((LPCWSTR) lpNamedPipeName, lpInBuffer, nInBufferSize, lpOutBuffer, nOutBufferSize, lpBytesRead, nTimeOut);
|
|
3770 else
|
|
3771 return CallNamedPipeA ((LPCSTR) lpNamedPipeName, lpInBuffer, nInBufferSize, lpOutBuffer, nOutBufferSize, lpBytesRead, nTimeOut);
|
|
3772 }
|
|
3773
|
|
3774 BOOL
|
|
3775 qxeWaitNamedPipe (const Extbyte * lpNamedPipeName, DWORD nTimeOut)
|
|
3776 {
|
|
3777 if (XEUNICODE_P)
|
|
3778 return WaitNamedPipeW ((LPCWSTR) lpNamedPipeName, nTimeOut);
|
|
3779 else
|
|
3780 return WaitNamedPipeA ((LPCSTR) lpNamedPipeName, nTimeOut);
|
|
3781 }
|
|
3782
|
|
3783 BOOL
|
|
3784 qxeSetVolumeLabel (const Extbyte * lpRootPathName, const Extbyte * lpVolumeName)
|
|
3785 {
|
|
3786 if (XEUNICODE_P)
|
|
3787 return SetVolumeLabelW ((LPCWSTR) lpRootPathName, (LPCWSTR) lpVolumeName);
|
|
3788 else
|
|
3789 return SetVolumeLabelA ((LPCSTR) lpRootPathName, (LPCSTR) lpVolumeName);
|
|
3790 }
|
|
3791
|
|
3792 BOOL
|
|
3793 qxeGetVolumeInformation (const Extbyte * lpRootPathName, Extbyte * lpVolumeNameBuffer, DWORD nVolumeNameSize, LPDWORD lpVolumeSerialNumber, LPDWORD lpMaximumComponentLength, LPDWORD lpFileSystemFlags, Extbyte * lpFileSystemNameBuffer, DWORD nFileSystemNameSize)
|
|
3794 {
|
|
3795 if (XEUNICODE_P)
|
|
3796 return GetVolumeInformationW ((LPCWSTR) lpRootPathName, (LPWSTR) lpVolumeNameBuffer, nVolumeNameSize, lpVolumeSerialNumber, lpMaximumComponentLength, lpFileSystemFlags, (LPWSTR) lpFileSystemNameBuffer, nFileSystemNameSize);
|
|
3797 else
|
|
3798 return GetVolumeInformationA ((LPCSTR) lpRootPathName, (LPSTR) lpVolumeNameBuffer, nVolumeNameSize, lpVolumeSerialNumber, lpMaximumComponentLength, lpFileSystemFlags, (LPSTR) lpFileSystemNameBuffer, nFileSystemNameSize);
|
|
3799 }
|
|
3800
|
|
3801 BOOL
|
|
3802 qxeClearEventLog (HANDLE hEventLog, const Extbyte * lpBackupFileName)
|
|
3803 {
|
|
3804 if (XEUNICODE_P)
|
|
3805 return ClearEventLogW (hEventLog, (LPCWSTR) lpBackupFileName);
|
|
3806 else
|
|
3807 return ClearEventLogA (hEventLog, (LPCSTR) lpBackupFileName);
|
|
3808 }
|
|
3809
|
|
3810 BOOL
|
|
3811 qxeBackupEventLog (HANDLE hEventLog, const Extbyte * lpBackupFileName)
|
|
3812 {
|
|
3813 if (XEUNICODE_P)
|
|
3814 return BackupEventLogW (hEventLog, (LPCWSTR) lpBackupFileName);
|
|
3815 else
|
|
3816 return BackupEventLogA (hEventLog, (LPCSTR) lpBackupFileName);
|
|
3817 }
|
|
3818
|
|
3819 HANDLE
|
|
3820 qxeOpenEventLog (const Extbyte * lpUNCServerName, const Extbyte * lpSourceName)
|
|
3821 {
|
|
3822 if (XEUNICODE_P)
|
|
3823 return OpenEventLogW ((LPCWSTR) lpUNCServerName, (LPCWSTR) lpSourceName);
|
|
3824 else
|
|
3825 return OpenEventLogA ((LPCSTR) lpUNCServerName, (LPCSTR) lpSourceName);
|
|
3826 }
|
|
3827
|
|
3828 HANDLE
|
|
3829 qxeRegisterEventSource (const Extbyte * lpUNCServerName, const Extbyte * lpSourceName)
|
|
3830 {
|
|
3831 if (XEUNICODE_P)
|
|
3832 return RegisterEventSourceW ((LPCWSTR) lpUNCServerName, (LPCWSTR) lpSourceName);
|
|
3833 else
|
|
3834 return RegisterEventSourceA ((LPCSTR) lpUNCServerName, (LPCSTR) lpSourceName);
|
|
3835 }
|
|
3836
|
|
3837 HANDLE
|
|
3838 qxeOpenBackupEventLog (const Extbyte * lpUNCServerName, const Extbyte * lpFileName)
|
|
3839 {
|
|
3840 if (XEUNICODE_P)
|
|
3841 return OpenBackupEventLogW ((LPCWSTR) lpUNCServerName, (LPCWSTR) lpFileName);
|
|
3842 else
|
|
3843 return OpenBackupEventLogA ((LPCSTR) lpUNCServerName, (LPCSTR) lpFileName);
|
|
3844 }
|
|
3845
|
|
3846 BOOL
|
|
3847 qxeReadEventLog (HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD * pnBytesRead, DWORD * pnMinNumberOfBytesNeeded)
|
|
3848 {
|
|
3849 if (XEUNICODE_P)
|
|
3850 return ReadEventLogW (hEventLog, dwReadFlags, dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
|
|
3851 else
|
|
3852 return ReadEventLogA (hEventLog, dwReadFlags, dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
|
|
3853 }
|
|
3854
|
|
3855 BOOL
|
|
3856 qxeReportEvent (HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID, PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, const Extbyte * * lpStrings, LPVOID lpRawData)
|
|
3857 {
|
|
3858 if (XEUNICODE_P)
|
|
3859 return ReportEventW (hEventLog, wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, (LPCWSTR *) lpStrings, lpRawData);
|
|
3860 else
|
|
3861 return ReportEventA (hEventLog, wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, (LPCSTR *) lpStrings, lpRawData);
|
|
3862 }
|
|
3863
|
|
3864 BOOL
|
|
3865 qxeAccessCheckAndAuditAlarm (const Extbyte * SubsystemName, LPVOID HandleId, Extbyte * ObjectTypeName, Extbyte * ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, DWORD DesiredAccess, PGENERIC_MAPPING GenericMapping, BOOL ObjectCreation, LPDWORD GrantedAccess, LPBOOL AccessStatus, LPBOOL pfGenerateOnClose)
|
|
3866 {
|
|
3867 if (XEUNICODE_P)
|
|
3868 return AccessCheckAndAuditAlarmW ((LPCWSTR) SubsystemName, HandleId, (LPWSTR) ObjectTypeName, (LPWSTR) ObjectName, SecurityDescriptor, DesiredAccess, GenericMapping, ObjectCreation, GrantedAccess, AccessStatus, pfGenerateOnClose);
|
|
3869 else
|
|
3870 return AccessCheckAndAuditAlarmA ((LPCSTR) SubsystemName, HandleId, (LPSTR) ObjectTypeName, (LPSTR) ObjectName, SecurityDescriptor, DesiredAccess, GenericMapping, ObjectCreation, GrantedAccess, AccessStatus, pfGenerateOnClose);
|
|
3871 }
|
|
3872
|
|
3873 /* Error if AccessCheckByTypeAndAuditAlarm used: NT 5.0+ only */
|
|
3874
|
|
3875 /* Error if AccessCheckByTypeResultListAndAuditAlarm used: NT 5.0+ only */
|
|
3876
|
|
3877 BOOL
|
|
3878 qxeObjectOpenAuditAlarm (const Extbyte * SubsystemName, LPVOID HandleId, Extbyte * ObjectTypeName, Extbyte * ObjectName, PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken, DWORD DesiredAccess, DWORD GrantedAccess, PPRIVILEGE_SET Privileges, BOOL ObjectCreation, BOOL AccessGranted, LPBOOL GenerateOnClose)
|
|
3879 {
|
|
3880 if (XEUNICODE_P)
|
|
3881 return ObjectOpenAuditAlarmW ((LPCWSTR) SubsystemName, HandleId, (LPWSTR) ObjectTypeName, (LPWSTR) ObjectName, pSecurityDescriptor, ClientToken, DesiredAccess, GrantedAccess, Privileges, ObjectCreation, AccessGranted, GenerateOnClose);
|
|
3882 else
|
|
3883 return ObjectOpenAuditAlarmA ((LPCSTR) SubsystemName, HandleId, (LPSTR) ObjectTypeName, (LPSTR) ObjectName, pSecurityDescriptor, ClientToken, DesiredAccess, GrantedAccess, Privileges, ObjectCreation, AccessGranted, GenerateOnClose);
|
|
3884 }
|
|
3885
|
|
3886 BOOL
|
|
3887 qxeObjectPrivilegeAuditAlarm (const Extbyte * SubsystemName, LPVOID HandleId, HANDLE ClientToken, DWORD DesiredAccess, PPRIVILEGE_SET Privileges, BOOL AccessGranted)
|
|
3888 {
|
|
3889 if (XEUNICODE_P)
|
|
3890 return ObjectPrivilegeAuditAlarmW ((LPCWSTR) SubsystemName, HandleId, ClientToken, DesiredAccess, Privileges, AccessGranted);
|
|
3891 else
|
|
3892 return ObjectPrivilegeAuditAlarmA ((LPCSTR) SubsystemName, HandleId, ClientToken, DesiredAccess, Privileges, AccessGranted);
|
|
3893 }
|
|
3894
|
|
3895 BOOL
|
|
3896 qxeObjectCloseAuditAlarm (const Extbyte * SubsystemName, LPVOID HandleId, BOOL GenerateOnClose)
|
|
3897 {
|
|
3898 if (XEUNICODE_P)
|
|
3899 return ObjectCloseAuditAlarmW ((LPCWSTR) SubsystemName, HandleId, GenerateOnClose);
|
|
3900 else
|
|
3901 return ObjectCloseAuditAlarmA ((LPCSTR) SubsystemName, HandleId, GenerateOnClose);
|
|
3902 }
|
|
3903
|
|
3904 BOOL
|
|
3905 qxeObjectDeleteAuditAlarm (const Extbyte * SubsystemName, LPVOID HandleId, BOOL GenerateOnClose)
|
|
3906 {
|
|
3907 if (XEUNICODE_P)
|
|
3908 return ObjectDeleteAuditAlarmW ((LPCWSTR) SubsystemName, HandleId, GenerateOnClose);
|
|
3909 else
|
|
3910 return ObjectDeleteAuditAlarmA ((LPCSTR) SubsystemName, HandleId, GenerateOnClose);
|
|
3911 }
|
|
3912
|
|
3913 BOOL
|
|
3914 qxePrivilegedServiceAuditAlarm (const Extbyte * SubsystemName, const Extbyte * ServiceName, HANDLE ClientToken, PPRIVILEGE_SET Privileges, BOOL AccessGranted)
|
|
3915 {
|
|
3916 if (XEUNICODE_P)
|
|
3917 return PrivilegedServiceAuditAlarmW ((LPCWSTR) SubsystemName, (LPCWSTR) ServiceName, ClientToken, Privileges, AccessGranted);
|
|
3918 else
|
|
3919 return PrivilegedServiceAuditAlarmA ((LPCSTR) SubsystemName, (LPCSTR) ServiceName, ClientToken, Privileges, AccessGranted);
|
|
3920 }
|
|
3921
|
|
3922 BOOL
|
|
3923 qxeSetFileSecurity (const Extbyte * lpFileName, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor)
|
|
3924 {
|
|
3925 if (XEUNICODE_P)
|
|
3926 return SetFileSecurityW ((LPCWSTR) lpFileName, SecurityInformation, pSecurityDescriptor);
|
|
3927 else
|
|
3928 return SetFileSecurityA ((LPCSTR) lpFileName, SecurityInformation, pSecurityDescriptor);
|
|
3929 }
|
|
3930
|
|
3931 BOOL
|
|
3932 qxeGetFileSecurity (const Extbyte * lpFileName, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, LPDWORD lpnLengthNeeded)
|
|
3933 {
|
|
3934 if (XEUNICODE_P)
|
|
3935 return GetFileSecurityW ((LPCWSTR) lpFileName, RequestedInformation, pSecurityDescriptor, nLength, lpnLengthNeeded);
|
|
3936 else
|
|
3937 return GetFileSecurityA ((LPCSTR) lpFileName, RequestedInformation, pSecurityDescriptor, nLength, lpnLengthNeeded);
|
|
3938 }
|
|
3939
|
|
3940 HANDLE
|
|
3941 qxeFindFirstChangeNotification (const Extbyte * lpPathName, BOOL bWatchSubtree, DWORD dwNotifyFilter)
|
|
3942 {
|
|
3943 if (XEUNICODE_P)
|
|
3944 return FindFirstChangeNotificationW ((LPCWSTR) lpPathName, bWatchSubtree, dwNotifyFilter);
|
|
3945 else
|
|
3946 return FindFirstChangeNotificationA ((LPCSTR) lpPathName, bWatchSubtree, dwNotifyFilter);
|
|
3947 }
|
|
3948
|
|
3949 /* Error if ReadDirectoryChanges used: Unicode-only */
|
|
3950
|
|
3951 BOOL
|
|
3952 qxeIsBadStringPtr (const Extbyte * lpsz, UINT ucchMax)
|
|
3953 {
|
|
3954 if (XEUNICODE_P)
|
|
3955 return IsBadStringPtrW ((LPCWSTR) lpsz, ucchMax);
|
|
3956 else
|
|
3957 return IsBadStringPtrA ((LPCSTR) lpsz, ucchMax);
|
|
3958 }
|
|
3959
|
|
3960 BOOL
|
|
3961 qxeLookupAccountSid (const Extbyte * lpSystemName, PSID Sid, Extbyte * Name, LPDWORD cbName, Extbyte * ReferencedDomainName, LPDWORD cbReferencedDomainName, PSID_NAME_USE peUse)
|
|
3962 {
|
|
3963 if (XEUNICODE_P)
|
|
3964 return LookupAccountSidW ((LPCWSTR) lpSystemName, Sid, (LPWSTR) Name, cbName, (LPWSTR) ReferencedDomainName, cbReferencedDomainName, peUse);
|
|
3965 else
|
|
3966 return LookupAccountSidA ((LPCSTR) lpSystemName, Sid, (LPSTR) Name, cbName, (LPSTR) ReferencedDomainName, cbReferencedDomainName, peUse);
|
|
3967 }
|
|
3968
|
|
3969 BOOL
|
|
3970 qxeLookupAccountName (const Extbyte * lpSystemName, const Extbyte * lpAccountName, PSID Sid, LPDWORD cbSid, Extbyte * ReferencedDomainName, LPDWORD cbReferencedDomainName, PSID_NAME_USE peUse)
|
|
3971 {
|
|
3972 if (XEUNICODE_P)
|
|
3973 return LookupAccountNameW ((LPCWSTR) lpSystemName, (LPCWSTR) lpAccountName, Sid, cbSid, (LPWSTR) ReferencedDomainName, cbReferencedDomainName, peUse);
|
|
3974 else
|
|
3975 return LookupAccountNameA ((LPCSTR) lpSystemName, (LPCSTR) lpAccountName, Sid, cbSid, (LPSTR) ReferencedDomainName, cbReferencedDomainName, peUse);
|
|
3976 }
|
|
3977
|
|
3978 BOOL
|
|
3979 qxeLookupPrivilegeValue (const Extbyte * lpSystemName, const Extbyte * lpName, PLUID lpLuid)
|
|
3980 {
|
|
3981 if (XEUNICODE_P)
|
|
3982 return LookupPrivilegeValueW ((LPCWSTR) lpSystemName, (LPCWSTR) lpName, lpLuid);
|
|
3983 else
|
|
3984 return LookupPrivilegeValueA ((LPCSTR) lpSystemName, (LPCSTR) lpName, lpLuid);
|
|
3985 }
|
|
3986
|
|
3987 BOOL
|
|
3988 qxeLookupPrivilegeName (const Extbyte * lpSystemName, PLUID lpLuid, Extbyte * lpName, LPDWORD cbName)
|
|
3989 {
|
|
3990 if (XEUNICODE_P)
|
|
3991 return LookupPrivilegeNameW ((LPCWSTR) lpSystemName, lpLuid, (LPWSTR) lpName, cbName);
|
|
3992 else
|
|
3993 return LookupPrivilegeNameA ((LPCSTR) lpSystemName, lpLuid, (LPSTR) lpName, cbName);
|
|
3994 }
|
|
3995
|
|
3996 BOOL
|
|
3997 qxeLookupPrivilegeDisplayName (const Extbyte * lpSystemName, const Extbyte * lpName, Extbyte * lpDisplayName, LPDWORD cbDisplayName, LPDWORD lpLanguageId)
|
|
3998 {
|
|
3999 if (XEUNICODE_P)
|
|
4000 return LookupPrivilegeDisplayNameW ((LPCWSTR) lpSystemName, (LPCWSTR) lpName, (LPWSTR) lpDisplayName, cbDisplayName, lpLanguageId);
|
|
4001 else
|
|
4002 return LookupPrivilegeDisplayNameA ((LPCSTR) lpSystemName, (LPCSTR) lpName, (LPSTR) lpDisplayName, cbDisplayName, lpLanguageId);
|
|
4003 }
|
|
4004
|
|
4005 BOOL
|
|
4006 qxeBuildCommDCB (const Extbyte * lpDef, LPDCB lpDCB)
|
|
4007 {
|
|
4008 if (XEUNICODE_P)
|
|
4009 return BuildCommDCBW ((LPCWSTR) lpDef, lpDCB);
|
|
4010 else
|
|
4011 return BuildCommDCBA ((LPCSTR) lpDef, lpDCB);
|
|
4012 }
|
|
4013
|
|
4014 BOOL
|
|
4015 qxeBuildCommDCBAndTimeouts (const Extbyte * lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommTimeouts)
|
|
4016 {
|
|
4017 if (XEUNICODE_P)
|
|
4018 return BuildCommDCBAndTimeoutsW ((LPCWSTR) lpDef, lpDCB, lpCommTimeouts);
|
|
4019 else
|
|
4020 return BuildCommDCBAndTimeoutsA ((LPCSTR) lpDef, lpDCB, lpCommTimeouts);
|
|
4021 }
|
|
4022
|
|
4023 BOOL
|
|
4024 qxeCommConfigDialog (const Extbyte * lpszName, HWND hWnd, LPCOMMCONFIG lpCC)
|
|
4025 {
|
|
4026 if (XEUNICODE_P)
|
|
4027 return CommConfigDialogW ((LPCWSTR) lpszName, hWnd, lpCC);
|
|
4028 else
|
|
4029 return CommConfigDialogA ((LPCSTR) lpszName, hWnd, lpCC);
|
|
4030 }
|
|
4031
|
|
4032 BOOL
|
|
4033 qxeGetDefaultCommConfig (const Extbyte * lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize)
|
|
4034 {
|
|
4035 if (XEUNICODE_P)
|
|
4036 return GetDefaultCommConfigW ((LPCWSTR) lpszName, lpCC, lpdwSize);
|
|
4037 else
|
|
4038 return GetDefaultCommConfigA ((LPCSTR) lpszName, lpCC, lpdwSize);
|
|
4039 }
|
|
4040
|
|
4041 BOOL
|
|
4042 qxeSetDefaultCommConfig (const Extbyte * lpszName, LPCOMMCONFIG lpCC, DWORD dwSize)
|
|
4043 {
|
|
4044 if (XEUNICODE_P)
|
|
4045 return SetDefaultCommConfigW ((LPCWSTR) lpszName, lpCC, dwSize);
|
|
4046 else
|
|
4047 return SetDefaultCommConfigA ((LPCSTR) lpszName, lpCC, dwSize);
|
|
4048 }
|
|
4049
|
|
4050 BOOL
|
|
4051 qxeGetComputerName (Extbyte * lpBuffer, LPDWORD nSize)
|
|
4052 {
|
|
4053 if (XEUNICODE_P)
|
|
4054 return GetComputerNameW ((LPWSTR) lpBuffer, nSize);
|
|
4055 else
|
|
4056 return GetComputerNameA ((LPSTR) lpBuffer, nSize);
|
|
4057 }
|
|
4058
|
|
4059 BOOL
|
|
4060 qxeSetComputerName (const Extbyte * lpComputerName)
|
|
4061 {
|
|
4062 if (XEUNICODE_P)
|
|
4063 return SetComputerNameW ((LPCWSTR) lpComputerName);
|
|
4064 else
|
|
4065 return SetComputerNameA ((LPCSTR) lpComputerName);
|
|
4066 }
|
|
4067
|
|
4068 BOOL
|
|
4069 qxeGetUserName (Extbyte * lpBuffer, LPDWORD nSize)
|
|
4070 {
|
|
4071 if (XEUNICODE_P)
|
|
4072 return GetUserNameW ((LPWSTR) lpBuffer, nSize);
|
|
4073 else
|
|
4074 return GetUserNameA ((LPSTR) lpBuffer, nSize);
|
|
4075 }
|
|
4076
|
|
4077 BOOL
|
|
4078 qxeLogonUser (Extbyte * lpszUsername, Extbyte * lpszDomain, Extbyte * lpszPassword, DWORD dwLogonType, DWORD dwLogonProvider, PHANDLE phToken)
|
|
4079 {
|
|
4080 if (XEUNICODE_P)
|
|
4081 return LogonUserW ((LPWSTR) lpszUsername, (LPWSTR) lpszDomain, (LPWSTR) lpszPassword, dwLogonType, dwLogonProvider, phToken);
|
|
4082 else
|
|
4083 return LogonUserA ((LPSTR) lpszUsername, (LPSTR) lpszDomain, (LPSTR) lpszPassword, dwLogonType, dwLogonProvider, phToken);
|
|
4084 }
|
|
4085
|
|
4086 BOOL
|
|
4087 qxeCreateProcessAsUser (HANDLE hToken, const Extbyte * lpApplicationName, Extbyte * lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, const Extbyte * lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
|
|
4088 {
|
|
4089 if (XEUNICODE_P)
|
|
4090 return CreateProcessAsUserW (hToken, (LPCWSTR) lpApplicationName, (LPWSTR) lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, (LPCWSTR) lpCurrentDirectory, lpStartupInfo, lpProcessInformation);
|
|
4091 else
|
|
4092 return CreateProcessAsUserA (hToken, (LPCSTR) lpApplicationName, (LPSTR) lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, (LPCSTR) lpCurrentDirectory, (LPSTARTUPINFOA) lpStartupInfo, lpProcessInformation);
|
|
4093 }
|
|
4094
|
|
4095 /* Error if GetCurrentHwProfile used: split-sized LPHW_PROFILE_INFO; NT 4.0+ only */
|
|
4096
|
|
4097 /* Error if GetVersionEx used: split-sized LPOSVERSIONINFO */
|
|
4098
|
|
4099 /* Error if CreateJobObject used: NT 5.0+ only */
|
|
4100
|
|
4101 /* Error if OpenJobObject used: NT 5.0+ only */
|
|
4102
|
|
4103
|
|
4104 /*----------------------------------------------------------------------*/
|
3728
|
4105 /* Processing file ACLAPI.h */
|
771
|
4106 /*----------------------------------------------------------------------*/
|
|
4107
|
3728
|
4108 DWORD
|
|
4109 qxeGetNamedSecurityInfo (IN Extbyte * pObjectName, IN SE_OBJECT_TYPE ObjectType, IN SECURITY_INFORMATION SecurityInfo, OUT PSID * ppsidOowner, OUT PSID * ppsidGroup, OUT PACL * ppDacl, OUT PACL * ppSacl, OUT PSECURITY_DESCRIPTOR * ppSecurityDescriptor)
|
|
4110 {
|
|
4111 if (XEUNICODE_P)
|
|
4112 return GetNamedSecurityInfoW ((IN LPWSTR) pObjectName, ObjectType, SecurityInfo, ppsidOowner, ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor);
|
|
4113 else
|
|
4114 return GetNamedSecurityInfoA ((IN LPSTR) pObjectName, ObjectType, SecurityInfo, ppsidOowner, ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor);
|
|
4115 }
|
|
4116
|