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