Added LGPL standard comment, and copyright notices where necessary.
[wine/multimedia.git] / include / winbase.h
blob6824840d58c23ef9ad4242b4d65b2ff7de7ccf2e
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 #ifndef RC_INVOKED
23 #include <stdarg.h>
24 #endif
26 #include "basetsd.h"
27 #include "windef.h"
29 #ifndef RC_INVOKED
30 #include <stdarg.h>
31 #endif
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 /* Windows Exit Procedure flag values */
38 #define WEP_FREE_DLL 0
39 #define WEP_SYSTEM_EXIT 1
41 typedef DWORD (CALLBACK *LPTHREAD_START_ROUTINE)(LPVOID);
43 typedef VOID (WINAPI *PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
44 typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
46 typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
47 typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
48 typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
50 typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
51 typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
52 typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;
55 #define EXCEPTION_DEBUG_EVENT 1
56 #define CREATE_THREAD_DEBUG_EVENT 2
57 #define CREATE_PROCESS_DEBUG_EVENT 3
58 #define EXIT_THREAD_DEBUG_EVENT 4
59 #define EXIT_PROCESS_DEBUG_EVENT 5
60 #define LOAD_DLL_DEBUG_EVENT 6
61 #define UNLOAD_DLL_DEBUG_EVENT 7
62 #define OUTPUT_DEBUG_STRING_EVENT 8
63 #define RIP_EVENT 9
65 typedef struct _EXCEPTION_DEBUG_INFO {
66 EXCEPTION_RECORD ExceptionRecord;
67 DWORD dwFirstChance;
68 } EXCEPTION_DEBUG_INFO;
70 typedef struct _CREATE_THREAD_DEBUG_INFO {
71 HANDLE hThread;
72 LPVOID lpThreadLocalBase;
73 LPTHREAD_START_ROUTINE lpStartAddress;
74 } CREATE_THREAD_DEBUG_INFO;
76 typedef struct _CREATE_PROCESS_DEBUG_INFO {
77 HANDLE hFile;
78 HANDLE hProcess;
79 HANDLE hThread;
80 LPVOID lpBaseOfImage;
81 DWORD dwDebugInfoFileOffset;
82 DWORD nDebugInfoSize;
83 LPVOID lpThreadLocalBase;
84 LPTHREAD_START_ROUTINE lpStartAddress;
85 LPVOID lpImageName;
86 WORD fUnicode;
87 } CREATE_PROCESS_DEBUG_INFO;
89 typedef struct _EXIT_THREAD_DEBUG_INFO {
90 DWORD dwExitCode;
91 } EXIT_THREAD_DEBUG_INFO;
93 typedef struct _EXIT_PROCESS_DEBUG_INFO {
94 DWORD dwExitCode;
95 } EXIT_PROCESS_DEBUG_INFO;
97 typedef struct _LOAD_DLL_DEBUG_INFO {
98 HANDLE hFile;
99 LPVOID lpBaseOfDll;
100 DWORD dwDebugInfoFileOffset;
101 DWORD nDebugInfoSize;
102 LPVOID lpImageName;
103 WORD fUnicode;
104 } LOAD_DLL_DEBUG_INFO;
106 typedef struct _UNLOAD_DLL_DEBUG_INFO {
107 LPVOID lpBaseOfDll;
108 } UNLOAD_DLL_DEBUG_INFO;
110 typedef struct _OUTPUT_DEBUG_STRING_INFO {
111 LPSTR lpDebugStringData;
112 WORD fUnicode;
113 WORD nDebugStringLength;
114 } OUTPUT_DEBUG_STRING_INFO;
116 typedef struct _RIP_INFO {
117 DWORD dwError;
118 DWORD dwType;
119 } RIP_INFO;
121 typedef struct _DEBUG_EVENT {
122 DWORD dwDebugEventCode;
123 DWORD dwProcessId;
124 DWORD dwThreadId;
125 union {
126 EXCEPTION_DEBUG_INFO Exception;
127 CREATE_THREAD_DEBUG_INFO CreateThread;
128 CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
129 EXIT_THREAD_DEBUG_INFO ExitThread;
130 EXIT_PROCESS_DEBUG_INFO ExitProcess;
131 LOAD_DLL_DEBUG_INFO LoadDll;
132 UNLOAD_DLL_DEBUG_INFO UnloadDll;
133 OUTPUT_DEBUG_STRING_INFO DebugString;
134 RIP_INFO RipInfo;
135 } u;
136 } DEBUG_EVENT, *LPDEBUG_EVENT;
138 typedef PCONTEXT LPCONTEXT;
139 typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
140 typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
142 #define OFS_MAXPATHNAME 128
143 typedef struct
145 BYTE cBytes;
146 BYTE fFixedDisk;
147 WORD nErrCode;
148 BYTE reserved[4];
149 BYTE szPathName[OFS_MAXPATHNAME];
150 } OFSTRUCT, *POFSTRUCT, *LPOFSTRUCT;
152 #define OF_READ 0x0000
153 #define OF_WRITE 0x0001
154 #define OF_READWRITE 0x0002
155 #define OF_SHARE_COMPAT 0x0000
156 #define OF_SHARE_EXCLUSIVE 0x0010
157 #define OF_SHARE_DENY_WRITE 0x0020
158 #define OF_SHARE_DENY_READ 0x0030
159 #define OF_SHARE_DENY_NONE 0x0040
160 #define OF_PARSE 0x0100
161 #define OF_DELETE 0x0200
162 #define OF_VERIFY 0x0400 /* Used with OF_REOPEN */
163 #define OF_SEARCH 0x0400 /* Used without OF_REOPEN */
164 #define OF_CANCEL 0x0800
165 #define OF_CREATE 0x1000
166 #define OF_PROMPT 0x2000
167 #define OF_EXIST 0x4000
168 #define OF_REOPEN 0x8000
170 /* SetErrorMode values */
171 #define SEM_FAILCRITICALERRORS 0x0001
172 #define SEM_NOGPFAULTERRORBOX 0x0002
173 #define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
174 #define SEM_NOOPENFILEERRORBOX 0x8000
176 /* CopyFileEx flags */
177 #define COPY_FILE_FAIL_IF_EXISTS 0x00000001
178 #define COPY_FILE_RESTARTABLE 0x00000002
179 #define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x00000004
181 /* GetTempFileName() Flags */
182 #define TF_FORCEDRIVE 0x80
184 #define DRIVE_UNKNOWN 0
185 #define DRIVE_NO_ROOT_DIR 1
186 #define DRIVE_REMOVABLE 2
187 #define DRIVE_FIXED 3
188 #define DRIVE_REMOTE 4
189 /* Win32 additions */
190 #define DRIVE_CDROM 5
191 #define DRIVE_RAMDISK 6
193 /* The security attributes structure */
194 typedef struct _SECURITY_ATTRIBUTES
196 DWORD nLength;
197 LPVOID lpSecurityDescriptor;
198 BOOL bInheritHandle;
199 } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
201 #ifndef _FILETIME_
202 #define _FILETIME_
203 /* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
204 typedef struct
206 DWORD dwLowDateTime;
207 DWORD dwHighDateTime;
208 } FILETIME, *PFILETIME, *LPFILETIME;
209 #endif /* _FILETIME_ */
211 /* Find* structures */
212 typedef struct
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
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
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) -1)
287 #define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
289 #define SHUTDOWN_NORETRY 1
291 /* comm */
293 #define CBR_110 0xFF10
294 #define CBR_300 0xFF11
295 #define CBR_600 0xFF12
296 #define CBR_1200 0xFF13
297 #define CBR_2400 0xFF14
298 #define CBR_4800 0xFF15
299 #define CBR_9600 0xFF16
300 #define CBR_14400 0xFF17
301 #define CBR_19200 0xFF18
302 #define CBR_38400 0xFF1B
303 #define CBR_56000 0xFF1F
304 #define CBR_57600 0xFF20
305 #define CBR_115200 0xFF21
306 #define CBR_128000 0xFF23
307 #define CBR_256000 0xFF27
309 #define NOPARITY 0
310 #define ODDPARITY 1
311 #define EVENPARITY 2
312 #define MARKPARITY 3
313 #define SPACEPARITY 4
314 #define ONESTOPBIT 0
315 #define ONE5STOPBITS 1
316 #define TWOSTOPBITS 2
318 #define IGNORE 0
319 #define INFINITE 0xFFFFFFFF
321 #define CE_RXOVER 0x0001
322 #define CE_OVERRUN 0x0002
323 #define CE_RXPARITY 0x0004
324 #define CE_FRAME 0x0008
325 #define CE_BREAK 0x0010
326 #define CE_CTSTO 0x0020
327 #define CE_DSRTO 0x0040
328 #define CE_RLSDTO 0x0080
329 #define CE_TXFULL 0x0100
330 #define CE_PTO 0x0200
331 #define CE_IOE 0x0400
332 #define CE_DNS 0x0800
333 #define CE_OOP 0x1000
334 #define CE_MODE 0x8000
336 #define IE_BADID -1
337 #define IE_OPEN -2
338 #define IE_NOPEN -3
339 #define IE_MEMORY -4
340 #define IE_DEFAULT -5
341 #define IE_HARDWARE -10
342 #define IE_BYTESIZE -11
343 #define IE_BAUDRATE -12
345 #define EV_RXCHAR 0x0001
346 #define EV_RXFLAG 0x0002
347 #define EV_TXEMPT 0x0004
348 #define EV_CTS 0x0008
349 #define EV_DSR 0x0010
350 #define EV_RLSD 0x0020
351 #define EV_BREAK 0x0040
352 #define EV_ERR 0x0080
353 #define EV_RING 0x0100
354 #define EV_PERR 0x0200
355 #define EV_RX80FULL 0x0400
356 #define EV_EVENT1 0x0800
357 #define EV_EVENT2 0x1000
359 #define SETXOFF 1
360 #define SETXON 2
361 #define SETRTS 3
362 #define CLRRTS 4
363 #define SETDTR 5
364 #define CLRDTR 6
365 #define RESETDEV 7
366 #define SETBREAK 8
367 #define CLRBREAK 9
369 /* Purge functions for Comm Port */
370 #define PURGE_TXABORT 0x0001 /* Kill the pending/current writes to the
371 comm port */
372 #define PURGE_RXABORT 0x0002 /*Kill the pending/current reads to
373 the comm port */
374 #define PURGE_TXCLEAR 0x0004 /* Kill the transmit queue if there*/
375 #define PURGE_RXCLEAR 0x0008 /* Kill the typeahead buffer if there*/
378 /* Modem Status Flags */
379 #define MS_CTS_ON ((DWORD)0x0010)
380 #define MS_DSR_ON ((DWORD)0x0020)
381 #define MS_RING_ON ((DWORD)0x0040)
382 #define MS_RLSD_ON ((DWORD)0x0080)
384 #define RTS_CONTROL_DISABLE 0
385 #define RTS_CONTROL_ENABLE 1
386 #define RTS_CONTROL_HANDSHAKE 2
387 #define RTS_CONTROL_TOGGLE 3
389 #define DTR_CONTROL_DISABLE 0
390 #define DTR_CONTROL_ENABLE 1
391 #define DTR_CONTROL_HANDSHAKE 2
394 #define LMEM_FIXED 0
395 #define LMEM_MOVEABLE 0x0002
396 #define LMEM_NOCOMPACT 0x0010
397 #define LMEM_NODISCARD 0x0020
398 #define LMEM_ZEROINIT 0x0040
399 #define LMEM_MODIFY 0x0080
400 #define LMEM_DISCARDABLE 0x0F00
401 #define LMEM_DISCARDED 0x4000
402 #define LMEM_LOCKCOUNT 0x00FF
404 #define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
405 #define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
407 #define NONZEROLHND (LMEM_MOVEABLE)
408 #define NONZEROLPTR (LMEM_FIXED)
410 #define GMEM_FIXED 0x0000
411 #define GMEM_MOVEABLE 0x0002
412 #define GMEM_NOCOMPACT 0x0010
413 #define GMEM_NODISCARD 0x0020
414 #define GMEM_ZEROINIT 0x0040
415 #define GMEM_MODIFY 0x0080
416 #define GMEM_DISCARDABLE 0x0100
417 #define GMEM_NOT_BANKED 0x1000
418 #define GMEM_SHARE 0x2000
419 #define GMEM_DDESHARE 0x2000
420 #define GMEM_NOTIFY 0x4000
421 #define GMEM_LOWER GMEM_NOT_BANKED
422 #define GMEM_DISCARDED 0x4000
423 #define GMEM_LOCKCOUNT 0x00ff
424 #define GMEM_INVALID_HANDLE 0x8000
426 #define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
427 #define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
429 #define INVALID_ATOM ((ATOM)0)
430 #define MAXINTATOM 0xc000
431 #define MAKEINTATOMA(atom) ((LPCSTR)((ULONG_PTR)((WORD)(atom))))
432 #define MAKEINTATOMW(atom) ((LPCWSTR)((ULONG_PTR)((WORD)(atom))))
433 #define MAKEINTATOM WINELIB_NAME_AW(MAKEINTATOM)
435 typedef struct tagMEMORYSTATUS
437 DWORD dwLength;
438 DWORD dwMemoryLoad;
439 DWORD dwTotalPhys;
440 DWORD dwAvailPhys;
441 DWORD dwTotalPageFile;
442 DWORD dwAvailPageFile;
443 DWORD dwTotalVirtual;
444 DWORD dwAvailVirtual;
445 } MEMORYSTATUS, *LPMEMORYSTATUS;
448 typedef struct {
449 WORD wYear;
450 WORD wMonth;
451 WORD wDayOfWeek;
452 WORD wDay;
453 WORD wHour;
454 WORD wMinute;
455 WORD wSecond;
456 WORD wMilliseconds;
457 } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
459 /* The 'overlapped' data structure used by async I/O functions.
461 typedef struct {
462 DWORD Internal;
463 DWORD InternalHigh;
464 DWORD Offset;
465 DWORD OffsetHigh;
466 HANDLE hEvent;
467 } OVERLAPPED, *LPOVERLAPPED;
469 typedef VOID (CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped);
471 /* Process startup information.
474 /* STARTUPINFO.dwFlags */
475 #define STARTF_USESHOWWINDOW 0x00000001
476 #define STARTF_USESIZE 0x00000002
477 #define STARTF_USEPOSITION 0x00000004
478 #define STARTF_USECOUNTCHARS 0x00000008
479 #define STARTF_USEFILLATTRIBUTE 0x00000010
480 #define STARTF_RUNFULLSCREEN 0x00000020
481 #define STARTF_FORCEONFEEDBACK 0x00000040
482 #define STARTF_FORCEOFFFEEDBACK 0x00000080
483 #define STARTF_USESTDHANDLES 0x00000100
484 #define STARTF_USEHOTKEY 0x00000200
486 typedef struct {
487 DWORD cb; /* 00: size of struct */
488 LPSTR lpReserved; /* 04: */
489 LPSTR lpDesktop; /* 08: */
490 LPSTR lpTitle; /* 0c: */
491 DWORD dwX; /* 10: */
492 DWORD dwY; /* 14: */
493 DWORD dwXSize; /* 18: */
494 DWORD dwYSize; /* 1c: */
495 DWORD dwXCountChars; /* 20: */
496 DWORD dwYCountChars; /* 24: */
497 DWORD dwFillAttribute; /* 28: */
498 DWORD dwFlags; /* 2c: */
499 WORD wShowWindow; /* 30: */
500 WORD cbReserved2; /* 32: */
501 BYTE *lpReserved2; /* 34: */
502 HANDLE hStdInput; /* 38: */
503 HANDLE hStdOutput; /* 3c: */
504 HANDLE hStdError; /* 40: */
505 } STARTUPINFOA, *LPSTARTUPINFOA;
507 typedef struct {
508 DWORD cb;
509 LPWSTR lpReserved;
510 LPWSTR lpDesktop;
511 LPWSTR lpTitle;
512 DWORD dwX;
513 DWORD dwY;
514 DWORD dwXSize;
515 DWORD dwYSize;
516 DWORD dwXCountChars;
517 DWORD dwYCountChars;
518 DWORD dwFillAttribute;
519 DWORD dwFlags;
520 WORD wShowWindow;
521 WORD cbReserved2;
522 BYTE *lpReserved2;
523 HANDLE hStdInput;
524 HANDLE hStdOutput;
525 HANDLE hStdError;
526 } STARTUPINFOW, *LPSTARTUPINFOW;
528 DECL_WINELIB_TYPE_AW(STARTUPINFO)
529 DECL_WINELIB_TYPE_AW(LPSTARTUPINFO)
531 typedef struct {
532 HANDLE hProcess;
533 HANDLE hThread;
534 DWORD dwProcessId;
535 DWORD dwThreadId;
536 } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
538 typedef struct {
539 LONG Bias;
540 WCHAR StandardName[32];
541 SYSTEMTIME StandardDate;
542 LONG StandardBias;
543 WCHAR DaylightName[32];
544 SYSTEMTIME DaylightDate;
545 LONG DaylightBias;
546 } TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
548 #define TIME_ZONE_ID_INVALID ((DWORD)0xFFFFFFFF)
549 #define TIME_ZONE_ID_UNKNOWN 0
550 #define TIME_ZONE_ID_STANDARD 1
551 #define TIME_ZONE_ID_DAYLIGHT 2
553 /* CreateProcess: dwCreationFlag values
555 #define DEBUG_PROCESS 0x00000001
556 #define DEBUG_ONLY_THIS_PROCESS 0x00000002
557 #define CREATE_SUSPENDED 0x00000004
558 #define DETACHED_PROCESS 0x00000008
559 #define CREATE_NEW_CONSOLE 0x00000010
560 #define NORMAL_PRIORITY_CLASS 0x00000020
561 #define IDLE_PRIORITY_CLASS 0x00000040
562 #define HIGH_PRIORITY_CLASS 0x00000080
563 #define REALTIME_PRIORITY_CLASS 0x00000100
564 #define CREATE_NEW_PROCESS_GROUP 0x00000200
565 #define CREATE_UNICODE_ENVIRONMENT 0x00000400
566 #define CREATE_SEPARATE_WOW_VDM 0x00000800
567 #define CREATE_SHARED_WOW_VDM 0x00001000
568 #define CREATE_DEFAULT_ERROR_MODE 0x04000000
569 #define CREATE_NO_WINDOW 0x08000000
570 #define PROFILE_USER 0x10000000
571 #define PROFILE_KERNEL 0x20000000
572 #define PROFILE_SERVER 0x40000000
575 /* File object type definitions
577 #define FILE_TYPE_UNKNOWN 0
578 #define FILE_TYPE_DISK 1
579 #define FILE_TYPE_CHAR 2
580 #define FILE_TYPE_PIPE 3
581 #define FILE_TYPE_REMOTE 32768
583 /* File creation flags
585 #define FILE_FLAG_WRITE_THROUGH 0x80000000UL
586 #define FILE_FLAG_OVERLAPPED 0x40000000L
587 #define FILE_FLAG_NO_BUFFERING 0x20000000L
588 #define FILE_FLAG_RANDOM_ACCESS 0x10000000L
589 #define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000L
590 #define FILE_FLAG_DELETE_ON_CLOSE 0x04000000L
591 #define FILE_FLAG_BACKUP_SEMANTICS 0x02000000L
592 #define FILE_FLAG_POSIX_SEMANTICS 0x01000000L
593 #define CREATE_NEW 1
594 #define CREATE_ALWAYS 2
595 #define OPEN_EXISTING 3
596 #define OPEN_ALWAYS 4
597 #define TRUNCATE_EXISTING 5
599 /* Standard handle identifiers
601 #define STD_INPUT_HANDLE ((DWORD) -10)
602 #define STD_OUTPUT_HANDLE ((DWORD) -11)
603 #define STD_ERROR_HANDLE ((DWORD) -12)
605 typedef struct
607 DWORD dwFileAttributes;
608 FILETIME ftCreationTime;
609 FILETIME ftLastAccessTime;
610 FILETIME ftLastWriteTime;
611 DWORD dwVolumeSerialNumber;
612 DWORD nFileSizeHigh;
613 DWORD nFileSizeLow;
614 DWORD nNumberOfLinks;
615 DWORD nFileIndexHigh;
616 DWORD nFileIndexLow;
617 } BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION ;
619 #define PIPE_ACCESS_INBOUND 1
620 #define PIPE_ACCESS_OUTBOUND 2
621 #define PIPE_ACCESS_DUPLEX 3
623 #define PIPE_TYPE_BYTE 0
624 #define PIPE_TYPE_MESSAGE 4
626 #define PIPE_READMODE_BYTE 0
627 #define PIPE_READMODE_MESSAGE 2
629 #define PIPE_WAIT 0
630 #define PIPE_NOWAIT 1
632 #define PIPE_UNLIMITED_INSTANCES 255
634 #define NMPWAIT_WAIT_FOREVER 0xffffffff
635 #define NMPWAIT_NOWAIT 0x00000001
636 #define NMPWAIT_USE_DEFAULT_WAIT 0x00000000
638 typedef struct _SYSTEM_POWER_STATUS
640 BYTE ACLineStatus;
641 BYTE BatteryFlag;
642 BYTE BatteryLifePercent;
643 BYTE reserved;
644 DWORD BatteryLifeTime;
645 DWORD BatteryFullLifeTime;
646 } SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;
649 typedef struct tagSYSTEM_INFO
651 union {
652 DWORD dwOemId; /* Obsolete field - do not use */
653 struct {
654 WORD wProcessorArchitecture;
655 WORD wReserved;
656 } DUMMYSTRUCTNAME;
657 } DUMMYUNIONNAME;
658 DWORD dwPageSize;
659 LPVOID lpMinimumApplicationAddress;
660 LPVOID lpMaximumApplicationAddress;
661 DWORD dwActiveProcessorMask;
662 DWORD dwNumberOfProcessors;
663 DWORD dwProcessorType;
664 DWORD dwAllocationGranularity;
665 WORD wProcessorLevel;
666 WORD wProcessorRevision;
667 } SYSTEM_INFO, *LPSYSTEM_INFO;
669 typedef BOOL (CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG);
670 typedef BOOL (CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG);
671 typedef BOOL (CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG);
672 typedef BOOL (CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG);
673 typedef BOOL (CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG);
674 typedef BOOL (CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG);
676 DECL_WINELIB_TYPE_AW(ENUMRESTYPEPROC)
677 DECL_WINELIB_TYPE_AW(ENUMRESNAMEPROC)
678 DECL_WINELIB_TYPE_AW(ENUMRESLANGPROC)
680 /* flags that can be passed to LoadLibraryEx */
681 #define DONT_RESOLVE_DLL_REFERENCES 0x00000001
682 #define LOAD_LIBRARY_AS_DATAFILE 0x00000002
683 #define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
685 /* ifdef _x86_ ... */
686 typedef struct _LDT_ENTRY {
687 WORD LimitLow;
688 WORD BaseLow;
689 union {
690 struct {
691 BYTE BaseMid;
692 BYTE Flags1;/*Declare as bytes to avoid alignment problems */
693 BYTE Flags2;
694 BYTE BaseHi;
695 } Bytes;
696 struct {
697 unsigned BaseMid : 8;
698 unsigned Type : 5;
699 unsigned Dpl : 2;
700 unsigned Pres : 1;
701 unsigned LimitHi : 4;
702 unsigned Sys : 1;
703 unsigned Reserved_0 : 1;
704 unsigned Default_Big : 1;
705 unsigned Granularity : 1;
706 unsigned BaseHi : 8;
707 } Bits;
708 } HighWord;
709 } LDT_ENTRY, *LPLDT_ENTRY;
712 typedef enum _GET_FILEEX_INFO_LEVELS {
713 GetFileExInfoStandard
714 } GET_FILEEX_INFO_LEVELS;
716 typedef struct _WIN32_FILE_ATTRIBUTES_DATA {
717 DWORD dwFileAttributes;
718 FILETIME ftCreationTime;
719 FILETIME ftLastAccessTime;
720 FILETIME ftLastWriteTime;
721 DWORD nFileSizeHigh;
722 DWORD nFileSizeLow;
723 } WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;
726 * This one seems to be a Win32 only definition. It also is defined with
727 * WINAPI instead of CALLBACK in the windows headers.
729 typedef DWORD (CALLBACK *LPPROGRESS_ROUTINE)(LARGE_INTEGER, LARGE_INTEGER, LARGE_INTEGER,
730 LARGE_INTEGER, DWORD, DWORD, HANDLE,
731 HANDLE, LPVOID);
734 #define WAIT_FAILED 0xffffffff
735 #define WAIT_OBJECT_0 0
736 #define WAIT_ABANDONED STATUS_ABANDONED_WAIT_0
737 #define WAIT_ABANDONED_0 STATUS_ABANDONED_WAIT_0
738 #define WAIT_IO_COMPLETION STATUS_USER_APC
739 #define WAIT_TIMEOUT STATUS_TIMEOUT
740 #define STILL_ACTIVE STATUS_PENDING
742 #define FILE_BEGIN 0
743 #define FILE_CURRENT 1
744 #define FILE_END 2
746 #define FILE_MAP_COPY 0x00000001
747 #define FILE_MAP_WRITE 0x00000002
748 #define FILE_MAP_READ 0x00000004
749 #define FILE_MAP_ALL_ACCESS 0x000f001f
751 #define MOVEFILE_REPLACE_EXISTING 0x00000001
752 #define MOVEFILE_COPY_ALLOWED 0x00000002
753 #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
755 #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
756 #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
757 #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
758 #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
759 #define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED
760 #define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION
762 #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
763 #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
764 #define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
765 #define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
766 #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
767 #define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
768 #define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
769 #define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
770 #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
771 #define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
772 #define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
773 #define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
774 #define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
775 #define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
776 #define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
777 #define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
778 #define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
779 #define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
780 #define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
781 #define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
782 #define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
783 #define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
784 #define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
786 /* Wine extension; Windows doesn't have a name for this code */
787 #define EXCEPTION_CRITICAL_SECTION_WAIT 0xc0000194
789 #define DUPLICATE_CLOSE_SOURCE 0x00000001
790 #define DUPLICATE_SAME_ACCESS 0x00000002
792 #define HANDLE_FLAG_INHERIT 0x00000001
793 #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002
795 #define HINSTANCE_ERROR 32
797 #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
798 #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
799 #define THREAD_PRIORITY_NORMAL 0
800 #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
801 #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
802 #define THREAD_PRIORITY_ERROR_RETURN (0x7fffffff)
803 #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
804 #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
806 /* flags to FormatMessage */
807 #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
808 #define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200
809 #define FORMAT_MESSAGE_FROM_STRING 0x00000400
810 #define FORMAT_MESSAGE_FROM_HMODULE 0x00000800
811 #define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000
812 #define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000
813 #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF
815 #ifdef __WINE__
816 #define CRITICAL_SECTION_INIT(name) { (void *)(__FILE__ ": " name), -1, 0, 0, 0, 0 }
817 #endif
819 typedef struct {
820 DWORD dwOSVersionInfoSize;
821 DWORD dwMajorVersion;
822 DWORD dwMinorVersion;
823 DWORD dwBuildNumber;
824 DWORD dwPlatformId;
825 CHAR szCSDVersion[128];
826 } OSVERSIONINFOA, *POSVERSIONINFOA, *LPOSVERSIONINFOA;
828 typedef struct {
829 DWORD dwOSVersionInfoSize;
830 DWORD dwMajorVersion;
831 DWORD dwMinorVersion;
832 DWORD dwBuildNumber;
833 DWORD dwPlatformId;
834 WCHAR szCSDVersion[128];
835 } OSVERSIONINFOW, *POSVERSIONINFOW, *LPOSVERSIONINFOW;
837 DECL_WINELIB_TYPE_AW(OSVERSIONINFO)
838 DECL_WINELIB_TYPE_AW(POSVERSIONINFO)
839 DECL_WINELIB_TYPE_AW(LPOSVERSIONINFO)
841 #define VER_PLATFORM_WIN32s 0
842 #define VER_PLATFORM_WIN32_WINDOWS 1
843 #define VER_PLATFORM_WIN32_NT 2
845 typedef struct tagCOMSTAT
847 DWORD status;
848 DWORD cbInQue;
849 DWORD cbOutQue;
850 } COMSTAT,*LPCOMSTAT;
852 typedef struct tagDCB
854 DWORD DCBlength;
855 DWORD BaudRate;
856 unsigned fBinary :1;
857 unsigned fParity :1;
858 unsigned fOutxCtsFlow :1;
859 unsigned fOutxDsrFlow :1;
860 unsigned fDtrControl :2;
861 unsigned fDsrSensitivity :1;
862 unsigned fTXContinueOnXoff :1;
863 unsigned fOutX :1;
864 unsigned fInX :1;
865 unsigned fErrorChar :1;
866 unsigned fNull :1;
867 unsigned fRtsControl :2;
868 unsigned fAbortOnError :1;
869 unsigned fDummy2 :17;
870 WORD wReserved;
871 WORD XonLim;
872 WORD XoffLim;
873 BYTE ByteSize;
874 BYTE Parity;
875 BYTE StopBits;
876 char XonChar;
877 char XoffChar;
878 char ErrorChar;
879 char EofChar;
880 char EvtChar;
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 /*DWORD WINAPI GetVersion( void );*/
1013 BOOL WINAPI GetVersionExA(OSVERSIONINFOA*);
1014 BOOL WINAPI GetVersionExW(OSVERSIONINFOW*);
1015 #define GetVersionEx WINELIB_NAME_AW(GetVersionEx)
1017 /*int WinMain(HINSTANCE, HINSTANCE prev, char *cmd, int show);*/
1019 /* FIXME: need to use defines because we don't have proper imports everywhere yet */
1020 #ifndef have_proper_imports
1021 LONG WINAPI RtlEnterCriticalSection( CRITICAL_SECTION *crit );
1022 LONG WINAPI RtlLeaveCriticalSection( CRITICAL_SECTION *crit );
1023 LONG WINAPI RtlDeleteCriticalSection( CRITICAL_SECTION *crit );
1024 BOOL WINAPI RtlTryEnterCriticalSection( CRITICAL_SECTION *crit );
1025 PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,ULONG);
1026 BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
1027 PVOID WINAPI RtlReAllocateHeap(HANDLE,ULONG,PVOID,ULONG);
1028 ULONG WINAPI RtlSizeHeap(HANDLE,ULONG,PVOID);
1029 #define HeapAlloc(heap,flags,size) RtlAllocateHeap(heap,flags,size)
1030 #define HeapFree(heap,flags,ptr) RtlFreeHeap(heap,flags,ptr)
1031 #define HeapReAlloc(heap,flags,ptr,size) RtlReAllocateHeap(heap,flags,ptr,size)
1032 #define HeapSize(heap,flags,ptr) RtlSizeHeap(heap,flags,ptr)
1033 #define EnterCriticalSection(crit) RtlEnterCriticalSection(crit)
1034 #define LeaveCriticalSection(crit) RtlLeaveCriticalSection(crit)
1035 #define DeleteCriticalSection(crit) RtlDeleteCriticalSection(crit)
1036 #define TryEnterCriticalSection(crit) RtlTryEnterCriticalSection(crit)
1037 #else
1038 LPVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD);
1039 BOOL WINAPI HeapFree(HANDLE,DWORD,LPVOID);
1040 LPVOID WINAPI HeapReAlloc(HANDLE,DWORD,LPVOID,DWORD);
1041 DWORD WINAPI HeapSize(HANDLE,DWORD,LPVOID);
1042 void WINAPI DeleteCriticalSection(CRITICAL_SECTION *lpCrit);
1043 void WINAPI EnterCriticalSection(CRITICAL_SECTION *lpCrit);
1044 BOOL WINAPI TryEnterCriticalSection(CRITICAL_SECTION *lpCrit);
1045 void WINAPI LeaveCriticalSection(CRITICAL_SECTION *lpCrit);
1046 #endif
1048 void WINAPI InitializeCriticalSection(CRITICAL_SECTION *lpCrit);
1049 BOOL WINAPI InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION *,DWORD);
1050 void WINAPI MakeCriticalSectionGlobal(CRITICAL_SECTION *lpCrit);
1051 BOOL WINAPI GetProcessWorkingSetSize(HANDLE,LPDWORD,LPDWORD);
1052 DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,ULONG_PTR);
1053 void WINAPI RaiseException(DWORD,DWORD,DWORD,const LPDWORD);
1054 BOOL WINAPI SetProcessWorkingSetSize(HANDLE,DWORD,DWORD);
1055 BOOL WINAPI TerminateProcess(HANDLE,DWORD);
1056 BOOL WINAPI TerminateThread(HANDLE,DWORD);
1057 BOOL WINAPI GetExitCodeThread(HANDLE,LPDWORD);
1059 /* GetBinaryType return values.
1062 #define SCS_32BIT_BINARY 0
1063 #define SCS_DOS_BINARY 1
1064 #define SCS_WOW_BINARY 2
1065 #define SCS_PIF_BINARY 3
1066 #define SCS_POSIX_BINARY 4
1067 #define SCS_OS216_BINARY 5
1069 BOOL WINAPI GetBinaryTypeA( LPCSTR lpApplicationName, LPDWORD lpBinaryType );
1070 BOOL WINAPI GetBinaryTypeW( LPCWSTR lpApplicationName, LPDWORD lpBinaryType );
1071 #define GetBinaryType WINELIB_NAME_AW(GetBinaryType)
1073 /* Declarations for functions that exist only in Win32 */
1075 BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
1076 BOOL WINAPI AttachThreadInput(DWORD,DWORD,BOOL);
1077 BOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR,HANDLE,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,LPDWORD,LPDWORD,LPBOOL);
1078 BOOL WINAPI AdjustTokenPrivileges(HANDLE,BOOL,LPVOID,DWORD,LPVOID,LPDWORD);
1079 BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
1080 BOOL WINAPI AllocateLocallyUniqueId(PLUID);
1081 BOOL WINAPI AreFileApisANSI(void);
1082 BOOL WINAPI BackupEventLogA(HANDLE,LPCSTR);
1083 BOOL WINAPI BackupEventLogW(HANDLE,LPCWSTR);
1084 #define BackupEventLog WINELIB_NAME_AW(BackupEventLog)
1085 BOOL WINAPI BackupRead(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
1086 BOOL WINAPI BackupSeek(HANDLE,DWORD,DWORD,LPDWORD,LPDWORD,LPVOID*);
1087 BOOL WINAPI BackupWrite(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
1088 BOOL WINAPI Beep(DWORD,DWORD);
1089 BOOL WINAPI BuildCommDCBA(LPCSTR,LPDCB);
1090 BOOL WINAPI BuildCommDCBW(LPCWSTR,LPDCB);
1091 #define BuildCommDCB WINELIB_NAME_AW(BuildCommDCB)
1092 BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR,LPDCB,LPCOMMTIMEOUTS);
1093 BOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR,LPDCB,LPCOMMTIMEOUTS);
1094 #define BuildCommDCBAndTimeouts WINELIB_NAME_AW(BuildCommDCBAndTimeouts)
1095 BOOL WINAPI CancelIo(HANDLE);
1096 BOOL WINAPI CancelWaitableTimer(HANDLE);
1097 BOOL WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL);
1098 BOOL WINAPI ClearCommBreak(HANDLE);
1099 BOOL WINAPI ClearCommError(HANDLE,LPDWORD,LPCOMSTAT);
1100 BOOL WINAPI ClearEventLogA(HANDLE,LPCSTR);
1101 BOOL WINAPI ClearEventLogW(HANDLE,LPCWSTR);
1102 #define ClearEventLog WINELIB_NAME_AW(ClearEventLog)
1103 BOOL WINAPI CloseEventLog(HANDLE);
1104 BOOL WINAPI CloseHandle(HANDLE);
1105 BOOL WINAPI CommConfigDialogA(LPCSTR,HANDLE,LPCOMMCONFIG);
1106 BOOL WINAPI CommConfigDialogW(LPCWSTR,HANDLE,LPCOMMCONFIG);
1107 #define CommConfigDialog WINELIB_NAME_AW(CommConfigDialog)
1108 BOOL WINAPI ConnectNamedPipe(HANDLE,LPOVERLAPPED);
1109 BOOL WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD);
1110 HANDLE WINAPI ConvertToGlobalHandle(HANDLE hSrc);
1111 BOOL WINAPI CopyFileA(LPCSTR,LPCSTR,BOOL);
1112 BOOL WINAPI CopyFileW(LPCWSTR,LPCWSTR,BOOL);
1113 #define CopyFile WINELIB_NAME_AW(CopyFile)
1114 BOOL WINAPI CopyFileExA(LPCSTR, LPCSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
1115 BOOL WINAPI CopyFileExW(LPCWSTR, LPCWSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
1116 #define CopyFileEx WINELIB_NAME_AW(CopyFileEx)
1117 BOOL WINAPI CopySid(DWORD,PSID,PSID);
1118 INT WINAPI CompareFileTime(LPFILETIME,LPFILETIME);
1119 HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCSTR);
1120 HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCWSTR);
1121 #define CreateEvent WINELIB_NAME_AW(CreateEvent)
1122 HANDLE WINAPI CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,
1123 DWORD,DWORD,HANDLE);
1124 HANDLE WINAPI CreateFileW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,
1125 DWORD,DWORD,HANDLE);
1126 #define CreateFile WINELIB_NAME_AW(CreateFile)
1127 HANDLE WINAPI CreateFileMappingA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,
1128 DWORD,DWORD,LPCSTR);
1129 HANDLE WINAPI CreateFileMappingW(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,
1130 DWORD,DWORD,LPCWSTR);
1131 #define CreateFileMapping WINELIB_NAME_AW(CreateFileMapping)
1132 HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
1133 HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
1134 #define CreateMutex WINELIB_NAME_AW(CreateMutex)
1135 HANDLE WINAPI CreateNamedPipeA(LPCSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
1136 HANDLE WINAPI CreateNamedPipeW(LPCWSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
1137 #define CreateNamedPipe WINELIB_NAME_AW(CreateNamedPipe)
1138 BOOL WINAPI CreatePipe(PHANDLE,PHANDLE,LPSECURITY_ATTRIBUTES,DWORD);
1139 BOOL WINAPI CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,
1140 LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCSTR,
1141 LPSTARTUPINFOA,LPPROCESS_INFORMATION);
1142 BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,
1143 LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCWSTR,
1144 LPSTARTUPINFOW,LPPROCESS_INFORMATION);
1145 #define CreateProcess WINELIB_NAME_AW(CreateProcess)
1146 HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
1147 HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR);
1148 HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR);
1149 #define CreateSemaphore WINELIB_NAME_AW(CreateSemaphore)
1150 DWORD WINAPI CreateTapePartition(HANDLE,DWORD,DWORD,DWORD);
1151 HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
1152 HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
1153 HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
1154 #define CreateWaitableTimer WINELIB_NAME_AW(CreateWaitableTimer)
1155 BOOL WINAPI DebugActiveProcess(DWORD);
1156 BOOL WINAPI DebugActiveProcessStop(DWORD);
1157 void WINAPI DebugBreak(void);
1158 BOOL WINAPI DebugBreakProcess(HANDLE);
1159 BOOL WINAPI DebugSetProcessKillOnExit(BOOL);
1160 BOOL WINAPI DeregisterEventSource(HANDLE);
1161 BOOL WINAPI DeviceIoControl(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
1162 BOOL WINAPI DisableThreadLibraryCalls(HMODULE);
1163 BOOL WINAPI DosDateTimeToFileTime(WORD,WORD,LPFILETIME);
1164 BOOL WINAPI DuplicateHandle(HANDLE,HANDLE,HANDLE,HANDLE*,DWORD,BOOL,DWORD);
1165 BOOL WINAPI EscapeCommFunction(HANDLE,UINT);
1166 BOOL WINAPI EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,
1167 ENUMRESLANGPROCA,LONG);
1168 BOOL WINAPI EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,
1169 ENUMRESLANGPROCW,LONG);
1170 #define EnumResourceLanguages WINELIB_NAME_AW(EnumResourceLanguages)
1171 BOOL WINAPI EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROCA,
1172 LONG);
1173 BOOL WINAPI EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROCW,
1174 LONG);
1175 #define EnumResourceNames WINELIB_NAME_AW(EnumResourceNames)
1176 BOOL WINAPI EnumResourceTypesA(HMODULE,ENUMRESTYPEPROCA,LONG);
1177 BOOL WINAPI EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG);
1178 #define EnumResourceTypes WINELIB_NAME_AW(EnumResourceTypes)
1179 BOOL WINAPI EqualSid(PSID, PSID);
1180 BOOL WINAPI EqualPrefixSid(PSID,PSID);
1181 DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL);
1182 VOID WINAPI ExitProcess(DWORD) WINE_NORETURN;
1183 VOID WINAPI ExitThread(DWORD) WINE_NORETURN;
1184 DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
1185 DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
1186 #define ExpandEnvironmentStrings WINELIB_NAME_AW(ExpandEnvironmentStrings)
1187 BOOL WINAPI FileTimeToDosDateTime(const FILETIME*,LPWORD,LPWORD);
1188 BOOL WINAPI FileTimeToLocalFileTime(const FILETIME*,LPFILETIME);
1189 BOOL WINAPI FileTimeToSystemTime(const FILETIME*,LPSYSTEMTIME);
1190 HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR,BOOL,DWORD);
1191 HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR,BOOL,DWORD);
1192 #define FindFirstChangeNotification WINELIB_NAME_AW(FindFirstChangeNotification)
1193 BOOL WINAPI FindNextChangeNotification(HANDLE);
1194 BOOL WINAPI FindCloseChangeNotification(HANDLE);
1195 HRSRC WINAPI FindResourceExA(HMODULE,LPCSTR,LPCSTR,WORD);
1196 HRSRC WINAPI FindResourceExW(HMODULE,LPCWSTR,LPCWSTR,WORD);
1197 #define FindResourceEx WINELIB_NAME_AW(FindResourceEx)
1198 BOOL WINAPI FlushFileBuffers(HANDLE);
1199 BOOL WINAPI FlushViewOfFile(LPCVOID, DWORD);
1200 DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
1201 DWORD WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
1202 #define FormatMessage WINELIB_NAME_AW(FormatMessage)
1203 BOOL WINAPI FreeEnvironmentStringsA(LPSTR);
1204 BOOL WINAPI FreeEnvironmentStringsW(LPWSTR);
1205 #define FreeEnvironmentStrings WINELIB_NAME_AW(FreeEnvironmentStrings)
1206 VOID WINAPI FreeLibraryAndExitThread(HINSTANCE,DWORD);
1207 PVOID WINAPI FreeSid(PSID);
1208 BOOL WINAPI GetCommConfig(HANDLE,LPCOMMCONFIG,LPDWORD);
1209 BOOL WINAPI GetCommMask(HANDLE,LPDWORD);
1210 BOOL WINAPI GetCommModemStatus(HANDLE,LPDWORD);
1211 BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP);
1212 BOOL WINAPI GetCommState(HANDLE,LPDCB);
1213 BOOL WINAPI GetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
1214 LPSTR WINAPI GetCommandLineA(void);
1215 LPWSTR WINAPI GetCommandLineW(void);
1216 #define GetCommandLine WINELIB_NAME_AW(GetCommandLine)
1217 BOOL WINAPI GetComputerNameA(LPSTR,LPDWORD);
1218 BOOL WINAPI GetComputerNameW(LPWSTR,LPDWORD);
1219 #define GetComputerName WINELIB_NAME_AW(GetComputerName)
1220 BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
1221 BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD);
1222 #define GetComputerNameEx WINELIB_NAME_AW(GetComputerNameEx)
1223 HANDLE WINAPI GetCurrentProcess(void);
1224 HANDLE WINAPI GetCurrentThread(void);
1225 BOOL WINAPI GetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,LPDWORD);
1226 BOOL WINAPI GetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,LPDWORD);
1227 #define GetDefaultCommConfig WINELIB_NAME_AW(GetDefaultCommConfig)
1228 LPSTR WINAPI GetEnvironmentStringsA(void);
1229 LPWSTR WINAPI GetEnvironmentStringsW(void);
1230 #define GetEnvironmentStrings WINELIB_NAME_AW(GetEnvironmentStrings)
1231 DWORD WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD);
1232 DWORD WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD);
1233 #define GetEnvironmentVariable WINELIB_NAME_AW(GetEnvironmentVariable)
1234 BOOL WINAPI GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
1235 BOOL WINAPI GetFileAttributesExW(LPCWSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
1236 #define GetFileattributesEx WINELIB_NAME_AW(GetFileAttributesEx)
1237 DWORD WINAPI GetFileInformationByHandle(HANDLE,BY_HANDLE_FILE_INFORMATION*);
1238 BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
1239 BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
1240 #define GetFileSecurity WINELIB_NAME_AW(GetFileSecurity)
1241 DWORD WINAPI GetFileSize(HANDLE,LPDWORD);
1242 BOOL WINAPI GetFileTime(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME);
1243 DWORD WINAPI GetFileType(HANDLE);
1244 DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*);
1245 DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
1246 #define GetFullPathName WINELIB_NAME_AW(GetFullPathName)
1247 BOOL WINAPI GetHandleInformation(HANDLE,LPDWORD);
1248 DWORD WINAPI GetLengthSid(PSID);
1249 VOID WINAPI GetLocalTime(LPSYSTEMTIME);
1250 DWORD WINAPI GetLogicalDrives(void);
1251 DWORD WINAPI GetLongPathNameA(LPCSTR,LPSTR,DWORD);
1252 DWORD WINAPI GetLongPathNameW(LPCWSTR,LPWSTR,DWORD);
1253 #define GetLongPathName WINELIB_NAME_AW(GetLongPathName)
1254 BOOL WINAPI GetNumberOfEventLogRecords(HANDLE,PDWORD);
1255 BOOL WINAPI GetOldestEventLogRecord(HANDLE,PDWORD);
1256 DWORD WINAPI GetPriorityClass(HANDLE);
1257 BOOL WINAPI GetProcessTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
1258 DWORD WINAPI GetProcessVersion(DWORD);
1259 BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
1260 BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL *,LPBOOL);
1261 BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID *,LPBOOL);
1262 DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR);
1263 BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID *,LPBOOL);
1264 BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL *,LPBOOL);
1265 PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID);
1266 DWORD WINAPI GetSidLengthRequired(BYTE);
1267 PDWORD WINAPI GetSidSubAuthority(PSID,DWORD);
1268 PUCHAR WINAPI GetSidSubAuthorityCount(PSID);
1269 DWORD WINAPI GetShortPathNameA(LPCSTR,LPSTR,DWORD);
1270 DWORD WINAPI GetShortPathNameW(LPCWSTR,LPWSTR,DWORD);
1271 #define GetShortPathName WINELIB_NAME_AW(GetShortPathName)
1272 HANDLE WINAPI GetStdHandle(DWORD);
1273 VOID WINAPI GetSystemInfo(LPSYSTEM_INFO);
1274 BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
1275 VOID WINAPI GetSystemTime(LPSYSTEMTIME);
1276 VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME);
1277 DWORD WINAPI GetTapeParameters(HANDLE,DWORD,LPDWORD,LPVOID);
1278 DWORD WINAPI GetTapePosition(HANDLE,DWORD,LPDWORD,LPDWORD,LPDWORD);
1279 DWORD WINAPI GetTapeStatus(HANDLE);
1280 DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
1281 BOOL WINAPI GetThreadContext(HANDLE,CONTEXT *);
1282 INT WINAPI GetThreadPriority(HANDLE);
1283 BOOL WINAPI GetThreadPriorityBoost(HANDLE,PBOOL);
1284 BOOL WINAPI GetThreadSelectorEntry(HANDLE,DWORD,LPLDT_ENTRY);
1285 BOOL WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
1286 BOOL WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,LPVOID,DWORD,LPDWORD);
1287 BOOL WINAPI GetUserNameA(LPSTR,LPDWORD);
1288 BOOL WINAPI GetUserNameW(LPWSTR,LPDWORD);
1289 #define GetUserName WINELIB_NAME_AW(GetUserName)
1290 VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS);
1291 DWORD WINAPI HeapCompact(HANDLE,DWORD);
1292 HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD);
1293 BOOL WINAPI HeapDestroy(HANDLE);
1294 BOOL WINAPI HeapLock(HANDLE);
1295 BOOL WINAPI HeapUnlock(HANDLE);
1296 BOOL WINAPI HeapValidate(HANDLE,DWORD,LPCVOID);
1297 BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
1298 DWORD WINAPI InitializeAcl(PACL,DWORD,DWORD);
1299 BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
1300 BOOL WINAPI InitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
1301 BOOL WINAPI IsTextUnicode(CONST LPVOID lpBuffer, int cb, LPINT lpi);
1302 BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
1303 BOOL WINAPI IsValidSid(PSID);
1304 BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
1305 BOOL WINAPI IsProcessorFeaturePresent(DWORD);
1306 BOOL WINAPI LookupAccountSidA(LPCSTR,PSID,LPSTR,LPDWORD,LPSTR,LPDWORD,PSID_NAME_USE);
1307 BOOL WINAPI LookupAccountSidW(LPCWSTR,PSID,LPWSTR,LPDWORD,LPWSTR,LPDWORD,PSID_NAME_USE);
1308 #define LookupAccountSid WINELIB_NAME_AW(LookupAccountSid)
1309 BOOL WINAPI LocalFileTimeToFileTime(const FILETIME*,LPFILETIME);
1310 BOOL WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1311 BOOL WINAPI LockFileEx(HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED);
1312 BOOL WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,LPVOID);
1313 BOOL WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,LPVOID);
1314 #define LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
1315 BOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
1316 HMODULE WINAPI MapHModuleSL(WORD);
1317 WORD WINAPI MapHModuleLS(HMODULE);
1318 LPVOID WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1319 LPVOID WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,LPVOID);
1320 BOOL WINAPI MoveFileA(LPCSTR,LPCSTR);
1321 BOOL WINAPI MoveFileW(LPCWSTR,LPCWSTR);
1322 #define MoveFile WINELIB_NAME_AW(MoveFile)
1323 BOOL WINAPI MoveFileExA(LPCSTR,LPCSTR,DWORD);
1324 BOOL WINAPI MoveFileExW(LPCWSTR,LPCWSTR,DWORD);
1325 #define MoveFileEx WINELIB_NAME_AW(MoveFileEx)
1326 BOOL WINAPI NotifyChangeEventLog(HANDLE,HANDLE);
1327 HANDLE WINAPI OpenBackupEventLogA(LPCSTR,LPCSTR);
1328 HANDLE WINAPI OpenBackupEventLogW(LPCWSTR,LPCWSTR);
1329 #define OpenBackupEventLog WINELIB_NAME_AW(OpenBackupEventLog)
1330 HANDLE WINAPI OpenEventA(DWORD,BOOL,LPCSTR);
1331 HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR);
1332 #define OpenEvent WINELIB_NAME_AW(OpenEvent)
1333 HANDLE WINAPI OpenEventLogA(LPCSTR,LPCSTR);
1334 HANDLE WINAPI OpenEventLogW(LPCWSTR,LPCWSTR);
1335 #define OpenEventLog WINELIB_NAME_AW(OpenEventLog)
1336 HANDLE WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR);
1337 HANDLE WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR);
1338 #define OpenFileMapping WINELIB_NAME_AW(OpenFileMapping)
1339 HANDLE WINAPI OpenMutexA(DWORD,BOOL,LPCSTR);
1340 HANDLE WINAPI OpenMutexW(DWORD,BOOL,LPCWSTR);
1341 #define OpenMutex WINELIB_NAME_AW(OpenMutex)
1342 HANDLE WINAPI OpenProcess(DWORD,BOOL,DWORD);
1343 BOOL WINAPI OpenProcessToken(HANDLE,DWORD,PHANDLE);
1344 HANDLE WINAPI OpenSemaphoreA(DWORD,BOOL,LPCSTR);
1345 HANDLE WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR);
1346 #define OpenSemaphore WINELIB_NAME_AW(OpenSemaphore)
1347 BOOL WINAPI OpenThreadToken(HANDLE,DWORD,BOOL,PHANDLE);
1348 HANDLE WINAPI OpenWaitableTimerA(DWORD,BOOL,LPCSTR);
1349 HANDLE WINAPI OpenWaitableTimerW(DWORD,BOOL,LPCWSTR);
1350 #define OpenWaitableTimer WINELIB_NAME_AW(OpenWaitableTimer)
1351 DWORD WINAPI PrepareTape(HANDLE,DWORD,BOOL);
1352 BOOL WINAPI PulseEvent(HANDLE);
1353 BOOL WINAPI PurgeComm(HANDLE,DWORD);
1354 DWORD WINAPI QueryDosDeviceA(LPCSTR,LPSTR,DWORD);
1355 DWORD WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
1356 #define QueryDosDevice WINELIB_NAME_AW(QueryDosDevice)
1357 BOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER*);
1358 BOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER*);
1359 BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
1360 BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
1361 #define ReadEventLog WINELIB_NAME_AW(ReadEventLog)
1362 BOOL WINAPI ReadFile(HANDLE,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
1363 BOOL WINAPI ReadFileEx(HANDLE,LPVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
1364 HANDLE WINAPI RegisterEventSourceA(LPCSTR,LPCSTR);
1365 HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
1366 #define RegisterEventSource WINELIB_NAME_AW(RegisterEventSource)
1367 BOOL WINAPI ReleaseMutex(HANDLE);
1368 BOOL WINAPI ReleaseSemaphore(HANDLE,LONG,LPLONG);
1369 BOOL WINAPI ReportEventA(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCSTR *,LPVOID);
1370 BOOL WINAPI ReportEventW(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCWSTR *,LPVOID);
1371 #define ReportEvent WINELIB_NAME_AW(ReportEvent)
1372 BOOL WINAPI ResetEvent(HANDLE);
1373 DWORD WINAPI ResumeThread(HANDLE);
1374 BOOL WINAPI RevertToSelf(void);
1375 DWORD WINAPI SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*);
1376 DWORD WINAPI SearchPathW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPWSTR*);
1377 #define SearchPath WINELIB_NAME_AW(SearchPath)
1378 BOOL WINAPI SetCommConfig(HANDLE,LPCOMMCONFIG,DWORD);
1379 BOOL WINAPI SetCommBreak(HANDLE);
1380 BOOL WINAPI SetCommMask(HANDLE,DWORD);
1381 BOOL WINAPI SetCommState(HANDLE,LPDCB);
1382 BOOL WINAPI SetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
1383 BOOL WINAPI SetComputerNameA(LPCSTR);
1384 BOOL WINAPI SetComputerNameW(LPCWSTR);
1385 #define SetComputerName WINELIB_NAME_AW(SetComputerName)
1386 BOOL WINAPI SetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,DWORD);
1387 BOOL WINAPI SetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,DWORD);
1388 #define SetDefaultCommConfig WINELIB_NAME_AW(SetDefaultCommConfig)
1389 BOOL WINAPI SetEndOfFile(HANDLE);
1390 BOOL WINAPI SetEnvironmentVariableA(LPCSTR,LPCSTR);
1391 BOOL WINAPI SetEnvironmentVariableW(LPCWSTR,LPCWSTR);
1392 #define SetEnvironmentVariable WINELIB_NAME_AW(SetEnvironmentVariable)
1393 BOOL WINAPI SetEvent(HANDLE);
1394 VOID WINAPI SetFileApisToANSI(void);
1395 VOID WINAPI SetFileApisToOEM(void);
1396 DWORD WINAPI SetFilePointer(HANDLE,LONG,LPLONG,DWORD);
1397 BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1398 BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1399 #define SetFileSecurity WINELIB_NAME_AW(SetFileSecurity)
1400 BOOL WINAPI SetFileTime(HANDLE,const FILETIME*,const FILETIME*,const FILETIME*);
1401 BOOL WINAPI SetHandleInformation(HANDLE,DWORD,DWORD);
1402 BOOL WINAPI SetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1403 BOOL WINAPI SetPriorityClass(HANDLE,DWORD);
1404 BOOL WINAPI SetLocalTime(const SYSTEMTIME*);
1405 BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
1406 BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL);
1407 BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID,BOOL);
1408 BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
1409 BOOL WINAPI SetStdHandle(DWORD,HANDLE);
1410 BOOL WINAPI SetSystemPowerState(BOOL,BOOL);
1411 BOOL WINAPI SetSystemTime(const SYSTEMTIME*);
1412 DWORD WINAPI SetTapeParameters(HANDLE,DWORD,LPVOID);
1413 DWORD WINAPI SetTapePosition(HANDLE,DWORD,DWORD,DWORD,DWORD,BOOL);
1414 DWORD WINAPI SetThreadAffinityMask(HANDLE,DWORD);
1415 BOOL WINAPI SetThreadContext(HANDLE,const CONTEXT *);
1416 DWORD WINAPI SetThreadExecutionState(EXECUTION_STATE);
1417 BOOL WINAPI SetThreadPriority(HANDLE,INT);
1418 BOOL WINAPI SetThreadPriorityBoost(HANDLE,BOOL);
1419 BOOL WINAPI SetThreadToken(PHANDLE,HANDLE);
1420 BOOL WINAPI SetTimeZoneInformation(const LPTIME_ZONE_INFORMATION);
1421 BOOL WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,LPVOID,BOOL);
1422 BOOL WINAPI SetupComm(HANDLE,DWORD,DWORD);
1423 VOID WINAPI Sleep(DWORD);
1424 DWORD WINAPI SleepEx(DWORD,BOOL);
1425 DWORD WINAPI SuspendThread(HANDLE);
1426 BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
1427 DWORD WINAPI TlsAlloc(void);
1428 BOOL WINAPI TlsFree(DWORD);
1429 LPVOID WINAPI TlsGetValue(DWORD);
1430 BOOL WINAPI TlsSetValue(DWORD,LPVOID);
1431 BOOL WINAPI TransmitCommChar(HANDLE,CHAR);
1432 BOOL WINAPI UnlockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1433 BOOL WINAPI UnmapViewOfFile(LPVOID);
1434 LPVOID WINAPI VirtualAlloc(LPVOID,DWORD,DWORD,DWORD);
1435 LPVOID WINAPI VirtualAllocEx(HANDLE,LPVOID,DWORD,DWORD,DWORD);
1436 BOOL WINAPI VirtualFree(LPVOID,DWORD,DWORD);
1437 BOOL WINAPI VirtualLock(LPVOID,DWORD);
1438 BOOL WINAPI VirtualProtect(LPVOID,DWORD,DWORD,LPDWORD);
1439 BOOL WINAPI VirtualProtectEx(HANDLE,LPVOID,DWORD,DWORD,LPDWORD);
1440 DWORD WINAPI VirtualQuery(LPCVOID,LPMEMORY_BASIC_INFORMATION,DWORD);
1441 DWORD WINAPI VirtualQueryEx(HANDLE,LPCVOID,LPMEMORY_BASIC_INFORMATION,DWORD);
1442 BOOL WINAPI VirtualUnlock(LPVOID,DWORD);
1443 BOOL WINAPI WaitCommEvent(HANDLE,LPDWORD,LPOVERLAPPED);
1444 BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD);
1445 DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD);
1446 DWORD WINAPI WaitForMultipleObjectsEx(DWORD,const HANDLE*,BOOL,DWORD,BOOL);
1447 DWORD WINAPI WaitForSingleObject(HANDLE,DWORD);
1448 DWORD WINAPI WaitForSingleObjectEx(HANDLE,DWORD,BOOL);
1449 BOOL WINAPI WaitNamedPipeA(LPCSTR,DWORD);
1450 BOOL WINAPI WaitNamedPipeW(LPCWSTR,DWORD);
1451 #define WaitNamedPipe WINELIB_NAME_AW(WaitNamedPipe)
1452 BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
1453 BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
1454 DWORD WINAPI WriteTapemark(HANDLE,DWORD,DWORD,BOOL);
1455 ATOM WINAPI AddAtomA(LPCSTR);
1456 ATOM WINAPI AddAtomW(LPCWSTR);
1457 #define AddAtom WINELIB_NAME_AW(AddAtom)
1458 BOOL WINAPI CreateDirectoryA(LPCSTR,LPSECURITY_ATTRIBUTES);
1459 BOOL WINAPI CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES);
1460 #define CreateDirectory WINELIB_NAME_AW(CreateDirectory)
1461 BOOL WINAPI CreateDirectoryExA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES);
1462 BOOL WINAPI CreateDirectoryExW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES);
1463 #define CreateDirectoryEx WINELIB_NAME_AW(CreateDirectoryEx)
1464 BOOL WINAPI DefineDosDeviceA(DWORD,LPCSTR,LPCSTR);
1465 #define DefineHandleTable(w) ((w),TRUE)
1466 ATOM WINAPI DeleteAtom(ATOM);
1467 BOOL WINAPI DeleteFileA(LPCSTR);
1468 BOOL WINAPI DeleteFileW(LPCWSTR);
1469 #define DeleteFile WINELIB_NAME_AW(DeleteFile)
1470 void WINAPI FatalAppExitA(UINT,LPCSTR);
1471 void WINAPI FatalAppExitW(UINT,LPCWSTR);
1472 #define FatalAppExit WINELIB_NAME_AW(FatalAppExit)
1473 ATOM WINAPI FindAtomA(LPCSTR);
1474 ATOM WINAPI FindAtomW(LPCWSTR);
1475 #define FindAtom WINELIB_NAME_AW(FindAtom)
1476 BOOL WINAPI FindClose(HANDLE);
1477 HANDLE WINAPI FindFirstFileA(LPCSTR,LPWIN32_FIND_DATAA);
1478 HANDLE WINAPI FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW);
1479 #define FindFirstFile WINELIB_NAME_AW(FindFirstFile)
1480 HANDLE WINAPI FindFirstFileExA(LPCSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD);
1481 HANDLE WINAPI FindFirstFileExW(LPCWSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD);
1482 #define FindFirstFileEx WINELIB_NAME_AW(FindFirstFileEx)
1483 BOOL WINAPI FindNextFileA(HANDLE,LPWIN32_FIND_DATAA);
1484 BOOL WINAPI FindNextFileW(HANDLE,LPWIN32_FIND_DATAW);
1485 #define FindNextFile WINELIB_NAME_AW(FindNextFile)
1486 HRSRC WINAPI FindResourceA(HMODULE,LPCSTR,LPCSTR);
1487 HRSRC WINAPI FindResourceW(HMODULE,LPCWSTR,LPCWSTR);
1488 #define FindResource WINELIB_NAME_AW(FindResource)
1489 BOOL WINAPI FreeLibrary(HMODULE);
1490 #define FreeModule(handle) FreeLibrary(handle)
1491 #define FreeProcInstance(proc) /*nothing*/
1492 BOOL WINAPI FreeResource(HGLOBAL);
1493 UINT WINAPI GetAtomNameA(ATOM,LPSTR,INT);
1494 UINT WINAPI GetAtomNameW(ATOM,LPWSTR,INT);
1495 #define GetAtomName WINELIB_NAME_AW(GetAtomName)
1496 UINT WINAPI GetCurrentDirectoryA(UINT,LPSTR);
1497 UINT WINAPI GetCurrentDirectoryW(UINT,LPWSTR);
1498 #define GetCurrentDirectory WINELIB_NAME_AW(GetCurrentDirectory)
1499 #define GetCurrentTime() GetTickCount()
1500 BOOL WINAPI GetDiskFreeSpaceA(LPCSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1501 BOOL WINAPI GetDiskFreeSpaceW(LPCWSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1502 #define GetDiskFreeSpace WINELIB_NAME_AW(GetDiskFreeSpace)
1503 BOOL WINAPI GetDiskFreeSpaceExA(LPCSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
1504 BOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
1505 #define GetDiskFreeSpaceEx WINELIB_NAME_AW(GetDiskFreeSpaceEx)
1506 UINT WINAPI GetDriveTypeA(LPCSTR);
1507 UINT WINAPI GetDriveTypeW(LPCWSTR);
1508 #define GetDriveType WINELIB_NAME_AW(GetDriveType)
1509 BOOL WINAPI GetExitCodeProcess(HANDLE,LPDWORD);
1510 DWORD WINAPI GetFileAttributesA(LPCSTR);
1511 DWORD WINAPI GetFileAttributesW(LPCWSTR);
1512 #define GetFileAttributes WINELIB_NAME_AW(GetFileAttributes)
1513 #define GetFreeSpace(w) (0x100000L)
1514 UINT WINAPI GetLogicalDriveStringsA(UINT,LPSTR);
1515 UINT WINAPI GetLogicalDriveStringsW(UINT,LPWSTR);
1516 #define GetLogicalDriveStrings WINELIB_NAME_AW(GetLogicalDriveStrings)
1517 DWORD WINAPI GetModuleFileNameA(HMODULE,LPSTR,DWORD);
1518 DWORD WINAPI GetModuleFileNameW(HMODULE,LPWSTR,DWORD);
1519 #define GetModuleFileName WINELIB_NAME_AW(GetModuleFileName)
1520 HMODULE WINAPI GetModuleHandleA(LPCSTR);
1521 HMODULE WINAPI GetModuleHandleW(LPCWSTR);
1522 #define GetModuleHandle WINELIB_NAME_AW(GetModuleHandle)
1523 BOOL WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,LPDWORD,BOOL);
1524 UINT WINAPI GetPrivateProfileIntA(LPCSTR,LPCSTR,INT,LPCSTR);
1525 UINT WINAPI GetPrivateProfileIntW(LPCWSTR,LPCWSTR,INT,LPCWSTR);
1526 #define GetPrivateProfileInt WINELIB_NAME_AW(GetPrivateProfileInt)
1527 INT WINAPI GetPrivateProfileSectionA(LPCSTR,LPSTR,DWORD,LPCSTR);
1528 INT WINAPI GetPrivateProfileSectionW(LPCWSTR,LPWSTR,DWORD,LPCWSTR);
1529 #define GetPrivateProfileSection WINELIB_NAME_AW(GetPrivateProfileSection)
1530 DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR,DWORD,LPCSTR);
1531 DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR,DWORD,LPCWSTR);
1532 #define GetPrivateProfileSectionNames WINELIB_NAME_AW(GetPrivateProfileSectionNames)
1533 INT WINAPI GetPrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT,LPCSTR);
1534 INT WINAPI GetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT,LPCWSTR);
1535 #define GetPrivateProfileString WINELIB_NAME_AW(GetPrivateProfileString)
1536 BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
1537 BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
1538 #define GetPrivateProfileStruct WINELIB_NAME_AW(GetPrivateProfileStruct)
1539 FARPROC WINAPI GetProcAddress(HMODULE,LPCSTR);
1540 UINT WINAPI GetProfileIntA(LPCSTR,LPCSTR,INT);
1541 UINT WINAPI GetProfileIntW(LPCWSTR,LPCWSTR,INT);
1542 #define GetProfileInt WINELIB_NAME_AW(GetProfileInt)
1543 INT WINAPI GetProfileSectionA(LPCSTR,LPSTR,DWORD);
1544 INT WINAPI GetProfileSectionW(LPCWSTR,LPWSTR,DWORD);
1545 #define GetProfileSection WINELIB_NAME_AW(GetProfileSection)
1546 INT WINAPI GetProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT);
1547 INT WINAPI GetProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT);
1548 #define GetProfileString WINELIB_NAME_AW(GetProfileString)
1549 VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA);
1550 VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW);
1551 #define GetStartupInfo WINELIB_NAME_AW(GetStartupInfo)
1552 UINT WINAPI GetSystemDirectoryA(LPSTR,UINT);
1553 UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT);
1554 #define GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
1555 DWORD WINAPI GetTickCount(void);
1556 UINT WINAPI GetTempFileNameA(LPCSTR,LPCSTR,UINT,LPSTR);
1557 UINT WINAPI GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR);
1558 #define GetTempFileName WINELIB_NAME_AW(GetTempFileName)
1559 UINT WINAPI GetTempPathA(UINT,LPSTR);
1560 UINT WINAPI GetTempPathW(UINT,LPWSTR);
1561 #define GetTempPath WINELIB_NAME_AW(GetTempPath)
1562 LONG WINAPI GetVersion(void);
1563 BOOL WINAPI GetVolumeInformationA(LPCSTR,LPSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPSTR,DWORD);
1564 BOOL WINAPI GetVolumeInformationW(LPCWSTR,LPWSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPWSTR,DWORD);
1565 #define GetVolumeInformation WINELIB_NAME_AW(GetVolumeInformation)
1566 UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT);
1567 UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
1568 #define GetWindowsDirectory WINELIB_NAME_AW(GetWindowsDirectory)
1569 ATOM WINAPI GlobalAddAtomA(LPCSTR);
1570 ATOM WINAPI GlobalAddAtomW(LPCWSTR);
1571 #define GlobalAddAtom WINELIB_NAME_AW(GlobalAddAtom)
1572 HGLOBAL WINAPI GlobalAlloc(UINT,DWORD);
1573 DWORD WINAPI GlobalCompact(DWORD);
1574 ATOM WINAPI GlobalDeleteAtom(ATOM);
1575 ATOM WINAPI GlobalFindAtomA(LPCSTR);
1576 ATOM WINAPI GlobalFindAtomW(LPCWSTR);
1577 #define GlobalFindAtom WINELIB_NAME_AW(GlobalFindAtom)
1578 UINT WINAPI GlobalFlags(HGLOBAL);
1579 HGLOBAL WINAPI GlobalFree(HGLOBAL);
1580 UINT WINAPI GlobalGetAtomNameA(ATOM,LPSTR,INT);
1581 UINT WINAPI GlobalGetAtomNameW(ATOM,LPWSTR,INT);
1582 #define GlobalGetAtomName WINELIB_NAME_AW(GlobalGetAtomName)
1583 HGLOBAL WINAPI GlobalHandle(LPCVOID);
1584 VOID WINAPI GlobalFix(HGLOBAL);
1585 LPVOID WINAPI GlobalLock(HGLOBAL);
1586 HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,DWORD,UINT);
1587 DWORD WINAPI GlobalSize(HGLOBAL);
1588 VOID WINAPI GlobalUnfix(HGLOBAL);
1589 BOOL WINAPI GlobalUnlock(HGLOBAL);
1590 BOOL WINAPI GlobalUnWire(HGLOBAL);
1591 LPVOID WINAPI GlobalWire(HGLOBAL);
1592 #define HasOverlappedCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
1593 BOOL WINAPI InitAtomTable(DWORD);
1594 BOOL WINAPI IsBadCodePtr(FARPROC);
1595 BOOL WINAPI IsBadHugeReadPtr(LPCVOID,UINT);
1596 BOOL WINAPI IsBadHugeWritePtr(LPVOID,UINT);
1597 BOOL WINAPI IsBadReadPtr(LPCVOID,UINT);
1598 BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT);
1599 BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT);
1600 #define IsBadStringPtr WINELIB_NAME_AW(IsBadStringPtr)
1601 BOOL WINAPI IsBadWritePtr(LPVOID,UINT);
1602 BOOL WINAPI IsDebuggerPresent(void);
1603 HMODULE WINAPI LoadLibraryA(LPCSTR);
1604 HMODULE WINAPI LoadLibraryW(LPCWSTR);
1605 #define LoadLibrary WINELIB_NAME_AW(LoadLibrary)
1606 HMODULE WINAPI LoadLibraryExA(LPCSTR,HANDLE,DWORD);
1607 HMODULE WINAPI LoadLibraryExW(LPCWSTR,HANDLE,DWORD);
1608 #define LoadLibraryEx WINELIB_NAME_AW(LoadLibraryEx)
1609 HINSTANCE WINAPI LoadModule(LPCSTR,LPVOID);
1610 HGLOBAL WINAPI LoadResource(HMODULE,HRSRC);
1611 HLOCAL WINAPI LocalAlloc(UINT,DWORD);
1612 UINT WINAPI LocalCompact(UINT);
1613 UINT WINAPI LocalFlags(HLOCAL);
1614 HLOCAL WINAPI LocalFree(HLOCAL);
1615 HLOCAL WINAPI LocalHandle(LPCVOID);
1616 LPVOID WINAPI LocalLock(HLOCAL);
1617 HLOCAL WINAPI LocalReAlloc(HLOCAL,DWORD,UINT);
1618 UINT WINAPI LocalShrink(HGLOBAL,UINT);
1619 UINT WINAPI LocalSize(HLOCAL);
1620 BOOL WINAPI LocalUnlock(HLOCAL);
1621 LPVOID WINAPI LockResource(HGLOBAL);
1622 #define LockSegment(handle) GlobalFix((HANDLE)(handle))
1623 #define MakeProcInstance(proc,inst) (proc)
1624 HFILE WINAPI OpenFile(LPCSTR,OFSTRUCT*,UINT);
1625 VOID WINAPI OutputDebugStringA(LPCSTR);
1626 VOID WINAPI OutputDebugStringW(LPCWSTR);
1627 #define OutputDebugString WINELIB_NAME_AW(OutputDebugString)
1628 BOOL WINAPI ReadProcessMemory(HANDLE, LPCVOID, LPVOID, DWORD, LPDWORD);
1629 BOOL WINAPI RemoveDirectoryA(LPCSTR);
1630 BOOL WINAPI RemoveDirectoryW(LPCWSTR);
1631 #define RemoveDirectory WINELIB_NAME_AW(RemoveDirectory)
1632 BOOL WINAPI SetCurrentDirectoryA(LPCSTR);
1633 BOOL WINAPI SetCurrentDirectoryW(LPCWSTR);
1634 #define SetCurrentDirectory WINELIB_NAME_AW(SetCurrentDirectory)
1635 UINT WINAPI SetErrorMode(UINT);
1636 BOOL WINAPI SetFileAttributesA(LPCSTR,DWORD);
1637 BOOL WINAPI SetFileAttributesW(LPCWSTR,DWORD);
1638 #define SetFileAttributes WINELIB_NAME_AW(SetFileAttributes)
1639 UINT WINAPI SetHandleCount(UINT);
1640 #define SetSwapAreaSize(w) (w)
1641 BOOL WINAPI SetVolumeLabelA(LPCSTR,LPCSTR);
1642 BOOL WINAPI SetVolumeLabelW(LPCWSTR,LPCWSTR);
1643 #define SetVolumeLabel WINELIB_NAME_AW(SetVolumeLabel)
1644 DWORD WINAPI SizeofResource(HMODULE,HRSRC);
1645 BOOL WINAPI UnlockFileEx(HFILE,DWORD,DWORD,DWORD,LPOVERLAPPED);
1646 #define UnlockSegment(handle) GlobalUnfix((HANDLE)(handle))
1647 BOOL WINAPI WritePrivateProfileSectionA(LPCSTR,LPCSTR,LPCSTR);
1648 BOOL WINAPI WritePrivateProfileSectionW(LPCWSTR,LPCWSTR,LPCWSTR);
1649 #define WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
1650 BOOL WINAPI WritePrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
1651 BOOL WINAPI WritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
1652 #define WritePrivateProfileString WINELIB_NAME_AW(WritePrivateProfileString)
1653 BOOL WINAPI WriteProfileSectionA(LPCSTR,LPCSTR);
1654 BOOL WINAPI WriteProfileSectionW(LPCWSTR,LPCWSTR);
1655 #define WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
1656 BOOL WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
1657 BOOL WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
1658 #define WritePrivateProfileStruct WINELIB_NAME_AW(WritePrivateProfileStruct)
1659 BOOL WINAPI WriteProcessMemory(HANDLE,LPVOID,LPCVOID,DWORD,LPDWORD);
1660 BOOL WINAPI WriteProfileStringA(LPCSTR,LPCSTR,LPCSTR);
1661 BOOL WINAPI WriteProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR);
1662 #define WriteProfileString WINELIB_NAME_AW(WriteProfileString)
1663 #define Yield()
1664 LPSTR WINAPI lstrcatA(LPSTR,LPCSTR);
1665 LPWSTR WINAPI lstrcatW(LPWSTR,LPCWSTR);
1666 #define lstrcat WINELIB_NAME_AW(lstrcat)
1667 LPSTR WINAPI lstrcpyA(LPSTR,LPCSTR);
1668 LPWSTR WINAPI lstrcpyW(LPWSTR,LPCWSTR);
1669 #define lstrcpy WINELIB_NAME_AW(lstrcpy)
1670 LPSTR WINAPI lstrcpynA(LPSTR,LPCSTR,INT);
1671 LPWSTR WINAPI lstrcpynW(LPWSTR,LPCWSTR,INT);
1672 #define lstrcpyn WINELIB_NAME_AW(lstrcpyn)
1673 INT WINAPI lstrlenA(LPCSTR);
1674 INT WINAPI lstrlenW(LPCWSTR);
1675 #define lstrlen WINELIB_NAME_AW(lstrlen)
1676 HINSTANCE WINAPI WinExec(LPCSTR,UINT);
1677 LONG WINAPI _hread(HFILE,LPVOID,LONG);
1678 LONG WINAPI _hwrite(HFILE,LPCSTR,LONG);
1679 HFILE WINAPI _lcreat(LPCSTR,INT);
1680 HFILE WINAPI _lclose(HFILE);
1681 LONG WINAPI _llseek(HFILE,LONG,INT);
1682 HFILE WINAPI _lopen(LPCSTR,INT);
1683 UINT WINAPI _lread(HFILE,LPVOID,UINT);
1684 UINT WINAPI _lwrite(HFILE,LPCSTR,UINT);
1685 INT WINAPI lstrcmpA(LPCSTR,LPCSTR);
1686 INT WINAPI lstrcmpW(LPCWSTR,LPCWSTR);
1687 #define lstrcmp WINELIB_NAME_AW(lstrcmp)
1688 INT WINAPI lstrcmpiA(LPCSTR,LPCSTR);
1689 INT WINAPI lstrcmpiW(LPCWSTR,LPCWSTR);
1690 #define lstrcmpi WINELIB_NAME_AW(lstrcmpi)
1692 /* compatibility macros */
1693 #define FillMemory RtlFillMemory
1694 #define MoveMemory RtlMoveMemory
1695 #define ZeroMemory RtlZeroMemory
1696 #define CopyMemory RtlCopyMemory
1698 /* undocumented functions */
1700 typedef struct tagSYSLEVEL
1702 CRITICAL_SECTION crst;
1703 INT level;
1704 } SYSLEVEL;
1706 /* [GS]etProcessDword offsets */
1707 #define GPD_APP_COMPAT_FLAGS (-56)
1708 #define GPD_LOAD_DONE_EVENT (-52)
1709 #define GPD_HINSTANCE16 (-48)
1710 #define GPD_WINDOWS_VERSION (-44)
1711 #define GPD_THDB (-40)
1712 #define GPD_PDB (-36)
1713 #define GPD_STARTF_SHELLDATA (-32)
1714 #define GPD_STARTF_HOTKEY (-28)
1715 #define GPD_STARTF_SHOWWINDOW (-24)
1716 #define GPD_STARTF_SIZE (-20)
1717 #define GPD_STARTF_POSITION (-16)
1718 #define GPD_STARTF_FLAGS (-12)
1719 #define GPD_PARENT (- 8)
1720 #define GPD_FLAGS (- 4)
1721 #define GPD_USERDATA ( 0)
1723 void WINAPI DisposeLZ32Handle(HANDLE);
1724 HANDLE WINAPI DosFileHandleToWin32Handle(HFILE);
1725 DWORD WINAPI GetProcessDword(DWORD,INT);
1726 VOID WINAPI GetpWin16Lock(SYSLEVEL**);
1727 DWORD WINAPI MapLS(LPCVOID);
1728 DWORD WINAPI MapProcessHandle(HANDLE);
1729 LPVOID WINAPI MapSL(DWORD);
1730 VOID WINAPI ReleaseThunkLock(DWORD*);
1731 VOID WINAPI RestoreThunkLock(DWORD);
1732 void WINAPI SetProcessDword(DWORD,INT,DWORD);
1733 VOID WINAPI UnMapLS(DWORD);
1734 HFILE WINAPI Win32HandleToDosFileHandle(HANDLE);
1735 VOID WINAPI _CheckNotSysLevel(SYSLEVEL *lock);
1736 DWORD WINAPI _ConfirmWin16Lock(void);
1737 DWORD WINAPI _ConfirmSysLevel(SYSLEVEL*);
1738 VOID WINAPI _EnterSysLevel(SYSLEVEL*);
1739 VOID WINAPI _LeaveSysLevel(SYSLEVEL*);
1742 /* Wine internal functions */
1744 BOOL WINAPI wine_get_unix_file_name( LPCSTR dos, LPSTR buffer, DWORD len );
1747 /* a few optimizations for i386/gcc */
1749 #if defined(__i386__) && defined(__GNUC__)
1751 extern inline LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare );
1752 extern inline LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare )
1754 LONG ret;
1755 __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
1756 : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
1757 return ret;
1760 extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val );
1761 extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val )
1763 LONG ret;
1764 __asm__ __volatile__( "lock; xchgl %0,(%1)"
1765 : "=r" (ret) :"r" (dest), "0" (val) : "memory" );
1766 return ret;
1769 extern inline LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr );
1770 extern inline LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr )
1772 LONG ret;
1773 __asm__ __volatile__( "lock; xaddl %0,(%1)"
1774 : "=r" (ret) : "r" (dest), "0" (incr) : "memory" );
1775 return ret;
1778 extern inline LONG WINAPI InterlockedIncrement( PLONG dest );
1779 extern inline LONG WINAPI InterlockedIncrement( PLONG dest )
1781 return InterlockedExchangeAdd( dest, 1 ) + 1;
1784 extern inline LONG WINAPI InterlockedDecrement( PLONG dest );
1785 extern inline LONG WINAPI InterlockedDecrement( PLONG dest )
1787 return InterlockedExchangeAdd( dest, -1 ) - 1;
1790 extern inline DWORD WINAPI GetLastError(void);
1791 extern inline DWORD WINAPI GetLastError(void)
1793 DWORD ret;
1794 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x60,%0" : "=r" (ret) );
1795 return ret;
1798 extern inline DWORD WINAPI GetCurrentProcessId(void);
1799 extern inline DWORD WINAPI GetCurrentProcessId(void)
1801 DWORD ret;
1802 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x20,%0" : "=r" (ret) );
1803 return ret;
1806 extern inline DWORD WINAPI GetCurrentThreadId(void);
1807 extern inline DWORD WINAPI GetCurrentThreadId(void)
1809 DWORD ret;
1810 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x24,%0" : "=r" (ret) );
1811 return ret;
1814 extern inline void WINAPI SetLastError( DWORD err );
1815 extern inline void WINAPI SetLastError( DWORD err )
1817 __asm__ __volatile__( ".byte 0x64\n\tmovl %0,0x60" : : "r" (err) : "memory" );
1820 extern inline HANDLE WINAPI GetProcessHeap(void);
1821 extern inline HANDLE WINAPI GetProcessHeap(void)
1823 HANDLE *pdb;
1824 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x30,%0" : "=r" (pdb) );
1825 return pdb[0x18 / sizeof(HANDLE)]; /* get dword at offset 0x18 in pdb */
1828 #else /* __i386__ && __GNUC__ */
1829 DWORD WINAPI GetCurrentProcessId(void);
1830 DWORD WINAPI GetCurrentThreadId(void);
1831 DWORD WINAPI GetLastError(void);
1832 HANDLE WINAPI GetProcessHeap(void);
1833 LONG WINAPI InterlockedCompareExchange(LONG*,LONG,LONG);
1834 LONG WINAPI InterlockedDecrement(PLONG);
1835 LONG WINAPI InterlockedExchange(PLONG,LONG);
1836 LONG WINAPI InterlockedExchangeAdd(PLONG,LONG);
1837 LONG WINAPI InterlockedIncrement(PLONG);
1838 VOID WINAPI SetLastError(DWORD);
1839 #endif /* __i386__ && __GNUC__ */
1841 /* FIXME: should handle platforms where sizeof(void*) != sizeof(long) */
1842 static inline PVOID WINAPI InterlockedCompareExchangePointer( PVOID *dest, PVOID xchg, PVOID compare )
1844 return (PVOID)InterlockedCompareExchange( (PLONG)dest, (LONG)xchg, (LONG)compare );
1847 static inline PVOID WINAPI InterlockedExchangePointer( PVOID *dest, PVOID val )
1849 return (PVOID)InterlockedExchange( (PLONG)dest, (LONG)val );
1852 #ifdef __WINE__
1853 #define GetCurrentProcess() ((HANDLE)0xffffffff)
1854 #define GetCurrentThread() ((HANDLE)0xfffffffe)
1855 #endif
1857 /* WinMain(entry point) must be declared in winbase.h. */
1858 /* If this is not declared, we cannot compile many sources written with C++. */
1859 int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
1861 #ifdef __cplusplus
1863 #endif
1865 #endif /* __WINE_WINBASE_H */