Add a missing return.
[wine.git] / include / winbase.h
blob4f95039b563cb4cbec3507a755d79d5110442712
1 /*
2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_WINBASE_H
20 #define __WINE_WINBASE_H
22 #include <winerror.h>
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 /* Windows Exit Procedure flag values */
29 #define WEP_FREE_DLL 0
30 #define WEP_SYSTEM_EXIT 1
32 typedef DWORD (CALLBACK *LPTHREAD_START_ROUTINE)(LPVOID);
34 typedef VOID (WINAPI *PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
35 typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
37 typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
38 typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
39 typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
41 typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
42 typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
43 typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;
45 typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK;
47 #define EXCEPTION_DEBUG_EVENT 1
48 #define CREATE_THREAD_DEBUG_EVENT 2
49 #define CREATE_PROCESS_DEBUG_EVENT 3
50 #define EXIT_THREAD_DEBUG_EVENT 4
51 #define EXIT_PROCESS_DEBUG_EVENT 5
52 #define LOAD_DLL_DEBUG_EVENT 6
53 #define UNLOAD_DLL_DEBUG_EVENT 7
54 #define OUTPUT_DEBUG_STRING_EVENT 8
55 #define RIP_EVENT 9
57 typedef struct _EXCEPTION_DEBUG_INFO {
58 EXCEPTION_RECORD ExceptionRecord;
59 DWORD dwFirstChance;
60 } EXCEPTION_DEBUG_INFO;
62 typedef struct _CREATE_THREAD_DEBUG_INFO {
63 HANDLE hThread;
64 LPVOID lpThreadLocalBase;
65 LPTHREAD_START_ROUTINE lpStartAddress;
66 } CREATE_THREAD_DEBUG_INFO;
68 typedef struct _CREATE_PROCESS_DEBUG_INFO {
69 HANDLE hFile;
70 HANDLE hProcess;
71 HANDLE hThread;
72 LPVOID lpBaseOfImage;
73 DWORD dwDebugInfoFileOffset;
74 DWORD nDebugInfoSize;
75 LPVOID lpThreadLocalBase;
76 LPTHREAD_START_ROUTINE lpStartAddress;
77 LPVOID lpImageName;
78 WORD fUnicode;
79 } CREATE_PROCESS_DEBUG_INFO;
81 typedef struct _EXIT_THREAD_DEBUG_INFO {
82 DWORD dwExitCode;
83 } EXIT_THREAD_DEBUG_INFO;
85 typedef struct _EXIT_PROCESS_DEBUG_INFO {
86 DWORD dwExitCode;
87 } EXIT_PROCESS_DEBUG_INFO;
89 typedef struct _LOAD_DLL_DEBUG_INFO {
90 HANDLE hFile;
91 LPVOID lpBaseOfDll;
92 DWORD dwDebugInfoFileOffset;
93 DWORD nDebugInfoSize;
94 LPVOID lpImageName;
95 WORD fUnicode;
96 } LOAD_DLL_DEBUG_INFO;
98 typedef struct _UNLOAD_DLL_DEBUG_INFO {
99 LPVOID lpBaseOfDll;
100 } UNLOAD_DLL_DEBUG_INFO;
102 typedef struct _OUTPUT_DEBUG_STRING_INFO {
103 LPSTR lpDebugStringData;
104 WORD fUnicode;
105 WORD nDebugStringLength;
106 } OUTPUT_DEBUG_STRING_INFO;
108 typedef struct _RIP_INFO {
109 DWORD dwError;
110 DWORD dwType;
111 } RIP_INFO;
113 typedef struct _DEBUG_EVENT {
114 DWORD dwDebugEventCode;
115 DWORD dwProcessId;
116 DWORD dwThreadId;
117 union {
118 EXCEPTION_DEBUG_INFO Exception;
119 CREATE_THREAD_DEBUG_INFO CreateThread;
120 CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
121 EXIT_THREAD_DEBUG_INFO ExitThread;
122 EXIT_PROCESS_DEBUG_INFO ExitProcess;
123 LOAD_DLL_DEBUG_INFO LoadDll;
124 UNLOAD_DLL_DEBUG_INFO UnloadDll;
125 OUTPUT_DEBUG_STRING_INFO DebugString;
126 RIP_INFO RipInfo;
127 } u;
128 } DEBUG_EVENT, *LPDEBUG_EVENT;
130 typedef PCONTEXT LPCONTEXT;
131 typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
132 typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
134 #define OFS_MAXPATHNAME 128
135 typedef struct _OFSTRUCT
137 BYTE cBytes;
138 BYTE fFixedDisk;
139 WORD nErrCode;
140 WORD Reserved1;
141 WORD Reserved2;
142 BYTE szPathName[OFS_MAXPATHNAME];
143 } OFSTRUCT, *POFSTRUCT, *LPOFSTRUCT;
145 #define OF_READ 0x0000
146 #define OF_WRITE 0x0001
147 #define OF_READWRITE 0x0002
148 #define OF_SHARE_COMPAT 0x0000
149 #define OF_SHARE_EXCLUSIVE 0x0010
150 #define OF_SHARE_DENY_WRITE 0x0020
151 #define OF_SHARE_DENY_READ 0x0030
152 #define OF_SHARE_DENY_NONE 0x0040
153 #define OF_PARSE 0x0100
154 #define OF_DELETE 0x0200
155 #define OF_VERIFY 0x0400 /* Used with OF_REOPEN */
156 #define OF_SEARCH 0x0400 /* Used without OF_REOPEN */
157 #define OF_CANCEL 0x0800
158 #define OF_CREATE 0x1000
159 #define OF_PROMPT 0x2000
160 #define OF_EXIST 0x4000
161 #define OF_REOPEN 0x8000
163 /* SetErrorMode values */
164 #define SEM_FAILCRITICALERRORS 0x0001
165 #define SEM_NOGPFAULTERRORBOX 0x0002
166 #define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
167 #define SEM_NOOPENFILEERRORBOX 0x8000
169 /* CopyFileEx flags */
170 #define COPY_FILE_FAIL_IF_EXISTS 0x00000001
171 #define COPY_FILE_RESTARTABLE 0x00000002
172 #define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x00000004
174 /* GetTempFileName() Flags */
175 #define TF_FORCEDRIVE 0x80
177 #define DRIVE_UNKNOWN 0
178 #define DRIVE_NO_ROOT_DIR 1
179 #define DRIVE_REMOVABLE 2
180 #define DRIVE_FIXED 3
181 #define DRIVE_REMOTE 4
182 /* Win32 additions */
183 #define DRIVE_CDROM 5
184 #define DRIVE_RAMDISK 6
186 #define MAX_COMPUTERNAME_LENGTH 31
188 /* The security attributes structure */
189 typedef struct _SECURITY_ATTRIBUTES
191 DWORD nLength;
192 LPVOID lpSecurityDescriptor;
193 BOOL bInheritHandle;
194 } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
196 #ifndef _FILETIME_
197 #define _FILETIME_
198 /* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
199 typedef struct _FILETIME
201 #ifdef WORDS_BIGENDIAN
202 DWORD dwHighDateTime;
203 DWORD dwLowDateTime;
204 #else
205 DWORD dwLowDateTime;
206 DWORD dwHighDateTime;
207 #endif
208 } FILETIME, *PFILETIME, *LPFILETIME;
209 #endif /* _FILETIME_ */
211 /* Find* structures */
212 typedef struct _WIN32_FIND_DATAA
214 DWORD dwFileAttributes;
215 FILETIME ftCreationTime;
216 FILETIME ftLastAccessTime;
217 FILETIME ftLastWriteTime;
218 DWORD nFileSizeHigh;
219 DWORD nFileSizeLow;
220 DWORD dwReserved0;
221 DWORD dwReserved1;
222 CHAR cFileName[260];
223 CHAR cAlternateFileName[14];
224 } WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
226 typedef struct _WIN32_FIND_DATAW
228 DWORD dwFileAttributes;
229 FILETIME ftCreationTime;
230 FILETIME ftLastAccessTime;
231 FILETIME ftLastWriteTime;
232 DWORD nFileSizeHigh;
233 DWORD nFileSizeLow;
234 DWORD dwReserved0;
235 DWORD dwReserved1;
236 WCHAR cFileName[260];
237 WCHAR cAlternateFileName[14];
238 } WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
240 DECL_WINELIB_TYPE_AW(WIN32_FIND_DATA)
241 DECL_WINELIB_TYPE_AW(PWIN32_FIND_DATA)
242 DECL_WINELIB_TYPE_AW(LPWIN32_FIND_DATA)
244 typedef enum _FINDEX_INFO_LEVELS
246 FindExInfoStandard,
247 FindExInfoMaxInfoLevel
248 } FINDEX_INFO_LEVELS;
250 typedef enum _FINDEX_SEARCH_OPS
252 FindExSearchNameMatch,
253 FindExSearchLimitToDirectories,
254 FindExSearchLimitToDevices,
255 FindExSearchMaxSearchOp
256 } FINDEX_SEARCH_OPS;
258 typedef struct _PROCESS_HEAP_ENTRY
260 LPVOID lpData;
261 DWORD cbData;
262 BYTE cbOverhead;
263 BYTE iRegionIndex;
264 WORD wFlags;
265 union {
266 struct {
267 HANDLE hMem;
268 DWORD dwReserved[3];
269 } Block;
270 struct {
271 DWORD dwCommittedSize;
272 DWORD dwUnCommittedSize;
273 LPVOID lpFirstBlock;
274 LPVOID lpLastBlock;
275 } Region;
276 } DUMMYUNIONNAME;
277 } PROCESS_HEAP_ENTRY, *PPROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY;
279 #define PROCESS_HEAP_REGION 0x0001
280 #define PROCESS_HEAP_UNCOMMITTED_RANGE 0x0002
281 #define PROCESS_HEAP_ENTRY_BUSY 0x0004
282 #define PROCESS_HEAP_ENTRY_MOVEABLE 0x0010
283 #define PROCESS_HEAP_ENTRY_DDESHARE 0x0020
285 #define INVALID_HANDLE_VALUE ((HANDLE)~0UL)
286 #define INVALID_FILE_SIZE ((DWORD)~0UL)
287 #define INVALID_SET_FILE_POINTER ((DWORD)~0UL)
288 #define INVALID_FILE_ATTRIBUTES ((DWORD)~0UL)
290 #define LOCKFILE_FAIL_IMMEDIATELY 1
291 #define LOCKFILE_EXCLUSIVE_LOCK 2
293 #define TLS_OUT_OF_INDEXES ((DWORD)~0UL)
295 #define SHUTDOWN_NORETRY 1
297 /* comm */
299 #define CBR_110 0xFF10
300 #define CBR_300 0xFF11
301 #define CBR_600 0xFF12
302 #define CBR_1200 0xFF13
303 #define CBR_2400 0xFF14
304 #define CBR_4800 0xFF15
305 #define CBR_9600 0xFF16
306 #define CBR_14400 0xFF17
307 #define CBR_19200 0xFF18
308 #define CBR_38400 0xFF1B
309 #define CBR_56000 0xFF1F
310 #define CBR_57600 0xFF20
311 #define CBR_115200 0xFF21
312 #define CBR_128000 0xFF23
313 #define CBR_256000 0xFF27
315 #define NOPARITY 0
316 #define ODDPARITY 1
317 #define EVENPARITY 2
318 #define MARKPARITY 3
319 #define SPACEPARITY 4
320 #define ONESTOPBIT 0
321 #define ONE5STOPBITS 1
322 #define TWOSTOPBITS 2
324 #define IGNORE 0
325 #define INFINITE 0xFFFFFFFF
327 #define CE_RXOVER 0x0001
328 #define CE_OVERRUN 0x0002
329 #define CE_RXPARITY 0x0004
330 #define CE_FRAME 0x0008
331 #define CE_BREAK 0x0010
332 #define CE_CTSTO 0x0020
333 #define CE_DSRTO 0x0040
334 #define CE_RLSDTO 0x0080
335 #define CE_TXFULL 0x0100
336 #define CE_PTO 0x0200
337 #define CE_IOE 0x0400
338 #define CE_DNS 0x0800
339 #define CE_OOP 0x1000
340 #define CE_MODE 0x8000
342 #define IE_BADID -1
343 #define IE_OPEN -2
344 #define IE_NOPEN -3
345 #define IE_MEMORY -4
346 #define IE_DEFAULT -5
347 #define IE_HARDWARE -10
348 #define IE_BYTESIZE -11
349 #define IE_BAUDRATE -12
351 #define EV_RXCHAR 0x0001
352 #define EV_RXFLAG 0x0002
353 #define EV_TXEMPT 0x0004
354 #define EV_CTS 0x0008
355 #define EV_DSR 0x0010
356 #define EV_RLSD 0x0020
357 #define EV_BREAK 0x0040
358 #define EV_ERR 0x0080
359 #define EV_RING 0x0100
360 #define EV_PERR 0x0200
361 #define EV_RX80FULL 0x0400
362 #define EV_EVENT1 0x0800
363 #define EV_EVENT2 0x1000
365 #define SETXOFF 1
366 #define SETXON 2
367 #define SETRTS 3
368 #define CLRRTS 4
369 #define SETDTR 5
370 #define CLRDTR 6
371 #define RESETDEV 7
372 #define SETBREAK 8
373 #define CLRBREAK 9
375 /* Purge functions for Comm Port */
376 #define PURGE_TXABORT 0x0001 /* Kill the pending/current writes to the
377 comm port */
378 #define PURGE_RXABORT 0x0002 /*Kill the pending/current reads to
379 the comm port */
380 #define PURGE_TXCLEAR 0x0004 /* Kill the transmit queue if there*/
381 #define PURGE_RXCLEAR 0x0008 /* Kill the typeahead buffer if there*/
384 /* Modem Status Flags */
385 #define MS_CTS_ON ((DWORD)0x0010)
386 #define MS_DSR_ON ((DWORD)0x0020)
387 #define MS_RING_ON ((DWORD)0x0040)
388 #define MS_RLSD_ON ((DWORD)0x0080)
390 #define RTS_CONTROL_DISABLE 0
391 #define RTS_CONTROL_ENABLE 1
392 #define RTS_CONTROL_HANDSHAKE 2
393 #define RTS_CONTROL_TOGGLE 3
395 #define DTR_CONTROL_DISABLE 0
396 #define DTR_CONTROL_ENABLE 1
397 #define DTR_CONTROL_HANDSHAKE 2
400 #define LMEM_FIXED 0
401 #define LMEM_MOVEABLE 0x0002
402 #define LMEM_NOCOMPACT 0x0010
403 #define LMEM_NODISCARD 0x0020
404 #define LMEM_ZEROINIT 0x0040
405 #define LMEM_MODIFY 0x0080
406 #define LMEM_DISCARDABLE 0x0F00
407 #define LMEM_DISCARDED 0x4000
408 #define LMEM_LOCKCOUNT 0x00FF
410 #define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
411 #define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
413 #define NONZEROLHND (LMEM_MOVEABLE)
414 #define NONZEROLPTR (LMEM_FIXED)
416 #define LocalDiscard(h) (LocalReAlloc((h),0,LMEM_MOVEABLE))
418 #define GMEM_FIXED 0x0000
419 #define GMEM_MOVEABLE 0x0002
420 #define GMEM_NOCOMPACT 0x0010
421 #define GMEM_NODISCARD 0x0020
422 #define GMEM_ZEROINIT 0x0040
423 #define GMEM_MODIFY 0x0080
424 #define GMEM_DISCARDABLE 0x0100
425 #define GMEM_NOT_BANKED 0x1000
426 #define GMEM_SHARE 0x2000
427 #define GMEM_DDESHARE 0x2000
428 #define GMEM_NOTIFY 0x4000
429 #define GMEM_LOWER GMEM_NOT_BANKED
430 #define GMEM_DISCARDED 0x4000
431 #define GMEM_LOCKCOUNT 0x00ff
432 #define GMEM_INVALID_HANDLE 0x8000
434 #define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
435 #define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
437 #define GlobalLRUNewest(h) ((HANDLE)(h))
438 #define GlobalLRUOldest(h) ((HANDLE)(h))
439 #define GlobalDiscard(h) (GlobalReAlloc((h),0,GMEM_MOVEABLE))
441 #define INVALID_ATOM ((ATOM)0)
442 #define MAXINTATOM 0xc000
443 #define MAKEINTATOMA(atom) ((LPCSTR)((ULONG_PTR)((WORD)(atom))))
444 #define MAKEINTATOMW(atom) ((LPCWSTR)((ULONG_PTR)((WORD)(atom))))
445 #define MAKEINTATOM WINELIB_NAME_AW(MAKEINTATOM)
447 typedef struct tagMEMORYSTATUS
449 DWORD dwLength;
450 DWORD dwMemoryLoad;
451 SIZE_T dwTotalPhys;
452 SIZE_T dwAvailPhys;
453 SIZE_T dwTotalPageFile;
454 SIZE_T dwAvailPageFile;
455 SIZE_T dwTotalVirtual;
456 SIZE_T dwAvailVirtual;
457 } MEMORYSTATUS, *LPMEMORYSTATUS;
459 typedef struct tagMEMORYSTATUSEX {
460 DWORD dwLength;
461 DWORD dwMemoryLoad;
462 DWORDLONG ullTotalPhys;
463 DWORDLONG ullAvailPhys;
464 DWORDLONG ullTotalPageFile;
465 DWORDLONG ullAvailPageFile;
466 DWORDLONG ullTotalVirtual;
467 DWORDLONG ullAvailVirtual;
468 DWORDLONG ullAvailExtendedVirtual;
469 } MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
472 typedef struct _SYSTEMTIME{
473 WORD wYear;
474 WORD wMonth;
475 WORD wDayOfWeek;
476 WORD wDay;
477 WORD wHour;
478 WORD wMinute;
479 WORD wSecond;
480 WORD wMilliseconds;
481 } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
483 /* The 'overlapped' data structure used by async I/O functions.
485 typedef struct _OVERLAPPED {
486 DWORD Internal;
487 DWORD InternalHigh;
488 DWORD Offset;
489 DWORD OffsetHigh;
490 HANDLE hEvent;
491 } OVERLAPPED, *LPOVERLAPPED;
493 typedef VOID (CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped);
495 /* Process startup information.
498 /* STARTUPINFO.dwFlags */
499 #define STARTF_USESHOWWINDOW 0x00000001
500 #define STARTF_USESIZE 0x00000002
501 #define STARTF_USEPOSITION 0x00000004
502 #define STARTF_USECOUNTCHARS 0x00000008
503 #define STARTF_USEFILLATTRIBUTE 0x00000010
504 #define STARTF_RUNFULLSCREEN 0x00000020
505 #define STARTF_FORCEONFEEDBACK 0x00000040
506 #define STARTF_FORCEOFFFEEDBACK 0x00000080
507 #define STARTF_USESTDHANDLES 0x00000100
508 #define STARTF_USEHOTKEY 0x00000200
510 typedef struct _STARTUPINFOA{
511 DWORD cb; /* 00: size of struct */
512 LPSTR lpReserved; /* 04: */
513 LPSTR lpDesktop; /* 08: */
514 LPSTR lpTitle; /* 0c: */
515 DWORD dwX; /* 10: */
516 DWORD dwY; /* 14: */
517 DWORD dwXSize; /* 18: */
518 DWORD dwYSize; /* 1c: */
519 DWORD dwXCountChars; /* 20: */
520 DWORD dwYCountChars; /* 24: */
521 DWORD dwFillAttribute; /* 28: */
522 DWORD dwFlags; /* 2c: */
523 WORD wShowWindow; /* 30: */
524 WORD cbReserved2; /* 32: */
525 BYTE *lpReserved2; /* 34: */
526 HANDLE hStdInput; /* 38: */
527 HANDLE hStdOutput; /* 3c: */
528 HANDLE hStdError; /* 40: */
529 } STARTUPINFOA, *LPSTARTUPINFOA;
531 typedef struct _STARTUPINFOW{
532 DWORD cb;
533 LPWSTR lpReserved;
534 LPWSTR lpDesktop;
535 LPWSTR lpTitle;
536 DWORD dwX;
537 DWORD dwY;
538 DWORD dwXSize;
539 DWORD dwYSize;
540 DWORD dwXCountChars;
541 DWORD dwYCountChars;
542 DWORD dwFillAttribute;
543 DWORD dwFlags;
544 WORD wShowWindow;
545 WORD cbReserved2;
546 BYTE *lpReserved2;
547 HANDLE hStdInput;
548 HANDLE hStdOutput;
549 HANDLE hStdError;
550 } STARTUPINFOW, *LPSTARTUPINFOW;
552 DECL_WINELIB_TYPE_AW(STARTUPINFO)
553 DECL_WINELIB_TYPE_AW(LPSTARTUPINFO)
555 typedef struct _PROCESS_INFORMATION{
556 HANDLE hProcess;
557 HANDLE hThread;
558 DWORD dwProcessId;
559 DWORD dwThreadId;
560 } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
562 typedef struct _TIME_ZONE_INFORMATION{
563 LONG Bias;
564 WCHAR StandardName[32];
565 SYSTEMTIME StandardDate;
566 LONG StandardBias;
567 WCHAR DaylightName[32];
568 SYSTEMTIME DaylightDate;
569 LONG DaylightBias;
570 } TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
572 #define TIME_ZONE_ID_INVALID ((DWORD)0xFFFFFFFF)
573 #define TIME_ZONE_ID_UNKNOWN 0
574 #define TIME_ZONE_ID_STANDARD 1
575 #define TIME_ZONE_ID_DAYLIGHT 2
577 /* CreateProcess: dwCreationFlag values
579 #define DEBUG_PROCESS 0x00000001
580 #define DEBUG_ONLY_THIS_PROCESS 0x00000002
581 #define CREATE_SUSPENDED 0x00000004
582 #define DETACHED_PROCESS 0x00000008
583 #define CREATE_NEW_CONSOLE 0x00000010
584 #define NORMAL_PRIORITY_CLASS 0x00000020
585 #define IDLE_PRIORITY_CLASS 0x00000040
586 #define HIGH_PRIORITY_CLASS 0x00000080
587 #define REALTIME_PRIORITY_CLASS 0x00000100
588 #define CREATE_NEW_PROCESS_GROUP 0x00000200
589 #define CREATE_UNICODE_ENVIRONMENT 0x00000400
590 #define CREATE_SEPARATE_WOW_VDM 0x00000800
591 #define CREATE_SHARED_WOW_VDM 0x00001000
592 #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
593 #define CREATE_DEFAULT_ERROR_MODE 0x04000000
594 #define CREATE_NO_WINDOW 0x08000000
595 #define PROFILE_USER 0x10000000
596 #define PROFILE_KERNEL 0x20000000
597 #define PROFILE_SERVER 0x40000000
600 /* File object type definitions
602 #define FILE_TYPE_UNKNOWN 0
603 #define FILE_TYPE_DISK 1
604 #define FILE_TYPE_CHAR 2
605 #define FILE_TYPE_PIPE 3
606 #define FILE_TYPE_REMOTE 32768
608 /* File creation flags
610 #define FILE_FLAG_WRITE_THROUGH 0x80000000UL
611 #define FILE_FLAG_OVERLAPPED 0x40000000L
612 #define FILE_FLAG_NO_BUFFERING 0x20000000L
613 #define FILE_FLAG_RANDOM_ACCESS 0x10000000L
614 #define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000L
615 #define FILE_FLAG_DELETE_ON_CLOSE 0x04000000L
616 #define FILE_FLAG_BACKUP_SEMANTICS 0x02000000L
617 #define FILE_FLAG_POSIX_SEMANTICS 0x01000000L
618 #define CREATE_NEW 1
619 #define CREATE_ALWAYS 2
620 #define OPEN_EXISTING 3
621 #define OPEN_ALWAYS 4
622 #define TRUNCATE_EXISTING 5
624 /* Standard handle identifiers
626 #define STD_INPUT_HANDLE ((DWORD) -10)
627 #define STD_OUTPUT_HANDLE ((DWORD) -11)
628 #define STD_ERROR_HANDLE ((DWORD) -12)
630 typedef struct _BY_HANDLE_FILE_INFORMATION
632 DWORD dwFileAttributes;
633 FILETIME ftCreationTime;
634 FILETIME ftLastAccessTime;
635 FILETIME ftLastWriteTime;
636 DWORD dwVolumeSerialNumber;
637 DWORD nFileSizeHigh;
638 DWORD nFileSizeLow;
639 DWORD nNumberOfLinks;
640 DWORD nFileIndexHigh;
641 DWORD nFileIndexLow;
642 } BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION ;
644 #define PIPE_ACCESS_INBOUND 1
645 #define PIPE_ACCESS_OUTBOUND 2
646 #define PIPE_ACCESS_DUPLEX 3
648 #define PIPE_TYPE_BYTE 0
649 #define PIPE_TYPE_MESSAGE 4
651 #define PIPE_READMODE_BYTE 0
652 #define PIPE_READMODE_MESSAGE 2
654 #define PIPE_WAIT 0
655 #define PIPE_NOWAIT 1
657 #define PIPE_UNLIMITED_INSTANCES 255
659 #define NMPWAIT_WAIT_FOREVER 0xffffffff
660 #define NMPWAIT_NOWAIT 0x00000001
661 #define NMPWAIT_USE_DEFAULT_WAIT 0x00000000
663 typedef struct _SYSTEM_POWER_STATUS
665 BYTE ACLineStatus;
666 BYTE BatteryFlag;
667 BYTE BatteryLifePercent;
668 BYTE Reserved1;
669 DWORD BatteryLifeTime;
670 DWORD BatteryFullLifeTime;
671 } SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;
674 typedef struct tagSYSTEM_INFO
676 union {
677 DWORD dwOemId; /* Obsolete field - do not use */
678 struct {
679 WORD wProcessorArchitecture;
680 WORD wReserved;
681 } DUMMYSTRUCTNAME;
682 } DUMMYUNIONNAME;
683 DWORD dwPageSize;
684 LPVOID lpMinimumApplicationAddress;
685 LPVOID lpMaximumApplicationAddress;
686 DWORD dwActiveProcessorMask;
687 DWORD dwNumberOfProcessors;
688 DWORD dwProcessorType;
689 DWORD dwAllocationGranularity;
690 WORD wProcessorLevel;
691 WORD wProcessorRevision;
692 } SYSTEM_INFO, *LPSYSTEM_INFO;
694 typedef BOOL (CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG_PTR);
695 typedef BOOL (CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG_PTR);
696 typedef BOOL (CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG_PTR);
697 typedef BOOL (CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG_PTR);
698 typedef BOOL (CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG_PTR);
699 typedef BOOL (CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG_PTR);
701 DECL_WINELIB_TYPE_AW(ENUMRESTYPEPROC)
702 DECL_WINELIB_TYPE_AW(ENUMRESNAMEPROC)
703 DECL_WINELIB_TYPE_AW(ENUMRESLANGPROC)
705 /* flags that can be passed to LoadLibraryEx */
706 #define DONT_RESOLVE_DLL_REFERENCES 0x00000001
707 #define LOAD_LIBRARY_AS_DATAFILE 0x00000002
708 #define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
710 /* ifdef _x86_ ... */
711 typedef struct _LDT_ENTRY {
712 WORD LimitLow;
713 WORD BaseLow;
714 union {
715 struct {
716 BYTE BaseMid;
717 BYTE Flags1;/*Declare as bytes to avoid alignment problems */
718 BYTE Flags2;
719 BYTE BaseHi;
720 } Bytes;
721 struct {
722 unsigned BaseMid : 8;
723 unsigned Type : 5;
724 unsigned Dpl : 2;
725 unsigned Pres : 1;
726 unsigned LimitHi : 4;
727 unsigned Sys : 1;
728 unsigned Reserved_0 : 1;
729 unsigned Default_Big : 1;
730 unsigned Granularity : 1;
731 unsigned BaseHi : 8;
732 } Bits;
733 } HighWord;
734 } LDT_ENTRY, *LPLDT_ENTRY;
737 typedef enum _GET_FILEEX_INFO_LEVELS {
738 GetFileExInfoStandard
739 } GET_FILEEX_INFO_LEVELS;
741 typedef struct _WIN32_FILE_ATTRIBUTES_DATA {
742 DWORD dwFileAttributes;
743 FILETIME ftCreationTime;
744 FILETIME ftLastAccessTime;
745 FILETIME ftLastWriteTime;
746 DWORD nFileSizeHigh;
747 DWORD nFileSizeLow;
748 } WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;
751 * This one seems to be a Win32 only definition. It also is defined with
752 * WINAPI instead of CALLBACK in the windows headers.
754 typedef DWORD (CALLBACK *LPPROGRESS_ROUTINE)(LARGE_INTEGER, LARGE_INTEGER, LARGE_INTEGER,
755 LARGE_INTEGER, DWORD, DWORD, HANDLE,
756 HANDLE, LPVOID);
759 #define WAIT_FAILED 0xffffffff
760 #define WAIT_OBJECT_0 0
761 #define WAIT_ABANDONED STATUS_ABANDONED_WAIT_0
762 #define WAIT_ABANDONED_0 STATUS_ABANDONED_WAIT_0
763 #define WAIT_IO_COMPLETION STATUS_USER_APC
764 #define WAIT_TIMEOUT STATUS_TIMEOUT
765 #define STILL_ACTIVE STATUS_PENDING
767 #define FILE_BEGIN 0
768 #define FILE_CURRENT 1
769 #define FILE_END 2
771 #define FILE_MAP_COPY 0x00000001
772 #define FILE_MAP_WRITE 0x00000002
773 #define FILE_MAP_READ 0x00000004
774 #define FILE_MAP_ALL_ACCESS 0x000f001f
776 #define MOVEFILE_REPLACE_EXISTING 0x00000001
777 #define MOVEFILE_COPY_ALLOWED 0x00000002
778 #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
780 #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
781 #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
782 #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
783 #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
784 #define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED
785 #define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION
787 #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
788 #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
789 #define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
790 #define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
791 #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
792 #define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
793 #define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
794 #define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
795 #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
796 #define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
797 #define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
798 #define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
799 #define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
800 #define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
801 #define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
802 #define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
803 #define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
804 #define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
805 #define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
806 #define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
807 #define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
808 #define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
809 #define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
811 #define DUPLICATE_CLOSE_SOURCE 0x00000001
812 #define DUPLICATE_SAME_ACCESS 0x00000002
814 #define HANDLE_FLAG_INHERIT 0x00000001
815 #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002
817 #define HINSTANCE_ERROR 32
819 #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
820 #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
821 #define THREAD_PRIORITY_NORMAL 0
822 #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
823 #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
824 #define THREAD_PRIORITY_ERROR_RETURN (0x7fffffff)
825 #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
826 #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
828 /* flags to FormatMessage */
829 #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
830 #define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200
831 #define FORMAT_MESSAGE_FROM_STRING 0x00000400
832 #define FORMAT_MESSAGE_FROM_HMODULE 0x00000800
833 #define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000
834 #define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000
835 #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF
837 typedef struct tagCOMSTAT
839 DWORD fCtsHold : 1;
840 DWORD fDsrHold : 1;
841 DWORD fRlsdHold : 1;
842 DWORD fXoffHold : 1;
843 DWORD fXoffSent : 1;
844 DWORD fEof : 1;
845 DWORD fTxim : 1;
846 DWORD fReserved : 25;
847 DWORD cbInQue;
848 DWORD cbOutQue;
849 } COMSTAT, *LPCOMSTAT;
851 typedef struct tagDCB
853 DWORD DCBlength;
854 DWORD BaudRate;
855 unsigned fBinary :1;
856 unsigned fParity :1;
857 unsigned fOutxCtsFlow :1;
858 unsigned fOutxDsrFlow :1;
859 unsigned fDtrControl :2;
860 unsigned fDsrSensitivity :1;
861 unsigned fTXContinueOnXoff :1;
862 unsigned fOutX :1;
863 unsigned fInX :1;
864 unsigned fErrorChar :1;
865 unsigned fNull :1;
866 unsigned fRtsControl :2;
867 unsigned fAbortOnError :1;
868 unsigned fDummy2 :17;
869 WORD wReserved;
870 WORD XonLim;
871 WORD XoffLim;
872 BYTE ByteSize;
873 BYTE Parity;
874 BYTE StopBits;
875 char XonChar;
876 char XoffChar;
877 char ErrorChar;
878 char EofChar;
879 char EvtChar;
880 WORD wReserved1;
881 } DCB, *LPDCB;
883 typedef struct tagCOMMCONFIG {
884 DWORD dwSize;
885 WORD wVersion;
886 WORD wReserved;
887 DCB dcb;
888 DWORD dwProviderSubType;
889 DWORD dwProviderOffset;
890 DWORD dwProviderSize;
891 DWORD wcProviderData[1];
892 } COMMCONFIG, *LPCOMMCONFIG;
894 typedef struct tagCOMMPROP {
895 WORD wPacketLength;
896 WORD wPacketVersion;
897 DWORD dwServiceMask;
898 DWORD dwReserved1;
899 DWORD dwMaxTxQueue;
900 DWORD dwMaxRxQueue;
901 DWORD dwMaxBaud;
902 DWORD dwProvSubType;
903 DWORD dwProvCapabilities;
904 DWORD dwSettableParams;
905 DWORD dwSettableBaud;
906 WORD wSettableData;
907 WORD wSettableStopParity;
908 DWORD dwCurrentTxQueue;
909 DWORD dwCurrentRxQueue;
910 DWORD dwProvSpec1;
911 DWORD dwProvSpec2;
912 WCHAR wcProvChar[1];
913 } COMMPROP, *LPCOMMPROP;
915 #define SP_SERIALCOMM ((DWORD)1)
917 #define BAUD_075 ((DWORD)0x01)
918 #define BAUD_110 ((DWORD)0x02)
919 #define BAUD_134_5 ((DWORD)0x04)
920 #define BAUD_150 ((DWORD)0x08)
921 #define BAUD_300 ((DWORD)0x10)
922 #define BAUD_600 ((DWORD)0x20)
923 #define BAUD_1200 ((DWORD)0x40)
924 #define BAUD_1800 ((DWORD)0x80)
925 #define BAUD_2400 ((DWORD)0x100)
926 #define BAUD_4800 ((DWORD)0x200)
927 #define BAUD_7200 ((DWORD)0x400)
928 #define BAUD_9600 ((DWORD)0x800)
929 #define BAUD_14400 ((DWORD)0x1000)
930 #define BAUD_19200 ((DWORD)0x2000)
931 #define BAUD_38400 ((DWORD)0x4000)
932 #define BAUD_56K ((DWORD)0x8000)
933 #define BAUD_57600 ((DWORD)0x40000)
934 #define BAUD_115200 ((DWORD)0x20000)
935 #define BAUD_128K ((DWORD)0x10000)
936 #define BAUD_USER ((DWORD)0x10000000)
938 #define PST_FAX ((DWORD)0x21)
939 #define PST_LAT ((DWORD)0x101)
940 #define PST_MODEM ((DWORD)0x06)
941 #define PST_NETWORK_BRIDGE ((DWORD)0x100)
942 #define PST_PARALLEL_PORT ((DWORD)0x02)
943 #define PST_RS232 ((DWORD)0x01)
944 #define PST_RS442 ((DWORD)0x03)
945 #define PST_RS423 ((DWORD)0x04)
946 #define PST_RS449 ((DWORD)0x06)
947 #define PST_SCANNER ((DWORD)0x22)
948 #define PST_TCPIP_TELNET ((DWORD)0x102)
949 #define PST_UNSPECIFIED ((DWORD)0x00)
950 #define PST_X25 ((DWORD)0x103)
952 #define PCF_16BITMODE ((DWORD)0x200)
953 #define PCF_DTRDSR ((DWORD)0x01)
954 #define PCF_INTTIMEOUTS ((DWORD)0x80)
955 #define PCF_PARITY_CHECK ((DWORD)0x08)
956 #define PCF_RLSD ((DWORD)0x04)
957 #define PCF_RTSCTS ((DWORD)0x02)
958 #define PCF_SETXCHAR ((DWORD)0x20)
959 #define PCF_SPECIALCHARS ((DWORD)0x100)
960 #define PCF_TOTALTIMEOUTS ((DWORD)0x40)
961 #define PCF_XONXOFF ((DWORD)0x10)
963 #define SP_BAUD ((DWORD)0x02)
964 #define SP_DATABITS ((DWORD)0x04)
965 #define SP_HANDSHAKING ((DWORD)0x10)
966 #define SP_PARITY ((DWORD)0x01)
967 #define SP_PARITY_CHECK ((DWORD)0x20)
968 #define SP_RLSD ((DWORD)0x40)
969 #define SP_STOPBITS ((DWORD)0x08)
971 #define DATABITS_5 ((DWORD)0x01)
972 #define DATABITS_6 ((DWORD)0x02)
973 #define DATABITS_7 ((DWORD)0x04)
974 #define DATABITS_8 ((DWORD)0x08)
975 #define DATABITS_16 ((DWORD)0x10)
976 #define DATABITS_16X ((DWORD)0x20)
978 #define STOPBITS_10 ((DWORD)1)
979 #define STOPBITS_15 ((DWORD)2)
980 #define STOPBITS_20 ((DWORD)4)
982 #define PARITY_NONE ((DWORD)0x100)
983 #define PARITY_ODD ((DWORD)0x200)
984 #define PARITY_EVEN ((DWORD)0x400)
985 #define PARITY_MARK ((DWORD)0x800)
986 #define PARITY_SPACE ((DWORD)0x1000)
988 typedef struct tagCOMMTIMEOUTS {
989 DWORD ReadIntervalTimeout;
990 DWORD ReadTotalTimeoutMultiplier;
991 DWORD ReadTotalTimeoutConstant;
992 DWORD WriteTotalTimeoutMultiplier;
993 DWORD WriteTotalTimeoutConstant;
994 } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
996 typedef void (CALLBACK *PAPCFUNC)(ULONG_PTR);
997 typedef void (CALLBACK *PTIMERAPCROUTINE)(LPVOID,DWORD,DWORD);
999 typedef enum _COMPUTER_NAME_FORMAT
1001 ComputerNameNetBIOS,
1002 ComputerNameDnsHostname,
1003 ComputerNameDnsDomain,
1004 ComputerNameDnsFullyQualified,
1005 ComputerNamePhysicalNetBIOS,
1006 ComputerNamePhysicalDnsHostname,
1007 ComputerNamePhysicalDnsDomain,
1008 ComputerNamePhysicalDnsFullyQualified,
1009 ComputerNameMax
1010 } COMPUTER_NAME_FORMAT;
1012 #define HW_PROFILE_GUIDLEN 39
1013 #define MAX_PROFILE_LEN 80
1015 #define DOCKINFO_UNDOCKED 0x1
1016 #define DOCKINFO_DOCKED 0x2
1017 #define DOCKINFO_USER_SUPPLIED 0x4
1018 #define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_UNDOCKED)
1019 #define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_DOCKED)
1021 typedef struct tagHW_PROFILE_INFOA {
1022 DWORD dwDockInfo;
1023 CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
1024 CHAR szHwProfileName[MAX_PROFILE_LEN];
1025 } HW_PROFILE_INFOA, *LPHW_PROFILE_INFOA;
1027 typedef struct tagHW_PROFILE_INFOW {
1028 DWORD dwDockInfo;
1029 WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
1030 WCHAR szHwProfileName[MAX_PROFILE_LEN];
1031 } HW_PROFILE_INFOW, *LPHW_PROFILE_INFOW;
1033 DECL_WINELIB_TYPE_AW(HW_PROFILE_INFO)
1034 DECL_WINELIB_TYPE_AW(LPHW_PROFILE_INFO)
1036 /* Stream data structures and defines */
1037 /*the types of backup data -- WIN32_STREAM_ID.dwStreamId below*/
1038 #define BACKUP_INVALID 0
1039 #define BACKUP_DATA 1
1040 #define BACKUP_EA_DATA 2
1041 #define BACKUP_SECURITY_DATA 3
1042 #define BACKUP_ALTERNATE_DATA 4
1043 #define BACKUP_LINK 5
1044 #define BACKUP_PROPERTY_DATA 6
1045 #define BACKUP_OBJECT_ID 7
1046 #define BACKUP_REPARSE_DATA 8
1047 #define BACKUP_SPARSE_BLOCK 9
1049 /*flags for WIN32_STREAM_ID.dwStreamAttributes below*/
1050 #define STREAM_NORMAL_ATTRIBUTE 0
1051 #define STREAM_MODIFIED_WHEN_READ 1
1052 #define STREAM_CONTAINS_SECURITY 2
1053 #define STREAM_CONTAINS_PROPERTIES 4
1054 #define STREAM_SPARSE_ATTRIBUTE 8
1056 typedef struct _WIN32_STREAM_ID {
1057 DWORD dwStreamId;
1058 DWORD dwStreamAttributes;
1059 LARGE_INTEGER Size;
1060 DWORD dwStreamNameSize;
1061 WCHAR cStreamName[ANYSIZE_ARRAY];
1062 } WIN32_STREAM_ID, *LPWIN32_STREAM_ID;
1064 void WINAPI InitializeCriticalSection(CRITICAL_SECTION *lpCrit);
1065 BOOL WINAPI InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION *,DWORD);
1066 void WINAPI DeleteCriticalSection(CRITICAL_SECTION *lpCrit);
1067 void WINAPI EnterCriticalSection(CRITICAL_SECTION *lpCrit);
1068 BOOL WINAPI TryEnterCriticalSection(CRITICAL_SECTION *lpCrit);
1069 void WINAPI LeaveCriticalSection(CRITICAL_SECTION *lpCrit);
1070 void WINAPI MakeCriticalSectionGlobal(CRITICAL_SECTION *lpCrit);
1071 BOOL WINAPI GetProcessWorkingSetSize(HANDLE,PSIZE_T,PSIZE_T);
1072 DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,ULONG_PTR);
1073 void WINAPI RaiseException(DWORD,DWORD,DWORD,const LPDWORD);
1074 BOOL WINAPI SetProcessWorkingSetSize(HANDLE,SIZE_T,SIZE_T);
1075 BOOL WINAPI TerminateProcess(HANDLE,DWORD);
1076 BOOL WINAPI TerminateThread(HANDLE,DWORD);
1077 BOOL WINAPI GetExitCodeThread(HANDLE,LPDWORD);
1079 /* GetBinaryType return values.
1082 #define SCS_32BIT_BINARY 0
1083 #define SCS_DOS_BINARY 1
1084 #define SCS_WOW_BINARY 2
1085 #define SCS_PIF_BINARY 3
1086 #define SCS_POSIX_BINARY 4
1087 #define SCS_OS216_BINARY 5
1089 BOOL WINAPI GetBinaryTypeA( LPCSTR lpApplicationName, LPDWORD lpBinaryType );
1090 BOOL WINAPI GetBinaryTypeW( LPCWSTR lpApplicationName, LPDWORD lpBinaryType );
1091 #define GetBinaryType WINELIB_NAME_AW(GetBinaryType)
1093 /* flags for DefineDosDevice */
1094 #define DDD_RAW_TARGET_PATH 0x00000001
1095 #define DDD_REMOVE_DEFINITION 0x00000002
1096 #define DDD_EXACT_MATCH_ON_REMOVE 0x00000004
1097 #define DDD_NO_BROADCAST_SYSTEM 0x00000008
1098 #define DDD_LUID_BROADCAST_DRIVE 0x00000010
1100 BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
1101 PVOID WINAPI AddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
1102 BOOL WINAPI AttachThreadInput(DWORD,DWORD,BOOL);
1103 BOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR,HANDLE,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,LPDWORD,LPDWORD,LPBOOL);
1104 BOOL WINAPI AdjustTokenPrivileges(HANDLE,BOOL,LPVOID,DWORD,LPVOID,LPDWORD);
1105 BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
1106 BOOL WINAPI AllocateLocallyUniqueId(PLUID);
1107 BOOL WINAPI AreFileApisANSI(void);
1108 BOOL WINAPI BackupEventLogA(HANDLE,LPCSTR);
1109 BOOL WINAPI BackupEventLogW(HANDLE,LPCWSTR);
1110 #define BackupEventLog WINELIB_NAME_AW(BackupEventLog)
1111 BOOL WINAPI BackupRead(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
1112 BOOL WINAPI BackupSeek(HANDLE,DWORD,DWORD,LPDWORD,LPDWORD,LPVOID*);
1113 BOOL WINAPI BackupWrite(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
1114 BOOL WINAPI Beep(DWORD,DWORD);
1115 HANDLE WINAPI BeginUpdateResourceA(LPCSTR,BOOL);
1116 HANDLE WINAPI BeginUpdateResourceW(LPCWSTR,BOOL);
1117 #define BeginUpdateResource WINELIB_NAME_AW(BeginUpdateResource)
1118 BOOL WINAPI BuildCommDCBA(LPCSTR,LPDCB);
1119 BOOL WINAPI BuildCommDCBW(LPCWSTR,LPDCB);
1120 #define BuildCommDCB WINELIB_NAME_AW(BuildCommDCB)
1121 BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR,LPDCB,LPCOMMTIMEOUTS);
1122 BOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR,LPDCB,LPCOMMTIMEOUTS);
1123 #define BuildCommDCBAndTimeouts WINELIB_NAME_AW(BuildCommDCBAndTimeouts)
1124 BOOL WINAPI CallNamedPipeA(LPCSTR,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,DWORD);
1125 BOOL WINAPI CallNamedPipeW(LPCWSTR,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,DWORD);
1126 #define CallNamedPipe WINELIB_NAME_AW(CallNamedPipe)
1127 BOOL WINAPI CancelIo(HANDLE);
1128 BOOL WINAPI CancelWaitableTimer(HANDLE);
1129 BOOL WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL);
1130 BOOL WINAPI ClearCommBreak(HANDLE);
1131 BOOL WINAPI ClearCommError(HANDLE,LPDWORD,LPCOMSTAT);
1132 BOOL WINAPI ClearEventLogA(HANDLE,LPCSTR);
1133 BOOL WINAPI ClearEventLogW(HANDLE,LPCWSTR);
1134 #define ClearEventLog WINELIB_NAME_AW(ClearEventLog)
1135 BOOL WINAPI CloseEventLog(HANDLE);
1136 BOOL WINAPI CloseHandle(HANDLE);
1137 BOOL WINAPI CommConfigDialogA(LPCSTR,HANDLE,LPCOMMCONFIG);
1138 BOOL WINAPI CommConfigDialogW(LPCWSTR,HANDLE,LPCOMMCONFIG);
1139 #define CommConfigDialog WINELIB_NAME_AW(CommConfigDialog)
1140 BOOL WINAPI ConnectNamedPipe(HANDLE,LPOVERLAPPED);
1141 BOOL WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD);
1142 HANDLE WINAPI ConvertToGlobalHandle(HANDLE hSrc);
1143 BOOL WINAPI CopyFileA(LPCSTR,LPCSTR,BOOL);
1144 BOOL WINAPI CopyFileW(LPCWSTR,LPCWSTR,BOOL);
1145 #define CopyFile WINELIB_NAME_AW(CopyFile)
1146 BOOL WINAPI CopyFileExA(LPCSTR, LPCSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
1147 BOOL WINAPI CopyFileExW(LPCWSTR, LPCWSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
1148 #define CopyFileEx WINELIB_NAME_AW(CopyFileEx)
1149 BOOL WINAPI CopySid(DWORD,PSID,PSID);
1150 INT WINAPI CompareFileTime(const FILETIME*,const FILETIME*);
1151 BOOL WINAPI ConvertFiberToThread(void);
1152 LPVOID WINAPI ConvertThreadToFiber(LPVOID);
1153 LPVOID WINAPI ConvertThreadToFiberEx(LPVOID,DWORD);
1154 HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCSTR);
1155 HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCWSTR);
1156 #define CreateEvent WINELIB_NAME_AW(CreateEvent)
1157 LPVOID WINAPI CreateFiber(SIZE_T,LPFIBER_START_ROUTINE,LPVOID);
1158 LPVOID WINAPI CreateFiberEx(SIZE_T,SIZE_T,DWORD,LPFIBER_START_ROUTINE,LPVOID);
1159 HANDLE WINAPI CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE);
1160 HANDLE WINAPI CreateFileW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE);
1161 #define CreateFile WINELIB_NAME_AW(CreateFile)
1162 HANDLE WINAPI CreateFileMappingA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCSTR);
1163 HANDLE WINAPI CreateFileMappingW(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCWSTR);
1164 #define CreateFileMapping WINELIB_NAME_AW(CreateFileMapping)
1165 HANDLE WINAPI CreateMailslotA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
1166 HANDLE WINAPI CreateMailslotW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
1167 #define CreateMailslot WINELIB_NAME_AW(CreateMailslot)
1168 HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
1169 HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
1170 #define CreateMutex WINELIB_NAME_AW(CreateMutex)
1171 HANDLE WINAPI CreateNamedPipeA(LPCSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
1172 HANDLE WINAPI CreateNamedPipeW(LPCWSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
1173 #define CreateNamedPipe WINELIB_NAME_AW(CreateNamedPipe)
1174 BOOL WINAPI CreatePipe(PHANDLE,PHANDLE,LPSECURITY_ATTRIBUTES,DWORD);
1175 BOOL WINAPI CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,
1176 LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCSTR,
1177 LPSTARTUPINFOA,LPPROCESS_INFORMATION);
1178 BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,
1179 LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCWSTR,
1180 LPSTARTUPINFOW,LPPROCESS_INFORMATION);
1181 #define CreateProcess WINELIB_NAME_AW(CreateProcess)
1182 HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
1183 HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR);
1184 HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR);
1185 #define CreateSemaphore WINELIB_NAME_AW(CreateSemaphore)
1186 DWORD WINAPI CreateTapePartition(HANDLE,DWORD,DWORD,DWORD);
1187 HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
1188 HANDLE WINAPI CreateTimerQueue(void);
1189 BOOL WINAPI CreateTimerQueueTimer(PHANDLE,HANDLE,WAITORTIMERCALLBACK,PVOID,DWORD,DWORD,ULONG);
1190 HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
1191 HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
1192 #define CreateWaitableTimer WINELIB_NAME_AW(CreateWaitableTimer)
1193 BOOL WINAPI DebugActiveProcess(DWORD);
1194 BOOL WINAPI DebugActiveProcessStop(DWORD);
1195 void WINAPI DebugBreak(void);
1196 BOOL WINAPI DebugBreakProcess(HANDLE);
1197 BOOL WINAPI DebugSetProcessKillOnExit(BOOL);
1198 BOOL WINAPI DefineDosDeviceA(DWORD,LPCSTR,LPCSTR);
1199 BOOL WINAPI DefineDosDeviceW(DWORD,LPCWSTR,LPCWSTR);
1200 #define DefineDosDevice WINELIB_NAME_AW(DefineDosDevice)
1201 BOOL WINAPI DeleteAce(PACL,DWORD);
1202 void WINAPI DeleteFiber(LPVOID);
1203 BOOL WINAPI DeleteTimerQueueEx(HANDLE,HANDLE);
1204 BOOL WINAPI DeleteTimerQueueTimer(HANDLE,HANDLE,HANDLE);
1205 BOOL WINAPI DeleteVolumeMountPointA(LPCSTR);
1206 BOOL WINAPI DeleteVolumeMountPointW(LPCWSTR);
1207 #define DeleteVolumeMountPoint WINELIB_NAME_AW(DeleteVolumeMountPoint)
1208 BOOL WINAPI DeregisterEventSource(HANDLE);
1209 BOOL WINAPI DeviceIoControl(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
1210 BOOL WINAPI DisableThreadLibraryCalls(HMODULE);
1211 BOOL WINAPI DisconnectNamedPipe(HANDLE);
1212 BOOL WINAPI DnsHostnameToComputerNameA(LPCSTR,LPSTR,LPDWORD);
1213 BOOL WINAPI DnsHostnameToComputerNameW(LPCWSTR,LPWSTR,LPDWORD);
1214 #define DnsHostnameToComputerName WINELIB_NAME_AW(DnsHostnameToComputerName)
1215 BOOL WINAPI DosDateTimeToFileTime(WORD,WORD,LPFILETIME);
1216 BOOL WINAPI DuplicateHandle(HANDLE,HANDLE,HANDLE,HANDLE*,DWORD,BOOL,DWORD);
1217 BOOL WINAPI EscapeCommFunction(HANDLE,UINT);
1218 BOOL WINAPI EndUpdateResourceA(HANDLE,BOOL);
1219 BOOL WINAPI EndUpdateResourceW(HANDLE,BOOL);
1220 #define EndUpdateResource WINELIB_NAME_AW(EndUpdateResource)
1221 BOOL WINAPI EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,ENUMRESLANGPROCA,LONG_PTR);
1222 BOOL WINAPI EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,ENUMRESLANGPROCW,LONG_PTR);
1223 #define EnumResourceLanguages WINELIB_NAME_AW(EnumResourceLanguages)
1224 BOOL WINAPI EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROCA,LONG_PTR);
1225 BOOL WINAPI EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROCW,LONG_PTR);
1226 #define EnumResourceNames WINELIB_NAME_AW(EnumResourceNames)
1227 BOOL WINAPI EnumResourceTypesA(HMODULE,ENUMRESTYPEPROCA,LONG_PTR);
1228 BOOL WINAPI EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG_PTR);
1229 #define EnumResourceTypes WINELIB_NAME_AW(EnumResourceTypes)
1230 BOOL WINAPI EqualSid(PSID, PSID);
1231 BOOL WINAPI EqualPrefixSid(PSID,PSID);
1232 DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL);
1233 VOID DECLSPEC_NORETURN WINAPI ExitProcess(DWORD);
1234 VOID DECLSPEC_NORETURN WINAPI ExitThread(DWORD);
1235 DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
1236 DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
1237 #define ExpandEnvironmentStrings WINELIB_NAME_AW(ExpandEnvironmentStrings)
1238 BOOL WINAPI FileTimeToDosDateTime(const FILETIME*,LPWORD,LPWORD);
1239 BOOL WINAPI FileTimeToLocalFileTime(const FILETIME*,LPFILETIME);
1240 BOOL WINAPI FileTimeToSystemTime(const FILETIME*,LPSYSTEMTIME);
1241 HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR,BOOL,DWORD);
1242 HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR,BOOL,DWORD);
1243 #define FindFirstChangeNotification WINELIB_NAME_AW(FindFirstChangeNotification)
1244 BOOL WINAPI FindNextChangeNotification(HANDLE);
1245 BOOL WINAPI FindCloseChangeNotification(HANDLE);
1246 HRSRC WINAPI FindResourceExA(HMODULE,LPCSTR,LPCSTR,WORD);
1247 HRSRC WINAPI FindResourceExW(HMODULE,LPCWSTR,LPCWSTR,WORD);
1248 #define FindResourceEx WINELIB_NAME_AW(FindResourceEx)
1249 HANDLE WINAPI FindFirstVolumeA(LPSTR,DWORD);
1250 HANDLE WINAPI FindFirstVolumeW(LPWSTR,DWORD);
1251 #define FindFirstVolume WINELIB_NAME_AW(FindFirstVolume)
1252 HANDLE WINAPI FindFirstVolumeMountPointA(LPCSTR,LPSTR,DWORD);
1253 HANDLE WINAPI FindFirstVolumeMountPointW(LPCWSTR,LPWSTR,DWORD);
1254 #define FindFirstVolumeMountPoint WINELIB_NAME_AW(FindFirstVolumeMountPoint)
1255 BOOL WINAPI FindNextVolumeA(HANDLE,LPSTR,DWORD);
1256 BOOL WINAPI FindNextVolumeW(HANDLE,LPWSTR,DWORD);
1257 #define FindNextVolume WINELIB_NAME_AW(FindNextVolume)
1258 BOOL WINAPI FindNextVolumeMountPointA(HANDLE,LPSTR,DWORD);
1259 BOOL WINAPI FindNextVolumeMountPointW(HANDLE,LPWSTR,DWORD);
1260 #define FindNextVolumeMountPoint WINELIB_NAME_AW(FindNextVolumeMountPoint)
1261 BOOL WINAPI FindVolumeClose(HANDLE);
1262 BOOL WINAPI FindVolumeMountPointClose(HANDLE);
1263 BOOL WINAPI FlushFileBuffers(HANDLE);
1264 BOOL WINAPI FlushViewOfFile(LPCVOID,SIZE_T);
1265 DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
1266 DWORD WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
1267 #define FormatMessage WINELIB_NAME_AW(FormatMessage)
1268 BOOL WINAPI FreeEnvironmentStringsA(LPSTR);
1269 BOOL WINAPI FreeEnvironmentStringsW(LPWSTR);
1270 #define FreeEnvironmentStrings WINELIB_NAME_AW(FreeEnvironmentStrings)
1271 VOID WINAPI FreeLibraryAndExitThread(HINSTANCE,DWORD);
1272 PVOID WINAPI FreeSid(PSID);
1273 BOOL WINAPI GetCommConfig(HANDLE,LPCOMMCONFIG,LPDWORD);
1274 BOOL WINAPI GetCommMask(HANDLE,LPDWORD);
1275 BOOL WINAPI GetCommModemStatus(HANDLE,LPDWORD);
1276 BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP);
1277 BOOL WINAPI GetCommState(HANDLE,LPDCB);
1278 BOOL WINAPI GetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
1279 LPSTR WINAPI GetCommandLineA(void);
1280 LPWSTR WINAPI GetCommandLineW(void);
1281 #define GetCommandLine WINELIB_NAME_AW(GetCommandLine)
1282 DWORD WINAPI GetCompressedFileSizeA(LPCSTR,LPDWORD);
1283 DWORD WINAPI GetCompressedFileSizeW(LPCWSTR,LPDWORD);
1284 #define GetCompressedFileSize WINELIB_NAME_AW(GetCompressedFileSize)
1285 BOOL WINAPI GetComputerNameA(LPSTR,LPDWORD);
1286 BOOL WINAPI GetComputerNameW(LPWSTR,LPDWORD);
1287 #define GetComputerName WINELIB_NAME_AW(GetComputerName)
1288 BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
1289 BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD);
1290 #define GetComputerNameEx WINELIB_NAME_AW(GetComputerNameEx)
1291 HANDLE WINAPI GetCurrentProcess(void);
1292 HANDLE WINAPI GetCurrentThread(void);
1293 BOOL WINAPI GetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,LPDWORD);
1294 BOOL WINAPI GetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,LPDWORD);
1295 #define GetDefaultCommConfig WINELIB_NAME_AW(GetDefaultCommConfig)
1296 LPSTR WINAPI GetEnvironmentStringsA(void);
1297 LPWSTR WINAPI GetEnvironmentStringsW(void);
1298 #define GetEnvironmentStrings WINELIB_NAME_AW(GetEnvironmentStrings)
1299 DWORD WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD);
1300 DWORD WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD);
1301 #define GetEnvironmentVariable WINELIB_NAME_AW(GetEnvironmentVariable)
1302 BOOL WINAPI GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
1303 BOOL WINAPI GetFileAttributesExW(LPCWSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
1304 #define GetFileAttributesEx WINELIB_NAME_AW(GetFileAttributesEx)
1305 DWORD WINAPI GetFileInformationByHandle(HANDLE,BY_HANDLE_FILE_INFORMATION*);
1306 BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
1307 BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
1308 #define GetFileSecurity WINELIB_NAME_AW(GetFileSecurity)
1309 DWORD WINAPI GetFileSize(HANDLE,LPDWORD);
1310 BOOL WINAPI GetFileSizeEx(HANDLE,PLARGE_INTEGER);
1311 BOOL WINAPI GetFileTime(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME);
1312 DWORD WINAPI GetFileType(HANDLE);
1313 DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*);
1314 DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
1315 #define GetFullPathName WINELIB_NAME_AW(GetFullPathName)
1316 BOOL WINAPI GetHandleInformation(HANDLE,LPDWORD);
1317 DWORD WINAPI GetLengthSid(PSID);
1318 VOID WINAPI GetLocalTime(LPSYSTEMTIME);
1319 DWORD WINAPI GetLogicalDrives(void);
1320 DWORD WINAPI GetLongPathNameA(LPCSTR,LPSTR,DWORD);
1321 DWORD WINAPI GetLongPathNameW(LPCWSTR,LPWSTR,DWORD);
1322 #define GetLongPathName WINELIB_NAME_AW(GetLongPathName)
1323 BOOL WINAPI GetMailslotInfo(HANDLE,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1324 BOOL WINAPI GetNamedPipeHandleStateA(HANDLE,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPSTR,DWORD);
1325 BOOL WINAPI GetNamedPipeHandleStateW(HANDLE,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPWSTR,DWORD);
1326 #define GetNamedPipeHandleState WINELIB_NAME_AW(GetNamedPipeHandleState)
1327 BOOL WINAPI GetNumberOfEventLogRecords(HANDLE,PDWORD);
1328 BOOL WINAPI GetOldestEventLogRecord(HANDLE,PDWORD);
1329 DWORD WINAPI GetPriorityClass(HANDLE);
1330 BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD,PDWORD);
1331 BOOL WINAPI GetProcessTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
1332 DWORD WINAPI GetProcessVersion(DWORD);
1333 BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
1334 BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL *,LPBOOL);
1335 BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID *,LPBOOL);
1336 DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR);
1337 BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID *,LPBOOL);
1338 BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL *,LPBOOL);
1339 PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID);
1340 DWORD WINAPI GetSidLengthRequired(BYTE);
1341 PDWORD WINAPI GetSidSubAuthority(PSID,DWORD);
1342 PUCHAR WINAPI GetSidSubAuthorityCount(PSID);
1343 DWORD WINAPI GetShortPathNameA(LPCSTR,LPSTR,DWORD);
1344 DWORD WINAPI GetShortPathNameW(LPCWSTR,LPWSTR,DWORD);
1345 #define GetShortPathName WINELIB_NAME_AW(GetShortPathName)
1346 HANDLE WINAPI GetStdHandle(DWORD);
1347 VOID WINAPI GetSystemInfo(LPSYSTEM_INFO);
1348 BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
1349 VOID WINAPI GetSystemTime(LPSYSTEMTIME);
1350 BOOL WINAPI GetSystemTimeAdjustment(PDWORD,PDWORD,PBOOL);
1351 VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME);
1352 DWORD WINAPI GetTapeParameters(HANDLE,DWORD,LPDWORD,LPVOID);
1353 DWORD WINAPI GetTapePosition(HANDLE,DWORD,LPDWORD,LPDWORD,LPDWORD);
1354 DWORD WINAPI GetTapeStatus(HANDLE);
1355 DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
1356 BOOL WINAPI GetThreadContext(HANDLE,CONTEXT *);
1357 INT WINAPI GetThreadPriority(HANDLE);
1358 BOOL WINAPI GetThreadPriorityBoost(HANDLE,PBOOL);
1359 BOOL WINAPI GetThreadSelectorEntry(HANDLE,DWORD,LPLDT_ENTRY);
1360 BOOL WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
1361 BOOL WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,LPVOID,DWORD,LPDWORD);
1362 BOOL WINAPI GetUserNameA(LPSTR,LPDWORD);
1363 BOOL WINAPI GetUserNameW(LPWSTR,LPDWORD);
1364 #define GetUserName WINELIB_NAME_AW(GetUserName)
1365 BOOL WINAPI GetVolumeNameForVolumeMountPointA(LPCSTR,LPSTR,DWORD);
1366 BOOL WINAPI GetVolumeNameForVolumeMountPointW(LPCWSTR,LPWSTR,DWORD);
1367 #define GetVolumeNameForVolumeMountPoint WINELIB_NAME_AW(GetVolumeNameForVolumeMountPoint)
1368 BOOL WINAPI GetVolumePathNameA(LPCSTR,LPSTR,DWORD);
1369 BOOL WINAPI GetVolumePathNameW(LPCWSTR,LPWSTR,DWORD);
1370 #define GetVolumePathName WINELIB_NAME_AW(GetVolumePathName)
1371 BOOL WINAPI GetVolumePathNamesForVolumeNameA(LPCSTR,LPSTR,DWORD,PDWORD);
1372 BOOL WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR,LPWSTR,DWORD,PDWORD);
1373 #define GetVolumePathNamesForVolumeName WINELIB_NAME_AW(GetVolumePathNamesForVolumeName)
1374 VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS);
1375 LPVOID WINAPI HeapAlloc(HANDLE,DWORD,SIZE_T);
1376 SIZE_T WINAPI HeapCompact(HANDLE,DWORD);
1377 HANDLE WINAPI HeapCreate(DWORD,SIZE_T,SIZE_T);
1378 BOOL WINAPI HeapDestroy(HANDLE);
1379 BOOL WINAPI HeapFree(HANDLE,DWORD,LPVOID);
1380 BOOL WINAPI HeapLock(HANDLE);
1381 LPVOID WINAPI HeapReAlloc(HANDLE,DWORD,LPVOID,SIZE_T);
1382 SIZE_T WINAPI HeapSize(HANDLE,DWORD,LPVOID);
1383 BOOL WINAPI HeapUnlock(HANDLE);
1384 BOOL WINAPI HeapValidate(HANDLE,DWORD,LPCVOID);
1385 BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
1386 DWORD WINAPI InitializeAcl(PACL,DWORD,DWORD);
1387 BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
1388 BOOL WINAPI InitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
1389 BOOL WINAPI IsSystemResumeAutomatic(void);
1390 BOOL WINAPI IsTextUnicode(CONST LPVOID lpBuffer, int cb, LPINT lpi);
1391 BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
1392 BOOL WINAPI IsValidSid(PSID);
1393 BOOL WINAPI ImpersonateLoggedOnUser(HANDLE);
1394 BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
1395 BOOL WINAPI IsProcessorFeaturePresent(DWORD);
1396 BOOL WINAPI LookupAccountSidA(LPCSTR,PSID,LPSTR,LPDWORD,LPSTR,LPDWORD,PSID_NAME_USE);
1397 BOOL WINAPI LookupAccountSidW(LPCWSTR,PSID,LPWSTR,LPDWORD,LPWSTR,LPDWORD,PSID_NAME_USE);
1398 #define LookupAccountSid WINELIB_NAME_AW(LookupAccountSid)
1399 BOOL WINAPI LocalFileTimeToFileTime(const FILETIME*,LPFILETIME);
1400 BOOL WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1401 BOOL WINAPI LockFileEx(HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED);
1402 BOOL WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,PLUID);
1403 BOOL WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,PLUID);
1404 #define LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
1405 BOOL WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD,
1406 PACL,LPDWORD,PACL,LPDWORD,PSID,LPDWORD,PSID,LPDWORD);
1407 BOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
1408 HMODULE WINAPI MapHModuleSL(WORD);
1409 WORD WINAPI MapHModuleLS(HMODULE);
1410 LPVOID WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,SIZE_T);
1411 LPVOID WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,SIZE_T,LPVOID);
1412 BOOL WINAPI MoveFileA(LPCSTR,LPCSTR);
1413 BOOL WINAPI MoveFileW(LPCWSTR,LPCWSTR);
1414 #define MoveFile WINELIB_NAME_AW(MoveFile)
1415 BOOL WINAPI MoveFileExA(LPCSTR,LPCSTR,DWORD);
1416 BOOL WINAPI MoveFileExW(LPCWSTR,LPCWSTR,DWORD);
1417 #define MoveFileEx WINELIB_NAME_AW(MoveFileEx)
1418 BOOL WINAPI NotifyChangeEventLog(HANDLE,HANDLE);
1419 HANDLE WINAPI OpenBackupEventLogA(LPCSTR,LPCSTR);
1420 HANDLE WINAPI OpenBackupEventLogW(LPCWSTR,LPCWSTR);
1421 #define OpenBackupEventLog WINELIB_NAME_AW(OpenBackupEventLog)
1422 HANDLE WINAPI OpenEventA(DWORD,BOOL,LPCSTR);
1423 HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR);
1424 #define OpenEvent WINELIB_NAME_AW(OpenEvent)
1425 HANDLE WINAPI OpenEventLogA(LPCSTR,LPCSTR);
1426 HANDLE WINAPI OpenEventLogW(LPCWSTR,LPCWSTR);
1427 #define OpenEventLog WINELIB_NAME_AW(OpenEventLog)
1428 HANDLE WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR);
1429 HANDLE WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR);
1430 #define OpenFileMapping WINELIB_NAME_AW(OpenFileMapping)
1431 HANDLE WINAPI OpenMutexA(DWORD,BOOL,LPCSTR);
1432 HANDLE WINAPI OpenMutexW(DWORD,BOOL,LPCWSTR);
1433 #define OpenMutex WINELIB_NAME_AW(OpenMutex)
1434 HANDLE WINAPI OpenProcess(DWORD,BOOL,DWORD);
1435 BOOL WINAPI OpenProcessToken(HANDLE,DWORD,PHANDLE);
1436 HANDLE WINAPI OpenSemaphoreA(DWORD,BOOL,LPCSTR);
1437 HANDLE WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR);
1438 #define OpenSemaphore WINELIB_NAME_AW(OpenSemaphore)
1439 HANDLE WINAPI OpenThread(DWORD,BOOL,DWORD);
1440 BOOL WINAPI OpenThreadToken(HANDLE,DWORD,BOOL,PHANDLE);
1441 HANDLE WINAPI OpenWaitableTimerA(DWORD,BOOL,LPCSTR);
1442 HANDLE WINAPI OpenWaitableTimerW(DWORD,BOOL,LPCWSTR);
1443 #define OpenWaitableTimer WINELIB_NAME_AW(OpenWaitableTimer)
1444 BOOL WINAPI PeekNamedPipe(HANDLE,PVOID,DWORD,PDWORD,PDWORD,PDWORD);
1445 DWORD WINAPI PrepareTape(HANDLE,DWORD,BOOL);
1446 BOOL WINAPI PulseEvent(HANDLE);
1447 BOOL WINAPI PurgeComm(HANDLE,DWORD);
1448 DWORD WINAPI QueryDosDeviceA(LPCSTR,LPSTR,DWORD);
1449 DWORD WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
1450 #define QueryDosDevice WINELIB_NAME_AW(QueryDosDevice)
1451 BOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER*);
1452 BOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER*);
1453 BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
1454 BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
1455 #define ReadEventLog WINELIB_NAME_AW(ReadEventLog)
1456 BOOL WINAPI ReadFile(HANDLE,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
1457 BOOL WINAPI ReadFileEx(HANDLE,LPVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
1458 HANDLE WINAPI RegisterEventSourceA(LPCSTR,LPCSTR);
1459 HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
1460 #define RegisterEventSource WINELIB_NAME_AW(RegisterEventSource)
1461 BOOL WINAPI ReleaseMutex(HANDLE);
1462 BOOL WINAPI ReleaseSemaphore(HANDLE,LONG,LPLONG);
1463 ULONG WINAPI RemoveVectoredExceptionHandler(PVOID);
1464 BOOL WINAPI ReportEventA(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCSTR *,LPVOID);
1465 BOOL WINAPI ReportEventW(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCWSTR *,LPVOID);
1466 BOOL WINAPI RequestWakeupLatency(LATENCY_TIME latency);
1467 #define ReportEvent WINELIB_NAME_AW(ReportEvent)
1468 BOOL WINAPI ResetEvent(HANDLE);
1469 DWORD WINAPI ResumeThread(HANDLE);
1470 BOOL WINAPI RevertToSelf(void);
1471 DWORD WINAPI SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*);
1472 DWORD WINAPI SearchPathW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPWSTR*);
1473 #define SearchPath WINELIB_NAME_AW(SearchPath)
1474 BOOL WINAPI SetCommConfig(HANDLE,LPCOMMCONFIG,DWORD);
1475 BOOL WINAPI SetCommBreak(HANDLE);
1476 BOOL WINAPI SetCommMask(HANDLE,DWORD);
1477 BOOL WINAPI SetCommState(HANDLE,LPDCB);
1478 BOOL WINAPI SetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
1479 BOOL WINAPI SetComputerNameA(LPCSTR);
1480 BOOL WINAPI SetComputerNameW(LPCWSTR);
1481 #define SetComputerName WINELIB_NAME_AW(SetComputerName)
1482 BOOL WINAPI SetComputerNameExA(COMPUTER_NAME_FORMAT,LPCSTR);
1483 BOOL WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT,LPCWSTR);
1484 #define SetComputerNameEx WINELIB_NAME_AW(SetComputerNameEx)
1485 BOOL WINAPI SetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,DWORD);
1486 BOOL WINAPI SetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,DWORD);
1487 #define SetDefaultCommConfig WINELIB_NAME_AW(SetDefaultCommConfig)
1488 BOOL WINAPI SetEndOfFile(HANDLE);
1489 BOOL WINAPI SetEnvironmentVariableA(LPCSTR,LPCSTR);
1490 BOOL WINAPI SetEnvironmentVariableW(LPCWSTR,LPCWSTR);
1491 #define SetEnvironmentVariable WINELIB_NAME_AW(SetEnvironmentVariable)
1492 BOOL WINAPI SetEvent(HANDLE);
1493 VOID WINAPI SetFileApisToANSI(void);
1494 VOID WINAPI SetFileApisToOEM(void);
1495 DWORD WINAPI SetFilePointer(HANDLE,LONG,LPLONG,DWORD);
1496 BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1497 BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1498 #define SetFileSecurity WINELIB_NAME_AW(SetFileSecurity)
1499 BOOL WINAPI SetFileTime(HANDLE,const FILETIME*,const FILETIME*,const FILETIME*);
1500 BOOL WINAPI SetHandleInformation(HANDLE,DWORD,DWORD);
1501 BOOL WINAPI SetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1502 BOOL WINAPI SetLocalTime(const SYSTEMTIME*);
1503 BOOL WINAPI SetMailslotInfo(HANDLE,DWORD);
1504 BOOL WINAPI SetNamedPipeHandleState(HANDLE,LPDWORD,LPDWORD,LPDWORD);
1505 BOOL WINAPI SetPriorityClass(HANDLE,DWORD);
1506 BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD_PTR);
1507 BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
1508 BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL);
1509 BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID,BOOL);
1510 BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
1511 BOOL WINAPI SetStdHandle(DWORD,HANDLE);
1512 BOOL WINAPI SetSystemPowerState(BOOL,BOOL);
1513 BOOL WINAPI SetSystemTime(const SYSTEMTIME*);
1514 DWORD WINAPI SetTapeParameters(HANDLE,DWORD,LPVOID);
1515 DWORD WINAPI SetTapePosition(HANDLE,DWORD,DWORD,DWORD,DWORD,BOOL);
1516 DWORD WINAPI SetThreadAffinityMask(HANDLE,DWORD);
1517 BOOL WINAPI SetThreadContext(HANDLE,const CONTEXT *);
1518 DWORD WINAPI SetThreadExecutionState(EXECUTION_STATE);
1519 DWORD WINAPI SetThreadIdealProcessor(HANDLE,DWORD);
1520 BOOL WINAPI SetThreadPriority(HANDLE,INT);
1521 BOOL WINAPI SetThreadPriorityBoost(HANDLE,BOOL);
1522 BOOL WINAPI SetThreadToken(PHANDLE,HANDLE);
1523 BOOL WINAPI SetTimeZoneInformation(const LPTIME_ZONE_INFORMATION);
1524 BOOL WINAPI SetVolumeMountPointA(LPCSTR,LPCSTR);
1525 BOOL WINAPI SetVolumeMountPointW(LPCSTR,LPCSTR);
1526 #define SetVolumeMountPoint WINELIB_NAME_AW(SetVolumeMountPoint)
1527 BOOL WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,LPVOID,BOOL);
1528 BOOL WINAPI SetupComm(HANDLE,DWORD,DWORD);
1529 DWORD WINAPI SignalObjectAndWait(HANDLE,HANDLE,DWORD,BOOL);
1530 VOID WINAPI Sleep(DWORD);
1531 DWORD WINAPI SleepEx(DWORD,BOOL);
1532 DWORD WINAPI SuspendThread(HANDLE);
1533 void WINAPI SwitchToFiber(LPVOID);
1534 BOOL WINAPI SwitchToThread(void);
1535 BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
1536 BOOL WINAPI SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME);
1537 DWORD WINAPI TlsAlloc(void);
1538 BOOL WINAPI TlsFree(DWORD);
1539 LPVOID WINAPI TlsGetValue(DWORD);
1540 BOOL WINAPI TlsSetValue(DWORD,LPVOID);
1541 BOOL WINAPI TransmitCommChar(HANDLE,CHAR);
1542 BOOL WINAPI UnlockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1543 BOOL WINAPI UnlockFileEx(HANDLE,DWORD,DWORD,DWORD,LPOVERLAPPED);
1544 BOOL WINAPI UnmapViewOfFile(LPVOID);
1545 BOOL WINAPI UpdateResourceA(HANDLE,LPCSTR,LPCSTR,WORD,LPVOID,DWORD);
1546 BOOL WINAPI UpdateResourceW(HANDLE,LPCWSTR,LPCWSTR,WORD,LPVOID,DWORD);
1547 #define UpdateResource WINELIB_NAME_AW(UpdateResource)
1548 BOOL WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA,DWORD,DWORDLONG);
1549 BOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW,DWORD,DWORDLONG);
1550 #define VerifyVersionInfo WINELIB_NAME_AW(VerifyVersionInfo)
1551 LPVOID WINAPI VirtualAlloc(LPVOID,SIZE_T,DWORD,DWORD);
1552 LPVOID WINAPI VirtualAllocEx(HANDLE,LPVOID,SIZE_T,DWORD,DWORD);
1553 BOOL WINAPI VirtualFree(LPVOID,SIZE_T,DWORD);
1554 BOOL WINAPI VirtualFreeEx(HANDLE,LPVOID,SIZE_T,DWORD);
1555 BOOL WINAPI VirtualLock(LPVOID,SIZE_T);
1556 BOOL WINAPI VirtualProtect(LPVOID,SIZE_T,DWORD,LPDWORD);
1557 BOOL WINAPI VirtualProtectEx(HANDLE,LPVOID,SIZE_T,DWORD,LPDWORD);
1558 SIZE_T WINAPI VirtualQuery(LPCVOID,PMEMORY_BASIC_INFORMATION,SIZE_T);
1559 SIZE_T WINAPI VirtualQueryEx(HANDLE,LPCVOID,PMEMORY_BASIC_INFORMATION,SIZE_T);
1560 BOOL WINAPI VirtualUnlock(LPVOID,SIZE_T);
1561 BOOL WINAPI WaitCommEvent(HANDLE,LPDWORD,LPOVERLAPPED);
1562 BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD);
1563 DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD);
1564 DWORD WINAPI WaitForMultipleObjectsEx(DWORD,const HANDLE*,BOOL,DWORD,BOOL);
1565 DWORD WINAPI WaitForSingleObject(HANDLE,DWORD);
1566 DWORD WINAPI WaitForSingleObjectEx(HANDLE,DWORD,BOOL);
1567 BOOL WINAPI WaitNamedPipeA(LPCSTR,DWORD);
1568 BOOL WINAPI WaitNamedPipeW(LPCWSTR,DWORD);
1569 #define WaitNamedPipe WINELIB_NAME_AW(WaitNamedPipe)
1570 BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
1571 BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
1572 DWORD WINAPI WriteTapemark(HANDLE,DWORD,DWORD,BOOL);
1573 ATOM WINAPI AddAtomA(LPCSTR);
1574 ATOM WINAPI AddAtomW(LPCWSTR);
1575 #define AddAtom WINELIB_NAME_AW(AddAtom)
1576 BOOL WINAPI CreateDirectoryA(LPCSTR,LPSECURITY_ATTRIBUTES);
1577 BOOL WINAPI CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES);
1578 #define CreateDirectory WINELIB_NAME_AW(CreateDirectory)
1579 BOOL WINAPI CreateDirectoryExA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES);
1580 BOOL WINAPI CreateDirectoryExW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES);
1581 #define CreateDirectoryEx WINELIB_NAME_AW(CreateDirectoryEx)
1582 BOOL WINAPI DefineDosDeviceA(DWORD,LPCSTR,LPCSTR);
1583 #define DefineHandleTable(w) ((w),TRUE)
1584 ATOM WINAPI DeleteAtom(ATOM);
1585 BOOL WINAPI DeleteFileA(LPCSTR);
1586 BOOL WINAPI DeleteFileW(LPCWSTR);
1587 #define DeleteFile WINELIB_NAME_AW(DeleteFile)
1588 void WINAPI FatalAppExitA(UINT,LPCSTR);
1589 void WINAPI FatalAppExitW(UINT,LPCWSTR);
1590 void WINAPI FatalExit(int);
1591 #define FatalAppExit WINELIB_NAME_AW(FatalAppExit)
1592 ATOM WINAPI FindAtomA(LPCSTR);
1593 ATOM WINAPI FindAtomW(LPCWSTR);
1594 #define FindAtom WINELIB_NAME_AW(FindAtom)
1595 BOOL WINAPI FindClose(HANDLE);
1596 HANDLE WINAPI FindFirstFileA(LPCSTR,LPWIN32_FIND_DATAA);
1597 HANDLE WINAPI FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW);
1598 #define FindFirstFile WINELIB_NAME_AW(FindFirstFile)
1599 HANDLE WINAPI FindFirstFileExA(LPCSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD);
1600 HANDLE WINAPI FindFirstFileExW(LPCWSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD);
1601 #define FindFirstFileEx WINELIB_NAME_AW(FindFirstFileEx)
1602 BOOL WINAPI FindNextFileA(HANDLE,LPWIN32_FIND_DATAA);
1603 BOOL WINAPI FindNextFileW(HANDLE,LPWIN32_FIND_DATAW);
1604 #define FindNextFile WINELIB_NAME_AW(FindNextFile)
1605 HRSRC WINAPI FindResourceA(HMODULE,LPCSTR,LPCSTR);
1606 HRSRC WINAPI FindResourceW(HMODULE,LPCWSTR,LPCWSTR);
1607 #define FindResource WINELIB_NAME_AW(FindResource)
1608 BOOL WINAPI FlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
1609 BOOL WINAPI FreeLibrary(HMODULE);
1610 #define FreeModule(handle) FreeLibrary(handle)
1611 #define FreeProcInstance(proc) /*nothing*/
1612 BOOL WINAPI FreeResource(HGLOBAL);
1613 UINT WINAPI GetAtomNameA(ATOM,LPSTR,INT);
1614 UINT WINAPI GetAtomNameW(ATOM,LPWSTR,INT);
1615 #define GetAtomName WINELIB_NAME_AW(GetAtomName)
1616 UINT WINAPI GetCurrentDirectoryA(UINT,LPSTR);
1617 UINT WINAPI GetCurrentDirectoryW(UINT,LPWSTR);
1618 #define GetCurrentDirectory WINELIB_NAME_AW(GetCurrentDirectory)
1619 BOOL WINAPI GetCurrentHwProfileA(LPHW_PROFILE_INFOA);
1620 BOOL WINAPI GetCurrentHwProfileW(LPHW_PROFILE_INFOW);
1621 #define GetCurrentHwProfile WINELIB_NAME_AW(GetCurrentHwProfile)
1622 #define GetCurrentTime() GetTickCount()
1623 BOOL WINAPI GetDiskFreeSpaceA(LPCSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1624 BOOL WINAPI GetDiskFreeSpaceW(LPCWSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1625 #define GetDiskFreeSpace WINELIB_NAME_AW(GetDiskFreeSpace)
1626 BOOL WINAPI GetDiskFreeSpaceExA(LPCSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
1627 BOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
1628 #define GetDiskFreeSpaceEx WINELIB_NAME_AW(GetDiskFreeSpaceEx)
1629 UINT WINAPI GetDriveTypeA(LPCSTR);
1630 UINT WINAPI GetDriveTypeW(LPCWSTR);
1631 #define GetDriveType WINELIB_NAME_AW(GetDriveType)
1632 BOOL WINAPI GetExitCodeProcess(HANDLE,LPDWORD);
1633 DWORD WINAPI GetFileAttributesA(LPCSTR);
1634 DWORD WINAPI GetFileAttributesW(LPCWSTR);
1635 #define GetFileAttributes WINELIB_NAME_AW(GetFileAttributes)
1636 #define GetFreeSpace(w) (0x100000L)
1637 UINT WINAPI GetLogicalDriveStringsA(UINT,LPSTR);
1638 UINT WINAPI GetLogicalDriveStringsW(UINT,LPWSTR);
1639 #define GetLogicalDriveStrings WINELIB_NAME_AW(GetLogicalDriveStrings)
1640 DWORD WINAPI GetModuleFileNameA(HMODULE,LPSTR,DWORD);
1641 DWORD WINAPI GetModuleFileNameW(HMODULE,LPWSTR,DWORD);
1642 #define GetModuleFileName WINELIB_NAME_AW(GetModuleFileName)
1643 HMODULE WINAPI GetModuleHandleA(LPCSTR);
1644 HMODULE WINAPI GetModuleHandleW(LPCWSTR);
1645 #define GetModuleHandle WINELIB_NAME_AW(GetModuleHandle)
1646 BOOL WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,LPDWORD,BOOL);
1647 UINT WINAPI GetPrivateProfileIntA(LPCSTR,LPCSTR,INT,LPCSTR);
1648 UINT WINAPI GetPrivateProfileIntW(LPCWSTR,LPCWSTR,INT,LPCWSTR);
1649 #define GetPrivateProfileInt WINELIB_NAME_AW(GetPrivateProfileInt)
1650 INT WINAPI GetPrivateProfileSectionA(LPCSTR,LPSTR,DWORD,LPCSTR);
1651 INT WINAPI GetPrivateProfileSectionW(LPCWSTR,LPWSTR,DWORD,LPCWSTR);
1652 #define GetPrivateProfileSection WINELIB_NAME_AW(GetPrivateProfileSection)
1653 DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR,DWORD,LPCSTR);
1654 DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR,DWORD,LPCWSTR);
1655 #define GetPrivateProfileSectionNames WINELIB_NAME_AW(GetPrivateProfileSectionNames)
1656 INT WINAPI GetPrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT,LPCSTR);
1657 INT WINAPI GetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT,LPCWSTR);
1658 #define GetPrivateProfileString WINELIB_NAME_AW(GetPrivateProfileString)
1659 BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
1660 BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
1661 #define GetPrivateProfileStruct WINELIB_NAME_AW(GetPrivateProfileStruct)
1662 FARPROC WINAPI GetProcAddress(HMODULE,LPCSTR);
1663 UINT WINAPI GetProfileIntA(LPCSTR,LPCSTR,INT);
1664 UINT WINAPI GetProfileIntW(LPCWSTR,LPCWSTR,INT);
1665 #define GetProfileInt WINELIB_NAME_AW(GetProfileInt)
1666 INT WINAPI GetProfileSectionA(LPCSTR,LPSTR,DWORD);
1667 INT WINAPI GetProfileSectionW(LPCWSTR,LPWSTR,DWORD);
1668 #define GetProfileSection WINELIB_NAME_AW(GetProfileSection)
1669 INT WINAPI GetProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT);
1670 INT WINAPI GetProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT);
1671 #define GetProfileString WINELIB_NAME_AW(GetProfileString)
1672 VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA);
1673 VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW);
1674 #define GetStartupInfo WINELIB_NAME_AW(GetStartupInfo)
1675 UINT WINAPI GetSystemDirectoryA(LPSTR,UINT);
1676 UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT);
1677 #define GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
1678 UINT WINAPI GetSystemWindowsDirectoryA(LPSTR,UINT);
1679 UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR,UINT);
1680 #define GetSystemWindowsDirectory WINELIB_NAME_AW(GetSystemWindowsDirectory)
1681 DWORD WINAPI GetTickCount(void);
1682 UINT WINAPI GetTempFileNameA(LPCSTR,LPCSTR,UINT,LPSTR);
1683 UINT WINAPI GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR);
1684 #define GetTempFileName WINELIB_NAME_AW(GetTempFileName)
1685 UINT WINAPI GetTempPathA(UINT,LPSTR);
1686 UINT WINAPI GetTempPathW(UINT,LPWSTR);
1687 #define GetTempPath WINELIB_NAME_AW(GetTempPath)
1688 DWORD WINAPI GetVersion(void);
1689 BOOL WINAPI GetVersionExA(OSVERSIONINFOA*);
1690 BOOL WINAPI GetVersionExW(OSVERSIONINFOW*);
1691 #define GetVersionEx WINELIB_NAME_AW(GetVersionEx)
1692 BOOL WINAPI GetVolumeInformationA(LPCSTR,LPSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPSTR,DWORD);
1693 BOOL WINAPI GetVolumeInformationW(LPCWSTR,LPWSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPWSTR,DWORD);
1694 #define GetVolumeInformation WINELIB_NAME_AW(GetVolumeInformation)
1695 UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT);
1696 UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
1697 #define GetWindowsDirectory WINELIB_NAME_AW(GetWindowsDirectory)
1698 ATOM WINAPI GlobalAddAtomA(LPCSTR);
1699 ATOM WINAPI GlobalAddAtomW(LPCWSTR);
1700 #define GlobalAddAtom WINELIB_NAME_AW(GlobalAddAtom)
1701 HGLOBAL WINAPI GlobalAlloc(UINT,SIZE_T);
1702 SIZE_T WINAPI GlobalCompact(DWORD);
1703 ATOM WINAPI GlobalDeleteAtom(ATOM);
1704 ATOM WINAPI GlobalFindAtomA(LPCSTR);
1705 ATOM WINAPI GlobalFindAtomW(LPCWSTR);
1706 #define GlobalFindAtom WINELIB_NAME_AW(GlobalFindAtom)
1707 UINT WINAPI GlobalFlags(HGLOBAL);
1708 HGLOBAL WINAPI GlobalFree(HGLOBAL);
1709 UINT WINAPI GlobalGetAtomNameA(ATOM,LPSTR,INT);
1710 UINT WINAPI GlobalGetAtomNameW(ATOM,LPWSTR,INT);
1711 #define GlobalGetAtomName WINELIB_NAME_AW(GlobalGetAtomName)
1712 HGLOBAL WINAPI GlobalHandle(LPCVOID);
1713 VOID WINAPI GlobalFix(HGLOBAL);
1714 LPVOID WINAPI GlobalLock(HGLOBAL);
1715 HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,SIZE_T,UINT);
1716 SIZE_T WINAPI GlobalSize(HGLOBAL);
1717 VOID WINAPI GlobalUnfix(HGLOBAL);
1718 BOOL WINAPI GlobalUnlock(HGLOBAL);
1719 BOOL WINAPI GlobalUnWire(HGLOBAL);
1720 LPVOID WINAPI GlobalWire(HGLOBAL);
1721 #define HasOverlappedCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
1722 BOOL WINAPI InitAtomTable(DWORD);
1723 BOOL WINAPI IsBadCodePtr(FARPROC);
1724 BOOL WINAPI IsBadHugeReadPtr(LPCVOID,UINT);
1725 BOOL WINAPI IsBadHugeWritePtr(LPVOID,UINT);
1726 BOOL WINAPI IsBadReadPtr(LPCVOID,UINT);
1727 BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT);
1728 BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT);
1729 #define IsBadStringPtr WINELIB_NAME_AW(IsBadStringPtr)
1730 BOOL WINAPI IsBadWritePtr(LPVOID,UINT);
1731 BOOL WINAPI IsDebuggerPresent(void);
1732 HMODULE WINAPI LoadLibraryA(LPCSTR);
1733 HMODULE WINAPI LoadLibraryW(LPCWSTR);
1734 #define LoadLibrary WINELIB_NAME_AW(LoadLibrary)
1735 HMODULE WINAPI LoadLibraryExA(LPCSTR,HANDLE,DWORD);
1736 HMODULE WINAPI LoadLibraryExW(LPCWSTR,HANDLE,DWORD);
1737 #define LoadLibraryEx WINELIB_NAME_AW(LoadLibraryEx)
1738 HINSTANCE WINAPI LoadModule(LPCSTR,LPVOID);
1739 HGLOBAL WINAPI LoadResource(HMODULE,HRSRC);
1740 HLOCAL WINAPI LocalAlloc(UINT,SIZE_T);
1741 SIZE_T WINAPI LocalCompact(UINT);
1742 UINT WINAPI LocalFlags(HLOCAL);
1743 HLOCAL WINAPI LocalFree(HLOCAL);
1744 HLOCAL WINAPI LocalHandle(LPCVOID);
1745 LPVOID WINAPI LocalLock(HLOCAL);
1746 HLOCAL WINAPI LocalReAlloc(HLOCAL,SIZE_T,UINT);
1747 SIZE_T WINAPI LocalShrink(HGLOBAL,UINT);
1748 SIZE_T WINAPI LocalSize(HLOCAL);
1749 BOOL WINAPI LocalUnlock(HLOCAL);
1750 LPVOID WINAPI LockResource(HGLOBAL);
1751 #define LockSegment(handle) GlobalFix((HANDLE)(handle))
1752 #define MakeProcInstance(proc,inst) (proc)
1753 HFILE WINAPI OpenFile(LPCSTR,OFSTRUCT*,UINT);
1754 VOID WINAPI OutputDebugStringA(LPCSTR);
1755 VOID WINAPI OutputDebugStringW(LPCWSTR);
1756 #define OutputDebugString WINELIB_NAME_AW(OutputDebugString)
1757 BOOL WINAPI ReadProcessMemory(HANDLE,LPCVOID,LPVOID,SIZE_T,SIZE_T*);
1758 BOOL WINAPI RemoveDirectoryA(LPCSTR);
1759 BOOL WINAPI RemoveDirectoryW(LPCWSTR);
1760 #define RemoveDirectory WINELIB_NAME_AW(RemoveDirectory)
1761 BOOL WINAPI SetCurrentDirectoryA(LPCSTR);
1762 BOOL WINAPI SetCurrentDirectoryW(LPCWSTR);
1763 #define SetCurrentDirectory WINELIB_NAME_AW(SetCurrentDirectory)
1764 UINT WINAPI SetErrorMode(UINT);
1765 BOOL WINAPI SetFileAttributesA(LPCSTR,DWORD);
1766 BOOL WINAPI SetFileAttributesW(LPCWSTR,DWORD);
1767 #define SetFileAttributes WINELIB_NAME_AW(SetFileAttributes)
1768 UINT WINAPI SetHandleCount(UINT);
1769 #define SetSwapAreaSize(w) (w)
1770 BOOL WINAPI SetVolumeLabelA(LPCSTR,LPCSTR);
1771 BOOL WINAPI SetVolumeLabelW(LPCWSTR,LPCWSTR);
1772 #define SetVolumeLabel WINELIB_NAME_AW(SetVolumeLabel)
1773 DWORD WINAPI SizeofResource(HMODULE,HRSRC);
1774 #define UnlockSegment(handle) GlobalUnfix((HANDLE)(handle))
1775 BOOL WINAPI WritePrivateProfileSectionA(LPCSTR,LPCSTR,LPCSTR);
1776 BOOL WINAPI WritePrivateProfileSectionW(LPCWSTR,LPCWSTR,LPCWSTR);
1777 #define WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
1778 BOOL WINAPI WritePrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
1779 BOOL WINAPI WritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
1780 #define WritePrivateProfileString WINELIB_NAME_AW(WritePrivateProfileString)
1781 BOOL WINAPI WriteProfileSectionA(LPCSTR,LPCSTR);
1782 BOOL WINAPI WriteProfileSectionW(LPCWSTR,LPCWSTR);
1783 #define WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
1784 BOOL WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
1785 BOOL WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
1786 #define WritePrivateProfileStruct WINELIB_NAME_AW(WritePrivateProfileStruct)
1787 BOOL WINAPI WriteProcessMemory(HANDLE,LPVOID,LPCVOID,SIZE_T,SIZE_T*);
1788 BOOL WINAPI WriteProfileStringA(LPCSTR,LPCSTR,LPCSTR);
1789 BOOL WINAPI WriteProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR);
1790 #define WriteProfileString WINELIB_NAME_AW(WriteProfileString)
1791 #define Yield()
1792 LPSTR WINAPI lstrcatA(LPSTR,LPCSTR);
1793 LPWSTR WINAPI lstrcatW(LPWSTR,LPCWSTR);
1794 #define lstrcat WINELIB_NAME_AW(lstrcat)
1795 LPSTR WINAPI lstrcpyA(LPSTR,LPCSTR);
1796 LPWSTR WINAPI lstrcpyW(LPWSTR,LPCWSTR);
1797 #define lstrcpy WINELIB_NAME_AW(lstrcpy)
1798 LPSTR WINAPI lstrcpynA(LPSTR,LPCSTR,INT);
1799 LPWSTR WINAPI lstrcpynW(LPWSTR,LPCWSTR,INT);
1800 #define lstrcpyn WINELIB_NAME_AW(lstrcpyn)
1801 INT WINAPI lstrlenA(LPCSTR);
1802 INT WINAPI lstrlenW(LPCWSTR);
1803 #define lstrlen WINELIB_NAME_AW(lstrlen)
1804 UINT WINAPI WinExec(LPCSTR,UINT);
1805 LONG WINAPI _hread(HFILE,LPVOID,LONG);
1806 LONG WINAPI _hwrite(HFILE,LPCSTR,LONG);
1807 HFILE WINAPI _lcreat(LPCSTR,INT);
1808 HFILE WINAPI _lclose(HFILE);
1809 LONG WINAPI _llseek(HFILE,LONG,INT);
1810 HFILE WINAPI _lopen(LPCSTR,INT);
1811 UINT WINAPI _lread(HFILE,LPVOID,UINT);
1812 UINT WINAPI _lwrite(HFILE,LPCSTR,UINT);
1813 INT WINAPI lstrcmpA(LPCSTR,LPCSTR);
1814 INT WINAPI lstrcmpW(LPCWSTR,LPCWSTR);
1815 #define lstrcmp WINELIB_NAME_AW(lstrcmp)
1816 INT WINAPI lstrcmpiA(LPCSTR,LPCSTR);
1817 INT WINAPI lstrcmpiW(LPCWSTR,LPCWSTR);
1818 #define lstrcmpi WINELIB_NAME_AW(lstrcmpi)
1820 /* compatibility macros */
1821 #define FillMemory RtlFillMemory
1822 #define MoveMemory RtlMoveMemory
1823 #define ZeroMemory RtlZeroMemory
1824 #define CopyMemory RtlCopyMemory
1826 /* undocumented functions */
1828 typedef struct tagSYSLEVEL
1830 CRITICAL_SECTION crst;
1831 INT level;
1832 } SYSLEVEL;
1834 /* [GS]etProcessDword offsets */
1835 #define GPD_APP_COMPAT_FLAGS (-56)
1836 #define GPD_LOAD_DONE_EVENT (-52)
1837 #define GPD_HINSTANCE16 (-48)
1838 #define GPD_WINDOWS_VERSION (-44)
1839 #define GPD_THDB (-40)
1840 #define GPD_PDB (-36)
1841 #define GPD_STARTF_SHELLDATA (-32)
1842 #define GPD_STARTF_HOTKEY (-28)
1843 #define GPD_STARTF_SHOWWINDOW (-24)
1844 #define GPD_STARTF_SIZE (-20)
1845 #define GPD_STARTF_POSITION (-16)
1846 #define GPD_STARTF_FLAGS (-12)
1847 #define GPD_PARENT (- 8)
1848 #define GPD_FLAGS (- 4)
1849 #define GPD_USERDATA ( 0)
1851 void WINAPI DisposeLZ32Handle(HANDLE);
1852 HANDLE WINAPI DosFileHandleToWin32Handle(HFILE);
1853 DWORD WINAPI GetProcessDword(DWORD,INT);
1854 VOID WINAPI GetpWin16Lock(SYSLEVEL**);
1855 DWORD WINAPI MapLS(LPCVOID);
1856 DWORD WINAPI MapProcessHandle(HANDLE);
1857 LPVOID WINAPI MapSL(DWORD);
1858 VOID WINAPI ReleaseThunkLock(DWORD*);
1859 VOID WINAPI RestoreThunkLock(DWORD);
1860 void WINAPI SetProcessDword(DWORD,INT,DWORD);
1861 VOID WINAPI UnMapLS(DWORD);
1862 HFILE WINAPI Win32HandleToDosFileHandle(HANDLE);
1863 VOID WINAPI _CheckNotSysLevel(SYSLEVEL *lock);
1864 DWORD WINAPI _ConfirmWin16Lock(void);
1865 DWORD WINAPI _ConfirmSysLevel(SYSLEVEL*);
1866 VOID WINAPI _EnterSysLevel(SYSLEVEL*);
1867 VOID WINAPI _LeaveSysLevel(SYSLEVEL*);
1870 /* Wine internal functions */
1872 BOOL WINAPI wine_get_unix_file_name( LPCWSTR dos, LPSTR buffer, DWORD len );
1875 /* a few optimizations for i386/gcc */
1877 #if defined(__i386__) && defined(__GNUC__) && defined(__WINESRC__) && !defined(_NTSYSTEM_)
1879 extern inline LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare );
1880 extern inline LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare )
1882 LONG ret;
1883 __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
1884 : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
1885 return ret;
1888 extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val );
1889 extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val )
1891 LONG ret;
1892 __asm__ __volatile__( "lock; xchgl %0,(%1)"
1893 : "=r" (ret) :"r" (dest), "0" (val) : "memory" );
1894 return ret;
1897 extern inline LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr );
1898 extern inline LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr )
1900 LONG ret;
1901 __asm__ __volatile__( "lock; xaddl %0,(%1)"
1902 : "=r" (ret) : "r" (dest), "0" (incr) : "memory" );
1903 return ret;
1906 extern inline LONG WINAPI InterlockedIncrement( PLONG dest );
1907 extern inline LONG WINAPI InterlockedIncrement( PLONG dest )
1909 return InterlockedExchangeAdd( dest, 1 ) + 1;
1912 extern inline LONG WINAPI InterlockedDecrement( PLONG dest );
1913 extern inline LONG WINAPI InterlockedDecrement( PLONG dest )
1915 return InterlockedExchangeAdd( dest, -1 ) - 1;
1918 extern inline DWORD WINAPI GetLastError(void);
1919 extern inline DWORD WINAPI GetLastError(void)
1921 DWORD ret;
1922 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x34,%0" : "=r" (ret) );
1923 return ret;
1926 extern inline DWORD WINAPI GetCurrentProcessId(void);
1927 extern inline DWORD WINAPI GetCurrentProcessId(void)
1929 DWORD ret;
1930 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x20,%0" : "=r" (ret) );
1931 return ret;
1934 extern inline DWORD WINAPI GetCurrentThreadId(void);
1935 extern inline DWORD WINAPI GetCurrentThreadId(void)
1937 DWORD ret;
1938 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x24,%0" : "=r" (ret) );
1939 return ret;
1942 extern inline void WINAPI SetLastError( DWORD err );
1943 extern inline void WINAPI SetLastError( DWORD err )
1945 __asm__ __volatile__( ".byte 0x64\n\tmovl %0,0x34" : : "r" (err) : "memory" );
1948 extern inline HANDLE WINAPI GetProcessHeap(void);
1949 extern inline HANDLE WINAPI GetProcessHeap(void)
1951 HANDLE *pdb;
1952 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x30,%0" : "=r" (pdb) );
1953 return pdb[0x18 / sizeof(HANDLE)]; /* get dword at offset 0x18 in pdb */
1956 #else /* __i386__ && __GNUC__ && __WINESRC__ && !_NTSYSTEM_ */
1958 DWORD WINAPI GetCurrentProcessId(void);
1959 DWORD WINAPI GetCurrentThreadId(void);
1960 DWORD WINAPI GetLastError(void);
1961 HANDLE WINAPI GetProcessHeap(void);
1962 LONG WINAPI InterlockedCompareExchange(LONG*,LONG,LONG);
1963 LONG WINAPI InterlockedDecrement(PLONG);
1964 LONG WINAPI InterlockedExchange(PLONG,LONG);
1965 LONG WINAPI InterlockedExchangeAdd(PLONG,LONG);
1966 LONG WINAPI InterlockedIncrement(PLONG);
1967 VOID WINAPI SetLastError(DWORD);
1969 #endif /* __i386__ && __GNUC__ && __WINESRC__ && !_NTSYSTEM_ */
1971 /* FIXME: should handle platforms where sizeof(void*) != sizeof(long) */
1972 static inline PVOID WINAPI InterlockedCompareExchangePointer( PVOID *dest, PVOID xchg, PVOID compare )
1974 return (PVOID)InterlockedCompareExchange( (PLONG)dest, (LONG)xchg, (LONG)compare );
1977 static inline PVOID WINAPI InterlockedExchangePointer( PVOID *dest, PVOID val )
1979 return (PVOID)InterlockedExchange( (PLONG)dest, (LONG)val );
1982 #ifdef __WINESRC__
1983 #define GetCurrentProcess() ((HANDLE)0xffffffff)
1984 #define GetCurrentThread() ((HANDLE)0xfffffffe)
1985 #endif
1987 /* WinMain(entry point) must be declared in winbase.h. */
1988 /* If this is not declared, we cannot compile many sources written with C++. */
1989 int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
1991 #ifdef __cplusplus
1993 #endif
1995 #endif /* __WINE_WINBASE_H */