Created an ACM MS ADPCM codec.
[wine.git] / include / winbase.h
blobf77a80ae38b4d1b6dbe6634017fb26d7a9f8ff63
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 _OVERLAPPED {
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 typedef struct {
842 DWORD dwOSVersionInfoSize;
843 DWORD dwMajorVersion;
844 DWORD dwMinorVersion;
845 DWORD dwBuildNumber;
846 DWORD dwPlatformId;
847 CHAR szCSDVersion[128];
848 WORD wServicePackMajor;
849 WORD wServicePackMinor;
850 WORD wSuiteMask;
851 BYTE wProductType;
852 BYTE wReserved;
853 } OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
855 typedef struct {
856 DWORD dwOSVersionInfoSize;
857 DWORD dwMajorVersion;
858 DWORD dwMinorVersion;
859 DWORD dwBuildNumber;
860 DWORD dwPlatformId;
861 WCHAR szCSDVersion[128];
862 WORD wServicePackMajor;
863 WORD wServicePackMinor;
864 WORD wSuiteMask;
865 BYTE wProductType;
866 BYTE wReserved;
867 } OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW;
869 DECL_WINELIB_TYPE_AW(OSVERSIONINFOEX)
870 DECL_WINELIB_TYPE_AW(POSVERSIONINFOEX)
871 DECL_WINELIB_TYPE_AW(LPOSVERSIONINFOEX)
873 ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE);
875 #define VER_SET_CONDITION(_m_,_t_,_c_) ((_m_)=VerSetConditionMask((_m_),(_t_),(_c_)))
877 #define VER_PLATFORM_WIN32s 0
878 #define VER_PLATFORM_WIN32_WINDOWS 1
879 #define VER_PLATFORM_WIN32_NT 2
881 #define VER_MINORVERSION 0x00000001
882 #define VER_MAJORVERSION 0x00000002
883 #define VER_BUILDNUMBER 0x00000004
884 #define VER_PLATFORMID 0x00000008
885 #define VER_SERVICEPACKMINOR 0x00000010
886 #define VER_SERVICEPACKMAJOR 0x00000020
887 #define VER_SUITENAME 0x00000040
888 #define VER_PRODUCT_TYPE 0x00000080
890 #define VER_NT_WORKSTATION 1
891 #define VER_NT_DOMAIN_CONTROLLER 2
892 #define VER_NT_SERVER 3
894 #define VER_SUITE_SMALLBUSINESS 0x00000001
895 #define VER_SUITE_ENTERPRISE 0x00000002
896 #define VER_SUITE_BACKOFFICE 0x00000004
897 #define VER_SUITE_COMMUNICATIONS 0x00000008
898 #define VER_SUITE_TERMINAL 0x00000010
899 #define VER_SUITE_SMALLBUSINESS_RESTRICTED 0x00000020
900 #define VER_SUITE_EMBEDDEDNT 0x00000040
901 #define VER_SUITE_DATACENTER 0x00000080
902 #define VER_SUITE_SINGLEUSERTS 0x00000100
903 #define VER_SUITE_PERSONAL 0x00000200
905 #define VER_EQUAL 1
906 #define VER_GREATER 2
907 #define VER_GREATER_EQUAL 3
908 #define VER_LESS 4
909 #define VER_LESS_EQUAL 5
910 #define VER_AND 6
911 #define VER_OR 7
913 typedef struct tagCOMSTAT
915 DWORD status;
916 DWORD cbInQue;
917 DWORD cbOutQue;
918 } COMSTAT,*LPCOMSTAT;
920 typedef struct tagDCB
922 DWORD DCBlength;
923 DWORD BaudRate;
924 unsigned fBinary :1;
925 unsigned fParity :1;
926 unsigned fOutxCtsFlow :1;
927 unsigned fOutxDsrFlow :1;
928 unsigned fDtrControl :2;
929 unsigned fDsrSensitivity :1;
930 unsigned fTXContinueOnXoff :1;
931 unsigned fOutX :1;
932 unsigned fInX :1;
933 unsigned fErrorChar :1;
934 unsigned fNull :1;
935 unsigned fRtsControl :2;
936 unsigned fAbortOnError :1;
937 unsigned fDummy2 :17;
938 WORD wReserved;
939 WORD XonLim;
940 WORD XoffLim;
941 BYTE ByteSize;
942 BYTE Parity;
943 BYTE StopBits;
944 char XonChar;
945 char XoffChar;
946 char ErrorChar;
947 char EofChar;
948 char EvtChar;
949 } DCB, *LPDCB;
951 typedef struct tagCOMMCONFIG {
952 DWORD dwSize;
953 WORD wVersion;
954 WORD wReserved;
955 DCB dcb;
956 DWORD dwProviderSubType;
957 DWORD dwProviderOffset;
958 DWORD dwProviderSize;
959 DWORD wcProviderData[1];
960 } COMMCONFIG, *LPCOMMCONFIG;
962 typedef struct tagCOMMPROP {
963 WORD wPacketLength;
964 WORD wPacketVersion;
965 DWORD dwServiceMask;
966 DWORD dwReserved1;
967 DWORD dwMaxTxQueue;
968 DWORD dwMaxRxQueue;
969 DWORD dwMaxBaud;
970 DWORD dwProvSubType;
971 DWORD dwProvCapabilities;
972 DWORD dwSettableParams;
973 DWORD dwSettableBaud;
974 WORD wSettableData;
975 WORD wSettableStopParity;
976 DWORD dwCurrentTxQueue;
977 DWORD dwCurrentRxQueue;
978 DWORD dwProvSpec1;
979 DWORD dwProvSpec2;
980 WCHAR wcProvChar[1];
981 } COMMPROP, *LPCOMMPROP;
983 #define SP_SERIALCOMM ((DWORD)1)
985 #define BAUD_075 ((DWORD)0x01)
986 #define BAUD_110 ((DWORD)0x02)
987 #define BAUD_134_5 ((DWORD)0x04)
988 #define BAUD_150 ((DWORD)0x08)
989 #define BAUD_300 ((DWORD)0x10)
990 #define BAUD_600 ((DWORD)0x20)
991 #define BAUD_1200 ((DWORD)0x40)
992 #define BAUD_1800 ((DWORD)0x80)
993 #define BAUD_2400 ((DWORD)0x100)
994 #define BAUD_4800 ((DWORD)0x200)
995 #define BAUD_7200 ((DWORD)0x400)
996 #define BAUD_9600 ((DWORD)0x800)
997 #define BAUD_14400 ((DWORD)0x1000)
998 #define BAUD_19200 ((DWORD)0x2000)
999 #define BAUD_38400 ((DWORD)0x4000)
1000 #define BAUD_56K ((DWORD)0x8000)
1001 #define BAUD_57600 ((DWORD)0x40000)
1002 #define BAUD_115200 ((DWORD)0x20000)
1003 #define BAUD_128K ((DWORD)0x10000)
1004 #define BAUD_USER ((DWORD)0x10000000)
1006 #define PST_FAX ((DWORD)0x21)
1007 #define PST_LAT ((DWORD)0x101)
1008 #define PST_MODEM ((DWORD)0x06)
1009 #define PST_NETWORK_BRIDGE ((DWORD)0x100)
1010 #define PST_PARALLEL_PORT ((DWORD)0x02)
1011 #define PST_RS232 ((DWORD)0x01)
1012 #define PST_RS442 ((DWORD)0x03)
1013 #define PST_RS423 ((DWORD)0x04)
1014 #define PST_RS449 ((DWORD)0x06)
1015 #define PST_SCANNER ((DWORD)0x22)
1016 #define PST_TCPIP_TELNET ((DWORD)0x102)
1017 #define PST_UNSPECIFIED ((DWORD)0x00)
1018 #define PST_X25 ((DWORD)0x103)
1020 #define PCF_16BITMODE ((DWORD)0x200)
1021 #define PCF_DTRDSR ((DWORD)0x01)
1022 #define PCF_INTTIMEOUTS ((DWORD)0x80)
1023 #define PCF_PARITY_CHECK ((DWORD)0x08)
1024 #define PCF_RLSD ((DWORD)0x04)
1025 #define PCF_RTSCTS ((DWORD)0x02)
1026 #define PCF_SETXCHAR ((DWORD)0x20)
1027 #define PCF_SPECIALCHARS ((DWORD)0x100)
1028 #define PCF_TOTALTIMEOUTS ((DWORD)0x40)
1029 #define PCF_XONXOFF ((DWORD)0x10)
1031 #define SP_BAUD ((DWORD)0x02)
1032 #define SP_DATABITS ((DWORD)0x04)
1033 #define SP_HANDSHAKING ((DWORD)0x10)
1034 #define SP_PARITY ((DWORD)0x01)
1035 #define SP_PARITY_CHECK ((DWORD)0x20)
1036 #define SP_RLSD ((DWORD)0x40)
1037 #define SP_STOPBITS ((DWORD)0x08)
1039 #define DATABITS_5 ((DWORD)0x01)
1040 #define DATABITS_6 ((DWORD)0x02)
1041 #define DATABITS_7 ((DWORD)0x04)
1042 #define DATABITS_8 ((DWORD)0x08)
1043 #define DATABITS_16 ((DWORD)0x10)
1044 #define DATABITS_16X ((DWORD)0x20)
1046 #define STOPBITS_10 ((DWORD)1)
1047 #define STOPBITS_15 ((DWORD)2)
1048 #define STOPBITS_20 ((DWORD)4)
1050 #define PARITY_NONE ((DWORD)0x100)
1051 #define PARITY_ODD ((DWORD)0x200)
1052 #define PARITY_EVEN ((DWORD)0x400)
1053 #define PARITY_MARK ((DWORD)0x800)
1054 #define PARITY_SPACE ((DWORD)0x1000)
1056 typedef struct tagCOMMTIMEOUTS {
1057 DWORD ReadIntervalTimeout;
1058 DWORD ReadTotalTimeoutMultiplier;
1059 DWORD ReadTotalTimeoutConstant;
1060 DWORD WriteTotalTimeoutMultiplier;
1061 DWORD WriteTotalTimeoutConstant;
1062 } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
1064 typedef void (CALLBACK *PAPCFUNC)(ULONG_PTR);
1065 typedef void (CALLBACK *PTIMERAPCROUTINE)(LPVOID,DWORD,DWORD);
1067 typedef enum _COMPUTER_NAME_FORMAT
1069 ComputerNameNetBIOS,
1070 ComputerNameDnsHostname,
1071 ComputerNameDnsDomain,
1072 ComputerNameDnsFullyQualified,
1073 ComputerNamePhysicalNetBIOS,
1074 ComputerNamePhysicalDnsHostname,
1075 ComputerNamePhysicalDnsDomain,
1076 ComputerNamePhysicalDnsFullyQualified,
1077 ComputerNameMax
1078 } COMPUTER_NAME_FORMAT;
1080 /*DWORD WINAPI GetVersion( void );*/
1081 BOOL WINAPI GetVersionExA(OSVERSIONINFOA*);
1082 BOOL WINAPI GetVersionExW(OSVERSIONINFOW*);
1083 #define GetVersionEx WINELIB_NAME_AW(GetVersionEx)
1085 /*int WinMain(HINSTANCE, HINSTANCE prev, char *cmd, int show);*/
1087 LPVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD);
1088 BOOL WINAPI HeapFree(HANDLE,DWORD,LPVOID);
1089 LPVOID WINAPI HeapReAlloc(HANDLE,DWORD,LPVOID,DWORD);
1090 DWORD WINAPI HeapSize(HANDLE,DWORD,LPVOID);
1091 void WINAPI InitializeCriticalSection(CRITICAL_SECTION *lpCrit);
1092 BOOL WINAPI InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION *,DWORD);
1093 void WINAPI DeleteCriticalSection(CRITICAL_SECTION *lpCrit);
1094 void WINAPI EnterCriticalSection(CRITICAL_SECTION *lpCrit);
1095 BOOL WINAPI TryEnterCriticalSection(CRITICAL_SECTION *lpCrit);
1096 void WINAPI LeaveCriticalSection(CRITICAL_SECTION *lpCrit);
1097 void WINAPI MakeCriticalSectionGlobal(CRITICAL_SECTION *lpCrit);
1098 BOOL WINAPI GetProcessWorkingSetSize(HANDLE,LPDWORD,LPDWORD);
1099 DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,ULONG_PTR);
1100 void WINAPI RaiseException(DWORD,DWORD,DWORD,const LPDWORD);
1101 BOOL WINAPI SetProcessWorkingSetSize(HANDLE,DWORD,DWORD);
1102 BOOL WINAPI TerminateProcess(HANDLE,DWORD);
1103 BOOL WINAPI TerminateThread(HANDLE,DWORD);
1104 BOOL WINAPI GetExitCodeThread(HANDLE,LPDWORD);
1106 /* GetBinaryType return values.
1109 #define SCS_32BIT_BINARY 0
1110 #define SCS_DOS_BINARY 1
1111 #define SCS_WOW_BINARY 2
1112 #define SCS_PIF_BINARY 3
1113 #define SCS_POSIX_BINARY 4
1114 #define SCS_OS216_BINARY 5
1116 BOOL WINAPI GetBinaryTypeA( LPCSTR lpApplicationName, LPDWORD lpBinaryType );
1117 BOOL WINAPI GetBinaryTypeW( LPCWSTR lpApplicationName, LPDWORD lpBinaryType );
1118 #define GetBinaryType WINELIB_NAME_AW(GetBinaryType)
1120 /* Declarations for functions that exist only in Win32 */
1122 BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
1123 BOOL WINAPI AttachThreadInput(DWORD,DWORD,BOOL);
1124 BOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR,HANDLE,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,LPDWORD,LPDWORD,LPBOOL);
1125 BOOL WINAPI AdjustTokenPrivileges(HANDLE,BOOL,LPVOID,DWORD,LPVOID,LPDWORD);
1126 BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
1127 BOOL WINAPI AllocateLocallyUniqueId(PLUID);
1128 BOOL WINAPI AreFileApisANSI(void);
1129 BOOL WINAPI BackupEventLogA(HANDLE,LPCSTR);
1130 BOOL WINAPI BackupEventLogW(HANDLE,LPCWSTR);
1131 #define BackupEventLog WINELIB_NAME_AW(BackupEventLog)
1132 BOOL WINAPI BackupRead(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
1133 BOOL WINAPI BackupSeek(HANDLE,DWORD,DWORD,LPDWORD,LPDWORD,LPVOID*);
1134 BOOL WINAPI BackupWrite(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
1135 BOOL WINAPI Beep(DWORD,DWORD);
1136 BOOL WINAPI BuildCommDCBA(LPCSTR,LPDCB);
1137 BOOL WINAPI BuildCommDCBW(LPCWSTR,LPDCB);
1138 #define BuildCommDCB WINELIB_NAME_AW(BuildCommDCB)
1139 BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR,LPDCB,LPCOMMTIMEOUTS);
1140 BOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR,LPDCB,LPCOMMTIMEOUTS);
1141 #define BuildCommDCBAndTimeouts WINELIB_NAME_AW(BuildCommDCBAndTimeouts)
1142 BOOL WINAPI CancelIo(HANDLE);
1143 BOOL WINAPI CancelWaitableTimer(HANDLE);
1144 BOOL WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL);
1145 BOOL WINAPI ClearCommBreak(HANDLE);
1146 BOOL WINAPI ClearCommError(HANDLE,LPDWORD,LPCOMSTAT);
1147 BOOL WINAPI ClearEventLogA(HANDLE,LPCSTR);
1148 BOOL WINAPI ClearEventLogW(HANDLE,LPCWSTR);
1149 #define ClearEventLog WINELIB_NAME_AW(ClearEventLog)
1150 BOOL WINAPI CloseEventLog(HANDLE);
1151 BOOL WINAPI CloseHandle(HANDLE);
1152 BOOL WINAPI CommConfigDialogA(LPCSTR,HANDLE,LPCOMMCONFIG);
1153 BOOL WINAPI CommConfigDialogW(LPCWSTR,HANDLE,LPCOMMCONFIG);
1154 #define CommConfigDialog WINELIB_NAME_AW(CommConfigDialog)
1155 BOOL WINAPI ConnectNamedPipe(HANDLE,LPOVERLAPPED);
1156 BOOL WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD);
1157 HANDLE WINAPI ConvertToGlobalHandle(HANDLE hSrc);
1158 BOOL WINAPI CopyFileA(LPCSTR,LPCSTR,BOOL);
1159 BOOL WINAPI CopyFileW(LPCWSTR,LPCWSTR,BOOL);
1160 #define CopyFile WINELIB_NAME_AW(CopyFile)
1161 BOOL WINAPI CopyFileExA(LPCSTR, LPCSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
1162 BOOL WINAPI CopyFileExW(LPCWSTR, LPCWSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
1163 #define CopyFileEx WINELIB_NAME_AW(CopyFileEx)
1164 BOOL WINAPI CopySid(DWORD,PSID,PSID);
1165 INT WINAPI CompareFileTime(LPFILETIME,LPFILETIME);
1166 HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCSTR);
1167 HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCWSTR);
1168 #define CreateEvent WINELIB_NAME_AW(CreateEvent)
1169 HANDLE WINAPI CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,
1170 DWORD,DWORD,HANDLE);
1171 HANDLE WINAPI CreateFileW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,
1172 DWORD,DWORD,HANDLE);
1173 #define CreateFile WINELIB_NAME_AW(CreateFile)
1174 HANDLE WINAPI CreateFileMappingA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,
1175 DWORD,DWORD,LPCSTR);
1176 HANDLE WINAPI CreateFileMappingW(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,
1177 DWORD,DWORD,LPCWSTR);
1178 #define CreateFileMapping WINELIB_NAME_AW(CreateFileMapping)
1179 HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
1180 HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
1181 #define CreateMutex WINELIB_NAME_AW(CreateMutex)
1182 HANDLE WINAPI CreateNamedPipeA(LPCSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
1183 HANDLE WINAPI CreateNamedPipeW(LPCWSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
1184 #define CreateNamedPipe WINELIB_NAME_AW(CreateNamedPipe)
1185 BOOL WINAPI CreatePipe(PHANDLE,PHANDLE,LPSECURITY_ATTRIBUTES,DWORD);
1186 BOOL WINAPI CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,
1187 LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCSTR,
1188 LPSTARTUPINFOA,LPPROCESS_INFORMATION);
1189 BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,
1190 LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCWSTR,
1191 LPSTARTUPINFOW,LPPROCESS_INFORMATION);
1192 #define CreateProcess WINELIB_NAME_AW(CreateProcess)
1193 HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
1194 HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR);
1195 HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR);
1196 #define CreateSemaphore WINELIB_NAME_AW(CreateSemaphore)
1197 DWORD WINAPI CreateTapePartition(HANDLE,DWORD,DWORD,DWORD);
1198 HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
1199 HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
1200 HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
1201 #define CreateWaitableTimer WINELIB_NAME_AW(CreateWaitableTimer)
1202 BOOL WINAPI DebugActiveProcess(DWORD);
1203 BOOL WINAPI DebugActiveProcessStop(DWORD);
1204 void WINAPI DebugBreak(void);
1205 BOOL WINAPI DebugBreakProcess(HANDLE);
1206 BOOL WINAPI DebugSetProcessKillOnExit(BOOL);
1207 BOOL WINAPI DeregisterEventSource(HANDLE);
1208 BOOL WINAPI DeviceIoControl(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
1209 BOOL WINAPI DisableThreadLibraryCalls(HMODULE);
1210 BOOL WINAPI DisconnectNamedPipe(HANDLE);
1211 BOOL WINAPI DosDateTimeToFileTime(WORD,WORD,LPFILETIME);
1212 BOOL WINAPI DuplicateHandle(HANDLE,HANDLE,HANDLE,HANDLE*,DWORD,BOOL,DWORD);
1213 BOOL WINAPI EscapeCommFunction(HANDLE,UINT);
1214 BOOL WINAPI EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,
1215 ENUMRESLANGPROCA,LONG);
1216 BOOL WINAPI EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,
1217 ENUMRESLANGPROCW,LONG);
1218 #define EnumResourceLanguages WINELIB_NAME_AW(EnumResourceLanguages)
1219 BOOL WINAPI EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROCA,
1220 LONG);
1221 BOOL WINAPI EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROCW,
1222 LONG);
1223 #define EnumResourceNames WINELIB_NAME_AW(EnumResourceNames)
1224 BOOL WINAPI EnumResourceTypesA(HMODULE,ENUMRESTYPEPROCA,LONG);
1225 BOOL WINAPI EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG);
1226 #define EnumResourceTypes WINELIB_NAME_AW(EnumResourceTypes)
1227 BOOL WINAPI EqualSid(PSID, PSID);
1228 BOOL WINAPI EqualPrefixSid(PSID,PSID);
1229 DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL);
1230 VOID WINAPI ExitProcess(DWORD) WINE_NORETURN;
1231 VOID WINAPI ExitThread(DWORD) WINE_NORETURN;
1232 DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
1233 DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
1234 #define ExpandEnvironmentStrings WINELIB_NAME_AW(ExpandEnvironmentStrings)
1235 BOOL WINAPI FileTimeToDosDateTime(const FILETIME*,LPWORD,LPWORD);
1236 BOOL WINAPI FileTimeToLocalFileTime(const FILETIME*,LPFILETIME);
1237 BOOL WINAPI FileTimeToSystemTime(const FILETIME*,LPSYSTEMTIME);
1238 HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR,BOOL,DWORD);
1239 HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR,BOOL,DWORD);
1240 #define FindFirstChangeNotification WINELIB_NAME_AW(FindFirstChangeNotification)
1241 BOOL WINAPI FindNextChangeNotification(HANDLE);
1242 BOOL WINAPI FindCloseChangeNotification(HANDLE);
1243 HRSRC WINAPI FindResourceExA(HMODULE,LPCSTR,LPCSTR,WORD);
1244 HRSRC WINAPI FindResourceExW(HMODULE,LPCWSTR,LPCWSTR,WORD);
1245 #define FindResourceEx WINELIB_NAME_AW(FindResourceEx)
1246 BOOL WINAPI FlushFileBuffers(HANDLE);
1247 BOOL WINAPI FlushViewOfFile(LPCVOID, DWORD);
1248 DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
1249 DWORD WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
1250 #define FormatMessage WINELIB_NAME_AW(FormatMessage)
1251 BOOL WINAPI FreeEnvironmentStringsA(LPSTR);
1252 BOOL WINAPI FreeEnvironmentStringsW(LPWSTR);
1253 #define FreeEnvironmentStrings WINELIB_NAME_AW(FreeEnvironmentStrings)
1254 VOID WINAPI FreeLibraryAndExitThread(HINSTANCE,DWORD);
1255 PVOID WINAPI FreeSid(PSID);
1256 BOOL WINAPI GetCommConfig(HANDLE,LPCOMMCONFIG,LPDWORD);
1257 BOOL WINAPI GetCommMask(HANDLE,LPDWORD);
1258 BOOL WINAPI GetCommModemStatus(HANDLE,LPDWORD);
1259 BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP);
1260 BOOL WINAPI GetCommState(HANDLE,LPDCB);
1261 BOOL WINAPI GetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
1262 LPSTR WINAPI GetCommandLineA(void);
1263 LPWSTR WINAPI GetCommandLineW(void);
1264 #define GetCommandLine WINELIB_NAME_AW(GetCommandLine)
1265 BOOL WINAPI GetComputerNameA(LPSTR,LPDWORD);
1266 BOOL WINAPI GetComputerNameW(LPWSTR,LPDWORD);
1267 #define GetComputerName WINELIB_NAME_AW(GetComputerName)
1268 BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
1269 BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD);
1270 #define GetComputerNameEx WINELIB_NAME_AW(GetComputerNameEx)
1271 HANDLE WINAPI GetCurrentProcess(void);
1272 HANDLE WINAPI GetCurrentThread(void);
1273 BOOL WINAPI GetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,LPDWORD);
1274 BOOL WINAPI GetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,LPDWORD);
1275 #define GetDefaultCommConfig WINELIB_NAME_AW(GetDefaultCommConfig)
1276 LPSTR WINAPI GetEnvironmentStringsA(void);
1277 LPWSTR WINAPI GetEnvironmentStringsW(void);
1278 #define GetEnvironmentStrings WINELIB_NAME_AW(GetEnvironmentStrings)
1279 DWORD WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD);
1280 DWORD WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD);
1281 #define GetEnvironmentVariable WINELIB_NAME_AW(GetEnvironmentVariable)
1282 BOOL WINAPI GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
1283 BOOL WINAPI GetFileAttributesExW(LPCWSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
1284 #define GetFileattributesEx WINELIB_NAME_AW(GetFileAttributesEx)
1285 DWORD WINAPI GetFileInformationByHandle(HANDLE,BY_HANDLE_FILE_INFORMATION*);
1286 BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
1287 BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
1288 #define GetFileSecurity WINELIB_NAME_AW(GetFileSecurity)
1289 DWORD WINAPI GetFileSize(HANDLE,LPDWORD);
1290 BOOL WINAPI GetFileTime(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME);
1291 DWORD WINAPI GetFileType(HANDLE);
1292 DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*);
1293 DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
1294 #define GetFullPathName WINELIB_NAME_AW(GetFullPathName)
1295 BOOL WINAPI GetHandleInformation(HANDLE,LPDWORD);
1296 DWORD WINAPI GetLengthSid(PSID);
1297 VOID WINAPI GetLocalTime(LPSYSTEMTIME);
1298 DWORD WINAPI GetLogicalDrives(void);
1299 DWORD WINAPI GetLongPathNameA(LPCSTR,LPSTR,DWORD);
1300 DWORD WINAPI GetLongPathNameW(LPCWSTR,LPWSTR,DWORD);
1301 #define GetLongPathName WINELIB_NAME_AW(GetLongPathName)
1302 BOOL WINAPI GetNumberOfEventLogRecords(HANDLE,PDWORD);
1303 BOOL WINAPI GetOldestEventLogRecord(HANDLE,PDWORD);
1304 DWORD WINAPI GetPriorityClass(HANDLE);
1305 BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD,PDWORD);
1306 BOOL WINAPI GetProcessTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
1307 DWORD WINAPI GetProcessVersion(DWORD);
1308 BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
1309 BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL *,LPBOOL);
1310 BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID *,LPBOOL);
1311 DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR);
1312 BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID *,LPBOOL);
1313 BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL *,LPBOOL);
1314 PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID);
1315 DWORD WINAPI GetSidLengthRequired(BYTE);
1316 PDWORD WINAPI GetSidSubAuthority(PSID,DWORD);
1317 PUCHAR WINAPI GetSidSubAuthorityCount(PSID);
1318 DWORD WINAPI GetShortPathNameA(LPCSTR,LPSTR,DWORD);
1319 DWORD WINAPI GetShortPathNameW(LPCWSTR,LPWSTR,DWORD);
1320 #define GetShortPathName WINELIB_NAME_AW(GetShortPathName)
1321 HANDLE WINAPI GetStdHandle(DWORD);
1322 VOID WINAPI GetSystemInfo(LPSYSTEM_INFO);
1323 BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
1324 VOID WINAPI GetSystemTime(LPSYSTEMTIME);
1325 VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME);
1326 DWORD WINAPI GetTapeParameters(HANDLE,DWORD,LPDWORD,LPVOID);
1327 DWORD WINAPI GetTapePosition(HANDLE,DWORD,LPDWORD,LPDWORD,LPDWORD);
1328 DWORD WINAPI GetTapeStatus(HANDLE);
1329 DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
1330 BOOL WINAPI GetThreadContext(HANDLE,CONTEXT *);
1331 INT WINAPI GetThreadPriority(HANDLE);
1332 BOOL WINAPI GetThreadPriorityBoost(HANDLE,PBOOL);
1333 BOOL WINAPI GetThreadSelectorEntry(HANDLE,DWORD,LPLDT_ENTRY);
1334 BOOL WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
1335 BOOL WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,LPVOID,DWORD,LPDWORD);
1336 BOOL WINAPI GetUserNameA(LPSTR,LPDWORD);
1337 BOOL WINAPI GetUserNameW(LPWSTR,LPDWORD);
1338 #define GetUserName WINELIB_NAME_AW(GetUserName)
1339 VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS);
1340 DWORD WINAPI HeapCompact(HANDLE,DWORD);
1341 HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD);
1342 BOOL WINAPI HeapDestroy(HANDLE);
1343 BOOL WINAPI HeapLock(HANDLE);
1344 BOOL WINAPI HeapUnlock(HANDLE);
1345 BOOL WINAPI HeapValidate(HANDLE,DWORD,LPCVOID);
1346 BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
1347 DWORD WINAPI InitializeAcl(PACL,DWORD,DWORD);
1348 BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
1349 BOOL WINAPI InitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
1350 BOOL WINAPI IsTextUnicode(CONST LPVOID lpBuffer, int cb, LPINT lpi);
1351 BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
1352 BOOL WINAPI IsValidSid(PSID);
1353 BOOL WINAPI ImpersonateLoggedOnUser(HANDLE);
1354 BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
1355 BOOL WINAPI IsProcessorFeaturePresent(DWORD);
1356 BOOL WINAPI LookupAccountSidA(LPCSTR,PSID,LPSTR,LPDWORD,LPSTR,LPDWORD,PSID_NAME_USE);
1357 BOOL WINAPI LookupAccountSidW(LPCWSTR,PSID,LPWSTR,LPDWORD,LPWSTR,LPDWORD,PSID_NAME_USE);
1358 #define LookupAccountSid WINELIB_NAME_AW(LookupAccountSid)
1359 BOOL WINAPI LocalFileTimeToFileTime(const FILETIME*,LPFILETIME);
1360 BOOL WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1361 BOOL WINAPI LockFileEx(HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED);
1362 BOOL WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,LPVOID);
1363 BOOL WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,LPVOID);
1364 #define LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
1365 BOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
1366 HMODULE WINAPI MapHModuleSL(WORD);
1367 WORD WINAPI MapHModuleLS(HMODULE);
1368 LPVOID WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1369 LPVOID WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,LPVOID);
1370 BOOL WINAPI MoveFileA(LPCSTR,LPCSTR);
1371 BOOL WINAPI MoveFileW(LPCWSTR,LPCWSTR);
1372 #define MoveFile WINELIB_NAME_AW(MoveFile)
1373 BOOL WINAPI MoveFileExA(LPCSTR,LPCSTR,DWORD);
1374 BOOL WINAPI MoveFileExW(LPCWSTR,LPCWSTR,DWORD);
1375 #define MoveFileEx WINELIB_NAME_AW(MoveFileEx)
1376 BOOL WINAPI NotifyChangeEventLog(HANDLE,HANDLE);
1377 HANDLE WINAPI OpenBackupEventLogA(LPCSTR,LPCSTR);
1378 HANDLE WINAPI OpenBackupEventLogW(LPCWSTR,LPCWSTR);
1379 #define OpenBackupEventLog WINELIB_NAME_AW(OpenBackupEventLog)
1380 HANDLE WINAPI OpenEventA(DWORD,BOOL,LPCSTR);
1381 HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR);
1382 #define OpenEvent WINELIB_NAME_AW(OpenEvent)
1383 HANDLE WINAPI OpenEventLogA(LPCSTR,LPCSTR);
1384 HANDLE WINAPI OpenEventLogW(LPCWSTR,LPCWSTR);
1385 #define OpenEventLog WINELIB_NAME_AW(OpenEventLog)
1386 HANDLE WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR);
1387 HANDLE WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR);
1388 #define OpenFileMapping WINELIB_NAME_AW(OpenFileMapping)
1389 HANDLE WINAPI OpenMutexA(DWORD,BOOL,LPCSTR);
1390 HANDLE WINAPI OpenMutexW(DWORD,BOOL,LPCWSTR);
1391 #define OpenMutex WINELIB_NAME_AW(OpenMutex)
1392 HANDLE WINAPI OpenProcess(DWORD,BOOL,DWORD);
1393 BOOL WINAPI OpenProcessToken(HANDLE,DWORD,PHANDLE);
1394 HANDLE WINAPI OpenSemaphoreA(DWORD,BOOL,LPCSTR);
1395 HANDLE WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR);
1396 #define OpenSemaphore WINELIB_NAME_AW(OpenSemaphore)
1397 HANDLE WINAPI OpenThread(DWORD,BOOL,DWORD);
1398 BOOL WINAPI OpenThreadToken(HANDLE,DWORD,BOOL,PHANDLE);
1399 HANDLE WINAPI OpenWaitableTimerA(DWORD,BOOL,LPCSTR);
1400 HANDLE WINAPI OpenWaitableTimerW(DWORD,BOOL,LPCWSTR);
1401 #define OpenWaitableTimer WINELIB_NAME_AW(OpenWaitableTimer)
1402 DWORD WINAPI PrepareTape(HANDLE,DWORD,BOOL);
1403 BOOL WINAPI PulseEvent(HANDLE);
1404 BOOL WINAPI PurgeComm(HANDLE,DWORD);
1405 DWORD WINAPI QueryDosDeviceA(LPCSTR,LPSTR,DWORD);
1406 DWORD WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
1407 #define QueryDosDevice WINELIB_NAME_AW(QueryDosDevice)
1408 BOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER*);
1409 BOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER*);
1410 BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
1411 BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
1412 #define ReadEventLog WINELIB_NAME_AW(ReadEventLog)
1413 BOOL WINAPI ReadFile(HANDLE,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
1414 BOOL WINAPI ReadFileEx(HANDLE,LPVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
1415 HANDLE WINAPI RegisterEventSourceA(LPCSTR,LPCSTR);
1416 HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
1417 #define RegisterEventSource WINELIB_NAME_AW(RegisterEventSource)
1418 BOOL WINAPI ReleaseMutex(HANDLE);
1419 BOOL WINAPI ReleaseSemaphore(HANDLE,LONG,LPLONG);
1420 BOOL WINAPI ReportEventA(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCSTR *,LPVOID);
1421 BOOL WINAPI ReportEventW(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCWSTR *,LPVOID);
1422 #define ReportEvent WINELIB_NAME_AW(ReportEvent)
1423 BOOL WINAPI ResetEvent(HANDLE);
1424 DWORD WINAPI ResumeThread(HANDLE);
1425 BOOL WINAPI RevertToSelf(void);
1426 DWORD WINAPI SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*);
1427 DWORD WINAPI SearchPathW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPWSTR*);
1428 #define SearchPath WINELIB_NAME_AW(SearchPath)
1429 BOOL WINAPI SetCommConfig(HANDLE,LPCOMMCONFIG,DWORD);
1430 BOOL WINAPI SetCommBreak(HANDLE);
1431 BOOL WINAPI SetCommMask(HANDLE,DWORD);
1432 BOOL WINAPI SetCommState(HANDLE,LPDCB);
1433 BOOL WINAPI SetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
1434 BOOL WINAPI SetComputerNameA(LPCSTR);
1435 BOOL WINAPI SetComputerNameW(LPCWSTR);
1436 #define SetComputerName WINELIB_NAME_AW(SetComputerName)
1437 BOOL WINAPI SetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,DWORD);
1438 BOOL WINAPI SetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,DWORD);
1439 #define SetDefaultCommConfig WINELIB_NAME_AW(SetDefaultCommConfig)
1440 BOOL WINAPI SetEndOfFile(HANDLE);
1441 BOOL WINAPI SetEnvironmentVariableA(LPCSTR,LPCSTR);
1442 BOOL WINAPI SetEnvironmentVariableW(LPCWSTR,LPCWSTR);
1443 #define SetEnvironmentVariable WINELIB_NAME_AW(SetEnvironmentVariable)
1444 BOOL WINAPI SetEvent(HANDLE);
1445 VOID WINAPI SetFileApisToANSI(void);
1446 VOID WINAPI SetFileApisToOEM(void);
1447 DWORD WINAPI SetFilePointer(HANDLE,LONG,LPLONG,DWORD);
1448 BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1449 BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1450 #define SetFileSecurity WINELIB_NAME_AW(SetFileSecurity)
1451 BOOL WINAPI SetFileTime(HANDLE,const FILETIME*,const FILETIME*,const FILETIME*);
1452 BOOL WINAPI SetHandleInformation(HANDLE,DWORD,DWORD);
1453 BOOL WINAPI SetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1454 BOOL WINAPI SetPriorityClass(HANDLE,DWORD);
1455 BOOL WINAPI SetLocalTime(const SYSTEMTIME*);
1456 BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
1457 BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL);
1458 BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID,BOOL);
1459 BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
1460 BOOL WINAPI SetStdHandle(DWORD,HANDLE);
1461 BOOL WINAPI SetSystemPowerState(BOOL,BOOL);
1462 BOOL WINAPI SetSystemTime(const SYSTEMTIME*);
1463 DWORD WINAPI SetTapeParameters(HANDLE,DWORD,LPVOID);
1464 DWORD WINAPI SetTapePosition(HANDLE,DWORD,DWORD,DWORD,DWORD,BOOL);
1465 DWORD WINAPI SetThreadAffinityMask(HANDLE,DWORD);
1466 BOOL WINAPI SetThreadContext(HANDLE,const CONTEXT *);
1467 DWORD WINAPI SetThreadExecutionState(EXECUTION_STATE);
1468 DWORD WINAPI SetThreadIdealProcessor(HANDLE,DWORD);
1469 BOOL WINAPI SetThreadPriority(HANDLE,INT);
1470 BOOL WINAPI SetThreadPriorityBoost(HANDLE,BOOL);
1471 BOOL WINAPI SetThreadToken(PHANDLE,HANDLE);
1472 BOOL WINAPI SetTimeZoneInformation(const LPTIME_ZONE_INFORMATION);
1473 BOOL WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,LPVOID,BOOL);
1474 BOOL WINAPI SetupComm(HANDLE,DWORD,DWORD);
1475 VOID WINAPI Sleep(DWORD);
1476 DWORD WINAPI SleepEx(DWORD,BOOL);
1477 DWORD WINAPI SuspendThread(HANDLE);
1478 BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
1479 DWORD WINAPI TlsAlloc(void);
1480 BOOL WINAPI TlsFree(DWORD);
1481 LPVOID WINAPI TlsGetValue(DWORD);
1482 BOOL WINAPI TlsSetValue(DWORD,LPVOID);
1483 BOOL WINAPI TransmitCommChar(HANDLE,CHAR);
1484 BOOL WINAPI UnlockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1485 BOOL WINAPI UnmapViewOfFile(LPVOID);
1486 LPVOID WINAPI VirtualAlloc(LPVOID,DWORD,DWORD,DWORD);
1487 LPVOID WINAPI VirtualAllocEx(HANDLE,LPVOID,DWORD,DWORD,DWORD);
1488 BOOL WINAPI VirtualFree(LPVOID,DWORD,DWORD);
1489 BOOL WINAPI VirtualLock(LPVOID,DWORD);
1490 BOOL WINAPI VirtualProtect(LPVOID,DWORD,DWORD,LPDWORD);
1491 BOOL WINAPI VirtualProtectEx(HANDLE,LPVOID,DWORD,DWORD,LPDWORD);
1492 DWORD WINAPI VirtualQuery(LPCVOID,LPMEMORY_BASIC_INFORMATION,DWORD);
1493 DWORD WINAPI VirtualQueryEx(HANDLE,LPCVOID,LPMEMORY_BASIC_INFORMATION,DWORD);
1494 BOOL WINAPI VirtualUnlock(LPVOID,DWORD);
1495 BOOL WINAPI WaitCommEvent(HANDLE,LPDWORD,LPOVERLAPPED);
1496 BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD);
1497 DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD);
1498 DWORD WINAPI WaitForMultipleObjectsEx(DWORD,const HANDLE*,BOOL,DWORD,BOOL);
1499 DWORD WINAPI WaitForSingleObject(HANDLE,DWORD);
1500 DWORD WINAPI WaitForSingleObjectEx(HANDLE,DWORD,BOOL);
1501 BOOL WINAPI WaitNamedPipeA(LPCSTR,DWORD);
1502 BOOL WINAPI WaitNamedPipeW(LPCWSTR,DWORD);
1503 #define WaitNamedPipe WINELIB_NAME_AW(WaitNamedPipe)
1504 BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
1505 BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
1506 DWORD WINAPI WriteTapemark(HANDLE,DWORD,DWORD,BOOL);
1507 ATOM WINAPI AddAtomA(LPCSTR);
1508 ATOM WINAPI AddAtomW(LPCWSTR);
1509 #define AddAtom WINELIB_NAME_AW(AddAtom)
1510 BOOL WINAPI CreateDirectoryA(LPCSTR,LPSECURITY_ATTRIBUTES);
1511 BOOL WINAPI CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES);
1512 #define CreateDirectory WINELIB_NAME_AW(CreateDirectory)
1513 BOOL WINAPI CreateDirectoryExA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES);
1514 BOOL WINAPI CreateDirectoryExW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES);
1515 #define CreateDirectoryEx WINELIB_NAME_AW(CreateDirectoryEx)
1516 BOOL WINAPI DefineDosDeviceA(DWORD,LPCSTR,LPCSTR);
1517 #define DefineHandleTable(w) ((w),TRUE)
1518 ATOM WINAPI DeleteAtom(ATOM);
1519 BOOL WINAPI DeleteFileA(LPCSTR);
1520 BOOL WINAPI DeleteFileW(LPCWSTR);
1521 #define DeleteFile WINELIB_NAME_AW(DeleteFile)
1522 void WINAPI FatalAppExitA(UINT,LPCSTR);
1523 void WINAPI FatalAppExitW(UINT,LPCWSTR);
1524 #define FatalAppExit WINELIB_NAME_AW(FatalAppExit)
1525 ATOM WINAPI FindAtomA(LPCSTR);
1526 ATOM WINAPI FindAtomW(LPCWSTR);
1527 #define FindAtom WINELIB_NAME_AW(FindAtom)
1528 BOOL WINAPI FindClose(HANDLE);
1529 HANDLE WINAPI FindFirstFileA(LPCSTR,LPWIN32_FIND_DATAA);
1530 HANDLE WINAPI FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW);
1531 #define FindFirstFile WINELIB_NAME_AW(FindFirstFile)
1532 HANDLE WINAPI FindFirstFileExA(LPCSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD);
1533 HANDLE WINAPI FindFirstFileExW(LPCWSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD);
1534 #define FindFirstFileEx WINELIB_NAME_AW(FindFirstFileEx)
1535 BOOL WINAPI FindNextFileA(HANDLE,LPWIN32_FIND_DATAA);
1536 BOOL WINAPI FindNextFileW(HANDLE,LPWIN32_FIND_DATAW);
1537 #define FindNextFile WINELIB_NAME_AW(FindNextFile)
1538 HRSRC WINAPI FindResourceA(HMODULE,LPCSTR,LPCSTR);
1539 HRSRC WINAPI FindResourceW(HMODULE,LPCWSTR,LPCWSTR);
1540 #define FindResource WINELIB_NAME_AW(FindResource)
1541 BOOL WINAPI FlushInstructionCache(HANDLE,LPCVOID,DWORD);
1542 BOOL WINAPI FreeLibrary(HMODULE);
1543 #define FreeModule(handle) FreeLibrary(handle)
1544 #define FreeProcInstance(proc) /*nothing*/
1545 BOOL WINAPI FreeResource(HGLOBAL);
1546 UINT WINAPI GetAtomNameA(ATOM,LPSTR,INT);
1547 UINT WINAPI GetAtomNameW(ATOM,LPWSTR,INT);
1548 #define GetAtomName WINELIB_NAME_AW(GetAtomName)
1549 UINT WINAPI GetCurrentDirectoryA(UINT,LPSTR);
1550 UINT WINAPI GetCurrentDirectoryW(UINT,LPWSTR);
1551 #define GetCurrentDirectory WINELIB_NAME_AW(GetCurrentDirectory)
1552 #define GetCurrentTime() GetTickCount()
1553 BOOL WINAPI GetDiskFreeSpaceA(LPCSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1554 BOOL WINAPI GetDiskFreeSpaceW(LPCWSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1555 #define GetDiskFreeSpace WINELIB_NAME_AW(GetDiskFreeSpace)
1556 BOOL WINAPI GetDiskFreeSpaceExA(LPCSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
1557 BOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
1558 #define GetDiskFreeSpaceEx WINELIB_NAME_AW(GetDiskFreeSpaceEx)
1559 UINT WINAPI GetDriveTypeA(LPCSTR);
1560 UINT WINAPI GetDriveTypeW(LPCWSTR);
1561 #define GetDriveType WINELIB_NAME_AW(GetDriveType)
1562 BOOL WINAPI GetExitCodeProcess(HANDLE,LPDWORD);
1563 DWORD WINAPI GetFileAttributesA(LPCSTR);
1564 DWORD WINAPI GetFileAttributesW(LPCWSTR);
1565 #define GetFileAttributes WINELIB_NAME_AW(GetFileAttributes)
1566 #define GetFreeSpace(w) (0x100000L)
1567 UINT WINAPI GetLogicalDriveStringsA(UINT,LPSTR);
1568 UINT WINAPI GetLogicalDriveStringsW(UINT,LPWSTR);
1569 #define GetLogicalDriveStrings WINELIB_NAME_AW(GetLogicalDriveStrings)
1570 DWORD WINAPI GetModuleFileNameA(HMODULE,LPSTR,DWORD);
1571 DWORD WINAPI GetModuleFileNameW(HMODULE,LPWSTR,DWORD);
1572 #define GetModuleFileName WINELIB_NAME_AW(GetModuleFileName)
1573 HMODULE WINAPI GetModuleHandleA(LPCSTR);
1574 HMODULE WINAPI GetModuleHandleW(LPCWSTR);
1575 #define GetModuleHandle WINELIB_NAME_AW(GetModuleHandle)
1576 BOOL WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,LPDWORD,BOOL);
1577 UINT WINAPI GetPrivateProfileIntA(LPCSTR,LPCSTR,INT,LPCSTR);
1578 UINT WINAPI GetPrivateProfileIntW(LPCWSTR,LPCWSTR,INT,LPCWSTR);
1579 #define GetPrivateProfileInt WINELIB_NAME_AW(GetPrivateProfileInt)
1580 INT WINAPI GetPrivateProfileSectionA(LPCSTR,LPSTR,DWORD,LPCSTR);
1581 INT WINAPI GetPrivateProfileSectionW(LPCWSTR,LPWSTR,DWORD,LPCWSTR);
1582 #define GetPrivateProfileSection WINELIB_NAME_AW(GetPrivateProfileSection)
1583 DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR,DWORD,LPCSTR);
1584 DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR,DWORD,LPCWSTR);
1585 #define GetPrivateProfileSectionNames WINELIB_NAME_AW(GetPrivateProfileSectionNames)
1586 INT WINAPI GetPrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT,LPCSTR);
1587 INT WINAPI GetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT,LPCWSTR);
1588 #define GetPrivateProfileString WINELIB_NAME_AW(GetPrivateProfileString)
1589 BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
1590 BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
1591 #define GetPrivateProfileStruct WINELIB_NAME_AW(GetPrivateProfileStruct)
1592 FARPROC WINAPI GetProcAddress(HMODULE,LPCSTR);
1593 UINT WINAPI GetProfileIntA(LPCSTR,LPCSTR,INT);
1594 UINT WINAPI GetProfileIntW(LPCWSTR,LPCWSTR,INT);
1595 #define GetProfileInt WINELIB_NAME_AW(GetProfileInt)
1596 INT WINAPI GetProfileSectionA(LPCSTR,LPSTR,DWORD);
1597 INT WINAPI GetProfileSectionW(LPCWSTR,LPWSTR,DWORD);
1598 #define GetProfileSection WINELIB_NAME_AW(GetProfileSection)
1599 INT WINAPI GetProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT);
1600 INT WINAPI GetProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT);
1601 #define GetProfileString WINELIB_NAME_AW(GetProfileString)
1602 VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA);
1603 VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW);
1604 #define GetStartupInfo WINELIB_NAME_AW(GetStartupInfo)
1605 UINT WINAPI GetSystemDirectoryA(LPSTR,UINT);
1606 UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT);
1607 #define GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
1608 DWORD WINAPI GetTickCount(void);
1609 UINT WINAPI GetTempFileNameA(LPCSTR,LPCSTR,UINT,LPSTR);
1610 UINT WINAPI GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR);
1611 #define GetTempFileName WINELIB_NAME_AW(GetTempFileName)
1612 UINT WINAPI GetTempPathA(UINT,LPSTR);
1613 UINT WINAPI GetTempPathW(UINT,LPWSTR);
1614 #define GetTempPath WINELIB_NAME_AW(GetTempPath)
1615 LONG WINAPI GetVersion(void);
1616 BOOL WINAPI GetVolumeInformationA(LPCSTR,LPSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPSTR,DWORD);
1617 BOOL WINAPI GetVolumeInformationW(LPCWSTR,LPWSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPWSTR,DWORD);
1618 #define GetVolumeInformation WINELIB_NAME_AW(GetVolumeInformation)
1619 UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT);
1620 UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
1621 #define GetWindowsDirectory WINELIB_NAME_AW(GetWindowsDirectory)
1622 ATOM WINAPI GlobalAddAtomA(LPCSTR);
1623 ATOM WINAPI GlobalAddAtomW(LPCWSTR);
1624 #define GlobalAddAtom WINELIB_NAME_AW(GlobalAddAtom)
1625 HGLOBAL WINAPI GlobalAlloc(UINT,DWORD);
1626 DWORD WINAPI GlobalCompact(DWORD);
1627 ATOM WINAPI GlobalDeleteAtom(ATOM);
1628 ATOM WINAPI GlobalFindAtomA(LPCSTR);
1629 ATOM WINAPI GlobalFindAtomW(LPCWSTR);
1630 #define GlobalFindAtom WINELIB_NAME_AW(GlobalFindAtom)
1631 UINT WINAPI GlobalFlags(HGLOBAL);
1632 HGLOBAL WINAPI GlobalFree(HGLOBAL);
1633 UINT WINAPI GlobalGetAtomNameA(ATOM,LPSTR,INT);
1634 UINT WINAPI GlobalGetAtomNameW(ATOM,LPWSTR,INT);
1635 #define GlobalGetAtomName WINELIB_NAME_AW(GlobalGetAtomName)
1636 HGLOBAL WINAPI GlobalHandle(LPCVOID);
1637 VOID WINAPI GlobalFix(HGLOBAL);
1638 LPVOID WINAPI GlobalLock(HGLOBAL);
1639 HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,DWORD,UINT);
1640 DWORD WINAPI GlobalSize(HGLOBAL);
1641 VOID WINAPI GlobalUnfix(HGLOBAL);
1642 BOOL WINAPI GlobalUnlock(HGLOBAL);
1643 BOOL WINAPI GlobalUnWire(HGLOBAL);
1644 LPVOID WINAPI GlobalWire(HGLOBAL);
1645 #define HasOverlappedCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
1646 BOOL WINAPI InitAtomTable(DWORD);
1647 BOOL WINAPI IsBadCodePtr(FARPROC);
1648 BOOL WINAPI IsBadHugeReadPtr(LPCVOID,UINT);
1649 BOOL WINAPI IsBadHugeWritePtr(LPVOID,UINT);
1650 BOOL WINAPI IsBadReadPtr(LPCVOID,UINT);
1651 BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT);
1652 BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT);
1653 #define IsBadStringPtr WINELIB_NAME_AW(IsBadStringPtr)
1654 BOOL WINAPI IsBadWritePtr(LPVOID,UINT);
1655 BOOL WINAPI IsDebuggerPresent(void);
1656 HMODULE WINAPI LoadLibraryA(LPCSTR);
1657 HMODULE WINAPI LoadLibraryW(LPCWSTR);
1658 #define LoadLibrary WINELIB_NAME_AW(LoadLibrary)
1659 HMODULE WINAPI LoadLibraryExA(LPCSTR,HANDLE,DWORD);
1660 HMODULE WINAPI LoadLibraryExW(LPCWSTR,HANDLE,DWORD);
1661 #define LoadLibraryEx WINELIB_NAME_AW(LoadLibraryEx)
1662 HINSTANCE WINAPI LoadModule(LPCSTR,LPVOID);
1663 HGLOBAL WINAPI LoadResource(HMODULE,HRSRC);
1664 HLOCAL WINAPI LocalAlloc(UINT,DWORD);
1665 UINT WINAPI LocalCompact(UINT);
1666 UINT WINAPI LocalFlags(HLOCAL);
1667 HLOCAL WINAPI LocalFree(HLOCAL);
1668 HLOCAL WINAPI LocalHandle(LPCVOID);
1669 LPVOID WINAPI LocalLock(HLOCAL);
1670 HLOCAL WINAPI LocalReAlloc(HLOCAL,DWORD,UINT);
1671 UINT WINAPI LocalShrink(HGLOBAL,UINT);
1672 UINT WINAPI LocalSize(HLOCAL);
1673 BOOL WINAPI LocalUnlock(HLOCAL);
1674 LPVOID WINAPI LockResource(HGLOBAL);
1675 #define LockSegment(handle) GlobalFix((HANDLE)(handle))
1676 #define MakeProcInstance(proc,inst) (proc)
1677 HFILE WINAPI OpenFile(LPCSTR,OFSTRUCT*,UINT);
1678 VOID WINAPI OutputDebugStringA(LPCSTR);
1679 VOID WINAPI OutputDebugStringW(LPCWSTR);
1680 #define OutputDebugString WINELIB_NAME_AW(OutputDebugString)
1681 BOOL WINAPI ReadProcessMemory(HANDLE, LPCVOID, LPVOID, DWORD, LPDWORD);
1682 BOOL WINAPI RemoveDirectoryA(LPCSTR);
1683 BOOL WINAPI RemoveDirectoryW(LPCWSTR);
1684 #define RemoveDirectory WINELIB_NAME_AW(RemoveDirectory)
1685 BOOL WINAPI SetCurrentDirectoryA(LPCSTR);
1686 BOOL WINAPI SetCurrentDirectoryW(LPCWSTR);
1687 #define SetCurrentDirectory WINELIB_NAME_AW(SetCurrentDirectory)
1688 UINT WINAPI SetErrorMode(UINT);
1689 BOOL WINAPI SetFileAttributesA(LPCSTR,DWORD);
1690 BOOL WINAPI SetFileAttributesW(LPCWSTR,DWORD);
1691 #define SetFileAttributes WINELIB_NAME_AW(SetFileAttributes)
1692 UINT WINAPI SetHandleCount(UINT);
1693 #define SetSwapAreaSize(w) (w)
1694 BOOL WINAPI SetVolumeLabelA(LPCSTR,LPCSTR);
1695 BOOL WINAPI SetVolumeLabelW(LPCWSTR,LPCWSTR);
1696 #define SetVolumeLabel WINELIB_NAME_AW(SetVolumeLabel)
1697 DWORD WINAPI SizeofResource(HMODULE,HRSRC);
1698 BOOL WINAPI UnlockFileEx(HFILE,DWORD,DWORD,DWORD,LPOVERLAPPED);
1699 #define UnlockSegment(handle) GlobalUnfix((HANDLE)(handle))
1700 BOOL WINAPI WritePrivateProfileSectionA(LPCSTR,LPCSTR,LPCSTR);
1701 BOOL WINAPI WritePrivateProfileSectionW(LPCWSTR,LPCWSTR,LPCWSTR);
1702 #define WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
1703 BOOL WINAPI WritePrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
1704 BOOL WINAPI WritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
1705 #define WritePrivateProfileString WINELIB_NAME_AW(WritePrivateProfileString)
1706 BOOL WINAPI WriteProfileSectionA(LPCSTR,LPCSTR);
1707 BOOL WINAPI WriteProfileSectionW(LPCWSTR,LPCWSTR);
1708 #define WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
1709 BOOL WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
1710 BOOL WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
1711 #define WritePrivateProfileStruct WINELIB_NAME_AW(WritePrivateProfileStruct)
1712 BOOL WINAPI WriteProcessMemory(HANDLE,LPVOID,LPCVOID,DWORD,LPDWORD);
1713 BOOL WINAPI WriteProfileStringA(LPCSTR,LPCSTR,LPCSTR);
1714 BOOL WINAPI WriteProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR);
1715 #define WriteProfileString WINELIB_NAME_AW(WriteProfileString)
1716 #define Yield()
1717 LPSTR WINAPI lstrcatA(LPSTR,LPCSTR);
1718 LPWSTR WINAPI lstrcatW(LPWSTR,LPCWSTR);
1719 #define lstrcat WINELIB_NAME_AW(lstrcat)
1720 LPSTR WINAPI lstrcpyA(LPSTR,LPCSTR);
1721 LPWSTR WINAPI lstrcpyW(LPWSTR,LPCWSTR);
1722 #define lstrcpy WINELIB_NAME_AW(lstrcpy)
1723 LPSTR WINAPI lstrcpynA(LPSTR,LPCSTR,INT);
1724 LPWSTR WINAPI lstrcpynW(LPWSTR,LPCWSTR,INT);
1725 #define lstrcpyn WINELIB_NAME_AW(lstrcpyn)
1726 INT WINAPI lstrlenA(LPCSTR);
1727 INT WINAPI lstrlenW(LPCWSTR);
1728 #define lstrlen WINELIB_NAME_AW(lstrlen)
1729 UINT WINAPI WinExec(LPCSTR,UINT);
1730 LONG WINAPI _hread(HFILE,LPVOID,LONG);
1731 LONG WINAPI _hwrite(HFILE,LPCSTR,LONG);
1732 HFILE WINAPI _lcreat(LPCSTR,INT);
1733 HFILE WINAPI _lclose(HFILE);
1734 LONG WINAPI _llseek(HFILE,LONG,INT);
1735 HFILE WINAPI _lopen(LPCSTR,INT);
1736 UINT WINAPI _lread(HFILE,LPVOID,UINT);
1737 UINT WINAPI _lwrite(HFILE,LPCSTR,UINT);
1738 INT WINAPI lstrcmpA(LPCSTR,LPCSTR);
1739 INT WINAPI lstrcmpW(LPCWSTR,LPCWSTR);
1740 #define lstrcmp WINELIB_NAME_AW(lstrcmp)
1741 INT WINAPI lstrcmpiA(LPCSTR,LPCSTR);
1742 INT WINAPI lstrcmpiW(LPCWSTR,LPCWSTR);
1743 #define lstrcmpi WINELIB_NAME_AW(lstrcmpi)
1745 /* compatibility macros */
1746 #define FillMemory RtlFillMemory
1747 #define MoveMemory RtlMoveMemory
1748 #define ZeroMemory RtlZeroMemory
1749 #define CopyMemory RtlCopyMemory
1751 /* undocumented functions */
1753 typedef struct tagSYSLEVEL
1755 CRITICAL_SECTION crst;
1756 INT level;
1757 } SYSLEVEL;
1759 /* [GS]etProcessDword offsets */
1760 #define GPD_APP_COMPAT_FLAGS (-56)
1761 #define GPD_LOAD_DONE_EVENT (-52)
1762 #define GPD_HINSTANCE16 (-48)
1763 #define GPD_WINDOWS_VERSION (-44)
1764 #define GPD_THDB (-40)
1765 #define GPD_PDB (-36)
1766 #define GPD_STARTF_SHELLDATA (-32)
1767 #define GPD_STARTF_HOTKEY (-28)
1768 #define GPD_STARTF_SHOWWINDOW (-24)
1769 #define GPD_STARTF_SIZE (-20)
1770 #define GPD_STARTF_POSITION (-16)
1771 #define GPD_STARTF_FLAGS (-12)
1772 #define GPD_PARENT (- 8)
1773 #define GPD_FLAGS (- 4)
1774 #define GPD_USERDATA ( 0)
1776 void WINAPI DisposeLZ32Handle(HANDLE);
1777 HANDLE WINAPI DosFileHandleToWin32Handle(HFILE);
1778 DWORD WINAPI GetProcessDword(DWORD,INT);
1779 VOID WINAPI GetpWin16Lock(SYSLEVEL**);
1780 DWORD WINAPI MapLS(LPCVOID);
1781 DWORD WINAPI MapProcessHandle(HANDLE);
1782 LPVOID WINAPI MapSL(DWORD);
1783 VOID WINAPI ReleaseThunkLock(DWORD*);
1784 VOID WINAPI RestoreThunkLock(DWORD);
1785 void WINAPI SetProcessDword(DWORD,INT,DWORD);
1786 VOID WINAPI UnMapLS(DWORD);
1787 HFILE WINAPI Win32HandleToDosFileHandle(HANDLE);
1788 VOID WINAPI _CheckNotSysLevel(SYSLEVEL *lock);
1789 DWORD WINAPI _ConfirmWin16Lock(void);
1790 DWORD WINAPI _ConfirmSysLevel(SYSLEVEL*);
1791 VOID WINAPI _EnterSysLevel(SYSLEVEL*);
1792 VOID WINAPI _LeaveSysLevel(SYSLEVEL*);
1795 /* Wine internal functions */
1797 BOOL WINAPI wine_get_unix_file_name( LPCSTR dos, LPSTR buffer, DWORD len );
1800 /* a few optimizations for i386/gcc */
1802 #if defined(__i386__) && defined(__GNUC__)
1804 extern inline LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare );
1805 extern inline LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare )
1807 LONG ret;
1808 __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
1809 : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
1810 return ret;
1813 extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val );
1814 extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val )
1816 LONG ret;
1817 __asm__ __volatile__( "lock; xchgl %0,(%1)"
1818 : "=r" (ret) :"r" (dest), "0" (val) : "memory" );
1819 return ret;
1822 extern inline LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr );
1823 extern inline LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr )
1825 LONG ret;
1826 __asm__ __volatile__( "lock; xaddl %0,(%1)"
1827 : "=r" (ret) : "r" (dest), "0" (incr) : "memory" );
1828 return ret;
1831 extern inline LONG WINAPI InterlockedIncrement( PLONG dest );
1832 extern inline LONG WINAPI InterlockedIncrement( PLONG dest )
1834 return InterlockedExchangeAdd( dest, 1 ) + 1;
1837 extern inline LONG WINAPI InterlockedDecrement( PLONG dest );
1838 extern inline LONG WINAPI InterlockedDecrement( PLONG dest )
1840 return InterlockedExchangeAdd( dest, -1 ) - 1;
1843 extern inline DWORD WINAPI GetLastError(void);
1844 extern inline DWORD WINAPI GetLastError(void)
1846 DWORD ret;
1847 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x60,%0" : "=r" (ret) );
1848 return ret;
1851 extern inline DWORD WINAPI GetCurrentProcessId(void);
1852 extern inline DWORD WINAPI GetCurrentProcessId(void)
1854 DWORD ret;
1855 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x20,%0" : "=r" (ret) );
1856 return ret;
1859 extern inline DWORD WINAPI GetCurrentThreadId(void);
1860 extern inline DWORD WINAPI GetCurrentThreadId(void)
1862 DWORD ret;
1863 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x24,%0" : "=r" (ret) );
1864 return ret;
1867 extern inline void WINAPI SetLastError( DWORD err );
1868 extern inline void WINAPI SetLastError( DWORD err )
1870 __asm__ __volatile__( ".byte 0x64\n\tmovl %0,0x60" : : "r" (err) : "memory" );
1873 extern inline HANDLE WINAPI GetProcessHeap(void);
1874 extern inline HANDLE WINAPI GetProcessHeap(void)
1876 HANDLE *pdb;
1877 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x30,%0" : "=r" (pdb) );
1878 return pdb[0x18 / sizeof(HANDLE)]; /* get dword at offset 0x18 in pdb */
1881 #else /* __i386__ && __GNUC__ */
1882 DWORD WINAPI GetCurrentProcessId(void);
1883 DWORD WINAPI GetCurrentThreadId(void);
1884 DWORD WINAPI GetLastError(void);
1885 HANDLE WINAPI GetProcessHeap(void);
1886 LONG WINAPI InterlockedCompareExchange(LONG*,LONG,LONG);
1887 LONG WINAPI InterlockedDecrement(PLONG);
1888 LONG WINAPI InterlockedExchange(PLONG,LONG);
1889 LONG WINAPI InterlockedExchangeAdd(PLONG,LONG);
1890 LONG WINAPI InterlockedIncrement(PLONG);
1891 VOID WINAPI SetLastError(DWORD);
1892 #endif /* __i386__ && __GNUC__ */
1894 /* FIXME: should handle platforms where sizeof(void*) != sizeof(long) */
1895 static inline PVOID WINAPI InterlockedCompareExchangePointer( PVOID *dest, PVOID xchg, PVOID compare )
1897 return (PVOID)InterlockedCompareExchange( (PLONG)dest, (LONG)xchg, (LONG)compare );
1900 static inline PVOID WINAPI InterlockedExchangePointer( PVOID *dest, PVOID val )
1902 return (PVOID)InterlockedExchange( (PLONG)dest, (LONG)val );
1905 #ifdef __WINE__
1906 #define GetCurrentProcess() ((HANDLE)0xffffffff)
1907 #define GetCurrentThread() ((HANDLE)0xfffffffe)
1908 #endif
1910 /* WinMain(entry point) must be declared in winbase.h. */
1911 /* If this is not declared, we cannot compile many sources written with C++. */
1912 int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
1914 #ifdef __cplusplus
1916 #endif
1918 #endif /* __WINE_WINBASE_H */