comparison src/intl-auto-encap-win32.c @ 2367:ecf1ebac70d8

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