Added version16.rc in RC_SRCS list.
[wine/multimedia.git] / include / winbase.h
blobd673d955a490da2bc09cfb3ba15950b5081c71c2
1 #ifndef __WINE_WINBASE_H
2 #define __WINE_WINBASE_H
4 #ifndef RC_INVOKED
5 #include <stdarg.h>
6 #endif
8 #include "basetsd.h"
9 #include "windef.h"
10 #include "pshpack1.h"
12 #ifndef RC_INVOKED
13 #include <stdarg.h>
14 #endif
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 /* Windows Exit Procedure flag values */
21 #define WEP_FREE_DLL 0
22 #define WEP_SYSTEM_EXIT 1
24 typedef DWORD CALLBACK (*LPTHREAD_START_ROUTINE)(LPVOID);
26 typedef VOID WINAPI (*PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
27 typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
29 typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
30 typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
31 typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
33 typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
34 typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
35 typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;
38 #define EXCEPTION_DEBUG_EVENT 1
39 #define CREATE_THREAD_DEBUG_EVENT 2
40 #define CREATE_PROCESS_DEBUG_EVENT 3
41 #define EXIT_THREAD_DEBUG_EVENT 4
42 #define EXIT_PROCESS_DEBUG_EVENT 5
43 #define LOAD_DLL_DEBUG_EVENT 6
44 #define UNLOAD_DLL_DEBUG_EVENT 7
45 #define OUTPUT_DEBUG_STRING_EVENT 8
46 #define RIP_EVENT 9
48 typedef struct _EXCEPTION_DEBUG_INFO {
49 EXCEPTION_RECORD ExceptionRecord;
50 DWORD dwFirstChance;
51 } EXCEPTION_DEBUG_INFO;
53 typedef struct _CREATE_THREAD_DEBUG_INFO {
54 HANDLE hThread;
55 LPVOID lpThreadLocalBase;
56 LPTHREAD_START_ROUTINE lpStartAddress;
57 } CREATE_THREAD_DEBUG_INFO;
59 typedef struct _CREATE_PROCESS_DEBUG_INFO {
60 HANDLE hFile;
61 HANDLE hProcess;
62 HANDLE hThread;
63 LPVOID lpBaseOfImage;
64 DWORD dwDebugInfoFileOffset;
65 DWORD nDebugInfoSize;
66 LPVOID lpThreadLocalBase;
67 LPTHREAD_START_ROUTINE lpStartAddress;
68 LPVOID lpImageName;
69 WORD fUnicode;
70 } CREATE_PROCESS_DEBUG_INFO;
72 typedef struct _EXIT_THREAD_DEBUG_INFO {
73 DWORD dwExitCode;
74 } EXIT_THREAD_DEBUG_INFO;
76 typedef struct _EXIT_PROCESS_DEBUG_INFO {
77 DWORD dwExitCode;
78 } EXIT_PROCESS_DEBUG_INFO;
80 typedef struct _LOAD_DLL_DEBUG_INFO {
81 HANDLE hFile;
82 LPVOID lpBaseOfDll;
83 DWORD dwDebugInfoFileOffset;
84 DWORD nDebugInfoSize;
85 LPVOID lpImageName;
86 WORD fUnicode;
87 } LOAD_DLL_DEBUG_INFO;
89 typedef struct _UNLOAD_DLL_DEBUG_INFO {
90 LPVOID lpBaseOfDll;
91 } UNLOAD_DLL_DEBUG_INFO;
93 typedef struct _OUTPUT_DEBUG_STRING_INFO {
94 LPSTR lpDebugStringData;
95 WORD fUnicode;
96 WORD nDebugStringLength;
97 } OUTPUT_DEBUG_STRING_INFO;
99 typedef struct _RIP_INFO {
100 DWORD dwError;
101 DWORD dwType;
102 } RIP_INFO;
104 typedef struct _DEBUG_EVENT {
105 DWORD dwDebugEventCode;
106 DWORD dwProcessId;
107 DWORD dwThreadId;
108 union {
109 EXCEPTION_DEBUG_INFO Exception;
110 CREATE_THREAD_DEBUG_INFO CreateThread;
111 CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
112 EXIT_THREAD_DEBUG_INFO ExitThread;
113 EXIT_PROCESS_DEBUG_INFO ExitProcess;
114 LOAD_DLL_DEBUG_INFO LoadDll;
115 UNLOAD_DLL_DEBUG_INFO UnloadDll;
116 OUTPUT_DEBUG_STRING_INFO DebugString;
117 RIP_INFO RipInfo;
118 } u;
119 } DEBUG_EVENT, *LPDEBUG_EVENT;
121 typedef PCONTEXT LPCONTEXT;
122 typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
123 typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
125 #define OFS_MAXPATHNAME 128
126 typedef struct
128 BYTE cBytes;
129 BYTE fFixedDisk;
130 WORD nErrCode;
131 BYTE reserved[4];
132 BYTE szPathName[OFS_MAXPATHNAME];
133 } OFSTRUCT, *POFSTRUCT, *LPOFSTRUCT;
135 #define OF_READ 0x0000
136 #define OF_WRITE 0x0001
137 #define OF_READWRITE 0x0002
138 #define OF_SHARE_COMPAT 0x0000
139 #define OF_SHARE_EXCLUSIVE 0x0010
140 #define OF_SHARE_DENY_WRITE 0x0020
141 #define OF_SHARE_DENY_READ 0x0030
142 #define OF_SHARE_DENY_NONE 0x0040
143 #define OF_PARSE 0x0100
144 #define OF_DELETE 0x0200
145 #define OF_VERIFY 0x0400 /* Used with OF_REOPEN */
146 #define OF_SEARCH 0x0400 /* Used without OF_REOPEN */
147 #define OF_CANCEL 0x0800
148 #define OF_CREATE 0x1000
149 #define OF_PROMPT 0x2000
150 #define OF_EXIST 0x4000
151 #define OF_REOPEN 0x8000
153 /* SetErrorMode values */
154 #define SEM_FAILCRITICALERRORS 0x0001
155 #define SEM_NOGPFAULTERRORBOX 0x0002
156 #define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
157 #define SEM_NOOPENFILEERRORBOX 0x8000
159 /* CopyFileEx flags */
160 #define COPY_FILE_FAIL_IF_EXISTS 0x00000001
161 #define COPY_FILE_RESTARTABLE 0x00000002
162 #define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x00000004
164 /* GetTempFileName() Flags */
165 #define TF_FORCEDRIVE 0x80
167 #define DRIVE_UNKNOWN 0
168 #define DRIVE_NO_ROOT_DIR 1
169 #define DRIVE_REMOVABLE 2
170 #define DRIVE_FIXED 3
171 #define DRIVE_REMOTE 4
172 /* Win32 additions */
173 #define DRIVE_CDROM 5
174 #define DRIVE_RAMDISK 6
176 /* The security attributes structure */
177 typedef struct _SECURITY_ATTRIBUTES
179 DWORD nLength;
180 LPVOID lpSecurityDescriptor;
181 BOOL bInheritHandle;
182 } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
184 #ifndef _FILETIME_
185 #define _FILETIME_
186 /* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
187 typedef struct
189 DWORD dwLowDateTime;
190 DWORD dwHighDateTime;
191 } FILETIME, *PFILETIME, *LPFILETIME;
192 #endif /* _FILETIME_ */
194 /* Find* structures */
195 typedef struct
197 DWORD dwFileAttributes;
198 FILETIME ftCreationTime;
199 FILETIME ftLastAccessTime;
200 FILETIME ftLastWriteTime;
201 DWORD nFileSizeHigh;
202 DWORD nFileSizeLow;
203 DWORD dwReserved0;
204 DWORD dwReserved1;
205 CHAR cFileName[260];
206 CHAR cAlternateFileName[14];
207 } WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
209 typedef struct
211 DWORD dwFileAttributes;
212 FILETIME ftCreationTime;
213 FILETIME ftLastAccessTime;
214 FILETIME ftLastWriteTime;
215 DWORD nFileSizeHigh;
216 DWORD nFileSizeLow;
217 DWORD dwReserved0;
218 DWORD dwReserved1;
219 WCHAR cFileName[260];
220 WCHAR cAlternateFileName[14];
221 } WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
223 DECL_WINELIB_TYPE_AW(WIN32_FIND_DATA)
224 DECL_WINELIB_TYPE_AW(PWIN32_FIND_DATA)
225 DECL_WINELIB_TYPE_AW(LPWIN32_FIND_DATA)
227 typedef enum _FINDEX_INFO_LEVELS
229 FindExInfoStandard,
230 FindExInfoMaxInfoLevel
231 } FINDEX_INFO_LEVELS;
233 typedef enum _FINDEX_SEARCH_OPS
235 FindExSearchNameMatch,
236 FindExSearchLimitToDirectories,
237 FindExSearchLimitToDevices,
238 FindExSearchMaxSearchOp
239 } FINDEX_SEARCH_OPS;
241 typedef struct
243 LPVOID lpData;
244 DWORD cbData;
245 BYTE cbOverhead;
246 BYTE iRegionIndex;
247 WORD wFlags;
248 union {
249 struct {
250 HANDLE hMem;
251 DWORD dwReserved[3];
252 } Block;
253 struct {
254 DWORD dwCommittedSize;
255 DWORD dwUnCommittedSize;
256 LPVOID lpFirstBlock;
257 LPVOID lpLastBlock;
258 } Region;
259 } DUMMYUNIONNAME;
260 } PROCESS_HEAP_ENTRY, *PPROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY;
262 #define PROCESS_HEAP_REGION 0x0001
263 #define PROCESS_HEAP_UNCOMMITTED_RANGE 0x0002
264 #define PROCESS_HEAP_ENTRY_BUSY 0x0004
265 #define PROCESS_HEAP_ENTRY_MOVEABLE 0x0010
266 #define PROCESS_HEAP_ENTRY_DDESHARE 0x0020
268 #define INVALID_HANDLE_VALUE ((HANDLE) -1)
270 #define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
272 #define SHUTDOWN_NORETRY 1
274 /* comm */
276 #define CBR_110 0xFF10
277 #define CBR_300 0xFF11
278 #define CBR_600 0xFF12
279 #define CBR_1200 0xFF13
280 #define CBR_2400 0xFF14
281 #define CBR_4800 0xFF15
282 #define CBR_9600 0xFF16
283 #define CBR_14400 0xFF17
284 #define CBR_19200 0xFF18
285 #define CBR_38400 0xFF1B
286 #define CBR_56000 0xFF1F
287 #define CBR_57600 0xFF20
288 #define CBR_115200 0xFF21
289 #define CBR_128000 0xFF23
290 #define CBR_256000 0xFF27
292 #define NOPARITY 0
293 #define ODDPARITY 1
294 #define EVENPARITY 2
295 #define MARKPARITY 3
296 #define SPACEPARITY 4
297 #define ONESTOPBIT 0
298 #define ONE5STOPBITS 1
299 #define TWOSTOPBITS 2
301 #define IGNORE 0
302 #define INFINITE 0xFFFFFFFF
304 #define CE_RXOVER 0x0001
305 #define CE_OVERRUN 0x0002
306 #define CE_RXPARITY 0x0004
307 #define CE_FRAME 0x0008
308 #define CE_BREAK 0x0010
309 #define CE_CTSTO 0x0020
310 #define CE_DSRTO 0x0040
311 #define CE_RLSDTO 0x0080
312 #define CE_TXFULL 0x0100
313 #define CE_PTO 0x0200
314 #define CE_IOE 0x0400
315 #define CE_DNS 0x0800
316 #define CE_OOP 0x1000
317 #define CE_MODE 0x8000
319 #define IE_BADID -1
320 #define IE_OPEN -2
321 #define IE_NOPEN -3
322 #define IE_MEMORY -4
323 #define IE_DEFAULT -5
324 #define IE_HARDWARE -10
325 #define IE_BYTESIZE -11
326 #define IE_BAUDRATE -12
328 #define EV_RXCHAR 0x0001
329 #define EV_RXFLAG 0x0002
330 #define EV_TXEMPTY 0x0004
331 #define EV_CTS 0x0008
332 #define EV_DSR 0x0010
333 #define EV_RLSD 0x0020
334 #define EV_BREAK 0x0040
335 #define EV_ERR 0x0080
336 #define EV_RING 0x0100
337 #define EV_PERR 0x0200
338 #define EV_CTSS 0x0400
339 #define EV_DSRS 0x0800
340 #define EV_RLSDS 0x1000
341 #define EV_RINGTE 0x2000
342 #define EV_RingTe EV_RINGTE
344 #define SETXOFF 1
345 #define SETXON 2
346 #define SETRTS 3
347 #define CLRRTS 4
348 #define SETDTR 5
349 #define CLRDTR 6
350 #define RESETDEV 7
351 #define SETBREAK 8
352 #define CLRBREAK 9
354 #define GETBASEIRQ 10
356 /* Purge functions for Comm Port */
357 #define PURGE_TXABORT 0x0001 /* Kill the pending/current writes to the
358 comm port */
359 #define PURGE_RXABORT 0x0002 /*Kill the pending/current reads to
360 the comm port */
361 #define PURGE_TXCLEAR 0x0004 /* Kill the transmit queue if there*/
362 #define PURGE_RXCLEAR 0x0008 /* Kill the typeahead buffer if there*/
365 /* Modem Status Flags */
366 #define MS_CTS_ON ((DWORD)0x0010)
367 #define MS_DSR_ON ((DWORD)0x0020)
368 #define MS_RING_ON ((DWORD)0x0040)
369 #define MS_RLSD_ON ((DWORD)0x0080)
371 #define RTS_CONTROL_DISABLE 0
372 #define RTS_CONTROL_ENABLE 1
373 #define RTS_CONTROL_HANDSHAKE 2
374 #define RTS_CONTROL_TOGGLE 3
376 #define DTR_CONTROL_DISABLE 0
377 #define DTR_CONTROL_ENABLE 1
378 #define DTR_CONTROL_HANDSHAKE 2
380 #define CSTF_CTSHOLD 0x01
381 #define CSTF_DSRHOLD 0x02
382 #define CSTF_RLSDHOLD 0x04
383 #define CSTF_XOFFHOLD 0x08
384 #define CSTF_XOFFSENT 0x10
385 #define CSTF_EOF 0x20
386 #define CSTF_TXIM 0x40
388 #define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
389 #define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
390 #define MAKEINTRESOURCE WINELIB_NAME_AW(MAKEINTRESOURCE)
392 /* Predefined resource types */
393 #define RT_CURSORA MAKEINTRESOURCEA(1)
394 #define RT_CURSORW MAKEINTRESOURCEW(1)
395 #define RT_CURSOR WINELIB_NAME_AW(RT_CURSOR)
396 #define RT_BITMAPA MAKEINTRESOURCEA(2)
397 #define RT_BITMAPW MAKEINTRESOURCEW(2)
398 #define RT_BITMAP WINELIB_NAME_AW(RT_BITMAP)
399 #define RT_ICONA MAKEINTRESOURCEA(3)
400 #define RT_ICONW MAKEINTRESOURCEW(3)
401 #define RT_ICON WINELIB_NAME_AW(RT_ICON)
402 #define RT_MENUA MAKEINTRESOURCEA(4)
403 #define RT_MENUW MAKEINTRESOURCEW(4)
404 #define RT_MENU WINELIB_NAME_AW(RT_MENU)
405 #define RT_DIALOGA MAKEINTRESOURCEA(5)
406 #define RT_DIALOGW MAKEINTRESOURCEW(5)
407 #define RT_DIALOG WINELIB_NAME_AW(RT_DIALOG)
408 #define RT_STRINGA MAKEINTRESOURCEA(6)
409 #define RT_STRINGW MAKEINTRESOURCEW(6)
410 #define RT_STRING WINELIB_NAME_AW(RT_STRING)
411 #define RT_FONTDIRA MAKEINTRESOURCEA(7)
412 #define RT_FONTDIRW MAKEINTRESOURCEW(7)
413 #define RT_FONTDIR WINELIB_NAME_AW(RT_FONTDIR)
414 #define RT_FONTA MAKEINTRESOURCEA(8)
415 #define RT_FONTW MAKEINTRESOURCEW(8)
416 #define RT_FONT WINELIB_NAME_AW(RT_FONT)
417 #define RT_ACCELERATORA MAKEINTRESOURCEA(9)
418 #define RT_ACCELERATORW MAKEINTRESOURCEW(9)
419 #define RT_ACCELERATOR WINELIB_NAME_AW(RT_ACCELERATOR)
420 #define RT_RCDATAA MAKEINTRESOURCEA(10)
421 #define RT_RCDATAW MAKEINTRESOURCEW(10)
422 #define RT_RCDATA WINELIB_NAME_AW(RT_RCDATA)
423 #define RT_MESSAGELISTA MAKEINTRESOURCEA(11)
424 #define RT_MESSAGELISTW MAKEINTRESOURCEW(11)
425 #define RT_MESSAGELIST WINELIB_NAME_AW(RT_MESSAGELIST)
426 #define RT_GROUP_CURSORA MAKEINTRESOURCEA(12)
427 #define RT_GROUP_CURSORW MAKEINTRESOURCEW(12)
428 #define RT_GROUP_CURSOR WINELIB_NAME_AW(RT_GROUP_CURSOR)
429 #define RT_GROUP_ICONA MAKEINTRESOURCEA(14)
430 #define RT_GROUP_ICONW MAKEINTRESOURCEW(14)
431 #define RT_GROUP_ICON WINELIB_NAME_AW(RT_GROUP_ICON)
434 #define LMEM_FIXED 0
435 #define LMEM_MOVEABLE 0x0002
436 #define LMEM_NOCOMPACT 0x0010
437 #define LMEM_NODISCARD 0x0020
438 #define LMEM_ZEROINIT 0x0040
439 #define LMEM_MODIFY 0x0080
440 #define LMEM_DISCARDABLE 0x0F00
441 #define LMEM_DISCARDED 0x4000
442 #define LMEM_LOCKCOUNT 0x00FF
444 #define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
445 #define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
447 #define NONZEROLHND (LMEM_MOVEABLE)
448 #define NONZEROLPTR (LMEM_FIXED)
450 #define GMEM_FIXED 0x0000
451 #define GMEM_MOVEABLE 0x0002
452 #define GMEM_NOCOMPACT 0x0010
453 #define GMEM_NODISCARD 0x0020
454 #define GMEM_ZEROINIT 0x0040
455 #define GMEM_MODIFY 0x0080
456 #define GMEM_DISCARDABLE 0x0100
457 #define GMEM_NOT_BANKED 0x1000
458 #define GMEM_SHARE 0x2000
459 #define GMEM_DDESHARE 0x2000
460 #define GMEM_NOTIFY 0x4000
461 #define GMEM_LOWER GMEM_NOT_BANKED
462 #define GMEM_DISCARDED 0x4000
463 #define GMEM_LOCKCOUNT 0x00ff
464 #define GMEM_INVALID_HANDLE 0x8000
466 #define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
467 #define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
470 typedef struct tagMEMORYSTATUS
472 DWORD dwLength;
473 DWORD dwMemoryLoad;
474 DWORD dwTotalPhys;
475 DWORD dwAvailPhys;
476 DWORD dwTotalPageFile;
477 DWORD dwAvailPageFile;
478 DWORD dwTotalVirtual;
479 DWORD dwAvailVirtual;
480 } MEMORYSTATUS, *LPMEMORYSTATUS;
483 #ifndef NOLOGERROR
485 /* LogParamError and LogError values */
487 /* Error modifier bits */
488 #define ERR_WARNING 0x8000
489 #define ERR_PARAM 0x4000
491 #define ERR_SIZE_MASK 0x3000
492 #define ERR_BYTE 0x1000
493 #define ERR_WORD 0x2000
494 #define ERR_DWORD 0x3000
496 /* LogParamError() values */
498 /* Generic parameter values */
499 #define ERR_BAD_VALUE 0x6001
500 #define ERR_BAD_FLAGS 0x6002
501 #define ERR_BAD_INDEX 0x6003
502 #define ERR_BAD_DVALUE 0x7004
503 #define ERR_BAD_DFLAGS 0x7005
504 #define ERR_BAD_DINDEX 0x7006
505 #define ERR_BAD_PTR 0x7007
506 #define ERR_BAD_FUNC_PTR 0x7008
507 #define ERR_BAD_SELECTOR 0x6009
508 #define ERR_BAD_STRING_PTR 0x700a
509 #define ERR_BAD_HANDLE 0x600b
511 /* KERNEL parameter errors */
512 #define ERR_BAD_HINSTANCE 0x6020
513 #define ERR_BAD_HMODULE 0x6021
514 #define ERR_BAD_GLOBAL_HANDLE 0x6022
515 #define ERR_BAD_LOCAL_HANDLE 0x6023
516 #define ERR_BAD_ATOM 0x6024
517 #define ERR_BAD_HFILE 0x6025
519 /* USER parameter errors */
520 #define ERR_BAD_HWND 0x6040
521 #define ERR_BAD_HMENU 0x6041
522 #define ERR_BAD_HCURSOR 0x6042
523 #define ERR_BAD_HICON 0x6043
524 #define ERR_BAD_HDWP 0x6044
525 #define ERR_BAD_CID 0x6045
526 #define ERR_BAD_HDRVR 0x6046
528 /* GDI parameter errors */
529 #define ERR_BAD_COORDS 0x7060
530 #define ERR_BAD_GDI_OBJECT 0x6061
531 #define ERR_BAD_HDC 0x6062
532 #define ERR_BAD_HPEN 0x6063
533 #define ERR_BAD_HFONT 0x6064
534 #define ERR_BAD_HBRUSH 0x6065
535 #define ERR_BAD_HBITMAP 0x6066
536 #define ERR_BAD_HRGN 0x6067
537 #define ERR_BAD_HPALETTE 0x6068
538 #define ERR_BAD_HMETAFILE 0x6069
541 /* LogError() values */
543 /* KERNEL errors */
544 #define ERR_GALLOC 0x0001
545 #define ERR_GREALLOC 0x0002
546 #define ERR_GLOCK 0x0003
547 #define ERR_LALLOC 0x0004
548 #define ERR_LREALLOC 0x0005
549 #define ERR_LLOCK 0x0006
550 #define ERR_ALLOCRES 0x0007
551 #define ERR_LOCKRES 0x0008
552 #define ERR_LOADMODULE 0x0009
554 /* USER errors */
555 #define ERR_CREATEDLG 0x0040
556 #define ERR_CREATEDLG2 0x0041
557 #define ERR_REGISTERCLASS 0x0042
558 #define ERR_DCBUSY 0x0043
559 #define ERR_CREATEWND 0x0044
560 #define ERR_STRUCEXTRA 0x0045
561 #define ERR_LOADSTR 0x0046
562 #define ERR_LOADMENU 0x0047
563 #define ERR_NESTEDBEGINPAINT 0x0048
564 #define ERR_BADINDEX 0x0049
565 #define ERR_CREATEMENU 0x004a
567 /* GDI errors */
568 #define ERR_CREATEDC 0x0080
569 #define ERR_CREATEMETA 0x0081
570 #define ERR_DELOBJSELECTED 0x0082
571 #define ERR_SELBITMAP 0x0083
575 /* Debugging support (DEBUG SYSTEM ONLY) */
576 typedef struct
578 WORD flags;
579 DWORD dwOptions WINE_PACKED;
580 DWORD dwFilter WINE_PACKED;
581 CHAR achAllocModule[8] WINE_PACKED;
582 DWORD dwAllocBreak WINE_PACKED;
583 DWORD dwAllocCount WINE_PACKED;
584 } WINDEBUGINFO, *LPWINDEBUGINFO;
586 /* WINDEBUGINFO flags values */
587 #define WDI_OPTIONS 0x0001
588 #define WDI_FILTER 0x0002
589 #define WDI_ALLOCBREAK 0x0004
591 /* dwOptions values */
592 #define DBO_CHECKHEAP 0x0001
593 #define DBO_BUFFERFILL 0x0004
594 #define DBO_DISABLEGPTRAPPING 0x0010
595 #define DBO_CHECKFREE 0x0020
597 #define DBO_SILENT 0x8000
599 #define DBO_TRACEBREAK 0x2000
600 #define DBO_WARNINGBREAK 0x1000
601 #define DBO_NOERRORBREAK 0x0800
602 #define DBO_NOFATALBREAK 0x0400
603 #define DBO_INT3BREAK 0x0100
605 /* DebugOutput flags values */
606 #define DBF_TRACE 0x0000
607 #define DBF_WARNING 0x4000
608 #define DBF_ERROR 0x8000
609 #define DBF_FATAL 0xc000
611 /* dwFilter values */
612 #define DBF_KERNEL 0x1000
613 #define DBF_KRN_MEMMAN 0x0001
614 #define DBF_KRN_LOADMODULE 0x0002
615 #define DBF_KRN_SEGMENTLOAD 0x0004
616 #define DBF_USER 0x0800
617 #define DBF_GDI 0x0400
618 #define DBF_MMSYSTEM 0x0040
619 #define DBF_PENWIN 0x0020
620 #define DBF_APPLICATION 0x0008
621 #define DBF_DRIVER 0x0010
623 #endif /* NOLOGERROR */
625 typedef struct {
626 WORD wYear;
627 WORD wMonth;
628 WORD wDayOfWeek;
629 WORD wDay;
630 WORD wHour;
631 WORD wMinute;
632 WORD wSecond;
633 WORD wMilliseconds;
634 } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
636 /* The 'overlapped' data structure used by async I/O functions.
638 typedef struct {
639 DWORD Internal;
640 DWORD InternalHigh;
641 DWORD Offset;
642 DWORD OffsetHigh;
643 HANDLE hEvent;
644 } OVERLAPPED, *LPOVERLAPPED;
646 typedef VOID CALLBACK (*LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped);
648 /* Process startup information.
651 /* STARTUPINFO.dwFlags */
652 #define STARTF_USESHOWWINDOW 0x00000001
653 #define STARTF_USESIZE 0x00000002
654 #define STARTF_USEPOSITION 0x00000004
655 #define STARTF_USECOUNTCHARS 0x00000008
656 #define STARTF_USEFILLATTRIBUTE 0x00000010
657 #define STARTF_RUNFULLSCREEN 0x00000020
658 #define STARTF_FORCEONFEEDBACK 0x00000040
659 #define STARTF_FORCEOFFFEEDBACK 0x00000080
660 #define STARTF_USESTDHANDLES 0x00000100
661 #define STARTF_USEHOTKEY 0x00000200
663 typedef struct {
664 DWORD cb; /* 00: size of struct */
665 LPSTR lpReserved; /* 04: */
666 LPSTR lpDesktop; /* 08: */
667 LPSTR lpTitle; /* 0c: */
668 DWORD dwX; /* 10: */
669 DWORD dwY; /* 14: */
670 DWORD dwXSize; /* 18: */
671 DWORD dwYSize; /* 1c: */
672 DWORD dwXCountChars; /* 20: */
673 DWORD dwYCountChars; /* 24: */
674 DWORD dwFillAttribute; /* 28: */
675 DWORD dwFlags; /* 2c: */
676 WORD wShowWindow; /* 30: */
677 WORD cbReserved2; /* 32: */
678 BYTE *lpReserved2; /* 34: */
679 HANDLE hStdInput; /* 38: */
680 HANDLE hStdOutput; /* 3c: */
681 HANDLE hStdError; /* 40: */
682 } STARTUPINFOA, *LPSTARTUPINFOA;
684 typedef struct {
685 DWORD cb;
686 LPWSTR lpReserved;
687 LPWSTR lpDesktop;
688 LPWSTR lpTitle;
689 DWORD dwX;
690 DWORD dwY;
691 DWORD dwXSize;
692 DWORD dwYSize;
693 DWORD dwXCountChars;
694 DWORD dwYCountChars;
695 DWORD dwFillAttribute;
696 DWORD dwFlags;
697 WORD wShowWindow;
698 WORD cbReserved2;
699 BYTE *lpReserved2;
700 HANDLE hStdInput;
701 HANDLE hStdOutput;
702 HANDLE hStdError;
703 } STARTUPINFOW, *LPSTARTUPINFOW;
705 DECL_WINELIB_TYPE_AW(STARTUPINFO)
706 DECL_WINELIB_TYPE_AW(LPSTARTUPINFO)
708 typedef struct {
709 HANDLE hProcess;
710 HANDLE hThread;
711 DWORD dwProcessId;
712 DWORD dwThreadId;
713 } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
715 typedef struct {
716 LONG Bias;
717 WCHAR StandardName[32];
718 SYSTEMTIME StandardDate;
719 LONG StandardBias;
720 WCHAR DaylightName[32];
721 SYSTEMTIME DaylightDate;
722 LONG DaylightBias;
723 } TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
725 #define TIME_ZONE_ID_INVALID ((DWORD)0xFFFFFFFF)
726 #define TIME_ZONE_ID_UNKNOWN 0
727 #define TIME_ZONE_ID_STANDARD 1
728 #define TIME_ZONE_ID_DAYLIGHT 2
730 /* CreateProcess: dwCreationFlag values
732 #define DEBUG_PROCESS 0x00000001
733 #define DEBUG_ONLY_THIS_PROCESS 0x00000002
734 #define CREATE_SUSPENDED 0x00000004
735 #define DETACHED_PROCESS 0x00000008
736 #define CREATE_NEW_CONSOLE 0x00000010
737 #define NORMAL_PRIORITY_CLASS 0x00000020
738 #define IDLE_PRIORITY_CLASS 0x00000040
739 #define HIGH_PRIORITY_CLASS 0x00000080
740 #define REALTIME_PRIORITY_CLASS 0x00000100
741 #define CREATE_NEW_PROCESS_GROUP 0x00000200
742 #define CREATE_UNICODE_ENVIRONMENT 0x00000400
743 #define CREATE_SEPARATE_WOW_VDM 0x00000800
744 #define CREATE_SHARED_WOW_VDM 0x00001000
745 #define CREATE_DEFAULT_ERROR_MODE 0x04000000
746 #define CREATE_NO_WINDOW 0x08000000
747 #define PROFILE_USER 0x10000000
748 #define PROFILE_KERNEL 0x20000000
749 #define PROFILE_SERVER 0x40000000
752 /* File object type definitions
754 #define FILE_TYPE_UNKNOWN 0
755 #define FILE_TYPE_DISK 1
756 #define FILE_TYPE_CHAR 2
757 #define FILE_TYPE_PIPE 3
758 #define FILE_TYPE_REMOTE 32768
760 /* File creation flags
762 #define FILE_FLAG_WRITE_THROUGH 0x80000000UL
763 #define FILE_FLAG_OVERLAPPED 0x40000000L
764 #define FILE_FLAG_NO_BUFFERING 0x20000000L
765 #define FILE_FLAG_RANDOM_ACCESS 0x10000000L
766 #define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000L
767 #define FILE_FLAG_DELETE_ON_CLOSE 0x04000000L
768 #define FILE_FLAG_BACKUP_SEMANTICS 0x02000000L
769 #define FILE_FLAG_POSIX_SEMANTICS 0x01000000L
770 #define CREATE_NEW 1
771 #define CREATE_ALWAYS 2
772 #define OPEN_EXISTING 3
773 #define OPEN_ALWAYS 4
774 #define TRUNCATE_EXISTING 5
776 /* Standard handle identifiers
778 #define STD_INPUT_HANDLE ((DWORD) -10)
779 #define STD_OUTPUT_HANDLE ((DWORD) -11)
780 #define STD_ERROR_HANDLE ((DWORD) -12)
782 typedef struct
784 int dwFileAttributes;
785 FILETIME ftCreationTime;
786 FILETIME ftLastAccessTime;
787 FILETIME ftLastWriteTime;
788 int dwVolumeSerialNumber;
789 int nFileSizeHigh;
790 int nFileSizeLow;
791 int nNumberOfLinks;
792 int nFileIndexHigh;
793 int nFileIndexLow;
794 } BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION ;
797 typedef struct _SYSTEM_POWER_STATUS
799 BYTE ACLineStatus;
800 BYTE BatteryFlag;
801 BYTE BatteryLifePercent;
802 BYTE reserved;
803 DWORD BatteryLifeTime;
804 DWORD BatteryFullLifeTime;
805 } SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;
808 typedef struct tagSYSTEM_INFO
810 union {
811 DWORD dwOemId; /* Obsolete field - do not use */
812 struct {
813 WORD wProcessorArchitecture;
814 WORD wReserved;
815 } DUMMYSTRUCTNAME;
816 } DUMMYUNIONNAME;
817 DWORD dwPageSize;
818 LPVOID lpMinimumApplicationAddress;
819 LPVOID lpMaximumApplicationAddress;
820 DWORD dwActiveProcessorMask;
821 DWORD dwNumberOfProcessors;
822 DWORD dwProcessorType;
823 DWORD dwAllocationGranularity;
824 WORD wProcessorLevel;
825 WORD wProcessorRevision;
826 } SYSTEM_INFO, *LPSYSTEM_INFO;
828 typedef BOOL CALLBACK (*ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG);
829 typedef BOOL CALLBACK (*ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG);
830 typedef BOOL CALLBACK (*ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG);
831 typedef BOOL CALLBACK (*ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG);
832 typedef BOOL CALLBACK (*ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG);
833 typedef BOOL CALLBACK (*ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG);
835 DECL_WINELIB_TYPE_AW(ENUMRESTYPEPROC)
836 DECL_WINELIB_TYPE_AW(ENUMRESNAMEPROC)
837 DECL_WINELIB_TYPE_AW(ENUMRESLANGPROC)
839 /* flags that can be passed to LoadLibraryEx */
840 #define DONT_RESOLVE_DLL_REFERENCES 0x00000001
841 #define LOAD_LIBRARY_AS_DATAFILE 0x00000002
842 #define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
844 /* ifdef _x86_ ... */
845 typedef struct _LDT_ENTRY {
846 WORD LimitLow;
847 WORD BaseLow;
848 union {
849 struct {
850 BYTE BaseMid;
851 BYTE Flags1;/*Declare as bytes to avoid alignment problems */
852 BYTE Flags2;
853 BYTE BaseHi;
854 } Bytes;
855 struct {
856 unsigned BaseMid : 8;
857 unsigned Type : 5;
858 unsigned Dpl : 2;
859 unsigned Pres : 1;
860 unsigned LimitHi : 4;
861 unsigned Sys : 1;
862 unsigned Reserved_0 : 1;
863 unsigned Default_Big : 1;
864 unsigned Granularity : 1;
865 unsigned BaseHi : 8;
866 } Bits;
867 } HighWord;
868 } LDT_ENTRY, *LPLDT_ENTRY;
871 typedef enum _GET_FILEEX_INFO_LEVELS {
872 GetFileExInfoStandard
873 } GET_FILEEX_INFO_LEVELS;
875 typedef struct _WIN32_FILE_ATTRIBUTES_DATA {
876 DWORD dwFileAttributes;
877 FILETIME ftCreationTime;
878 FILETIME ftLastAccessTime;
879 FILETIME ftLastWriteTime;
880 DWORD nFileSizeHigh;
881 DWORD nFileSizeLow;
882 } WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;
885 * This one seems to be a Win32 only definition. It also is defined with
886 * WINAPI instead of CALLBACK in the windows headers.
888 typedef DWORD CALLBACK (*LPPROGRESS_ROUTINE)(LARGE_INTEGER, LARGE_INTEGER, LARGE_INTEGER,
889 LARGE_INTEGER, DWORD, DWORD, HANDLE,
890 HANDLE, LPVOID);
893 #define WAIT_FAILED 0xffffffff
894 #define WAIT_OBJECT_0 0
895 #define WAIT_ABANDONED STATUS_ABANDONED_WAIT_0
896 #define WAIT_ABANDONED_0 STATUS_ABANDONED_WAIT_0
897 #define WAIT_IO_COMPLETION STATUS_USER_APC
898 #define WAIT_TIMEOUT STATUS_TIMEOUT
899 #define STILL_ACTIVE STATUS_PENDING
901 #define FILE_BEGIN 0
902 #define FILE_CURRENT 1
903 #define FILE_END 2
905 #define FILE_MAP_COPY 0x00000001
906 #define FILE_MAP_WRITE 0x00000002
907 #define FILE_MAP_READ 0x00000004
908 #define FILE_MAP_ALL_ACCESS 0x000f001f
910 #define MOVEFILE_REPLACE_EXISTING 0x00000001
911 #define MOVEFILE_COPY_ALLOWED 0x00000002
912 #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
914 #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
915 #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
916 #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
917 #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
918 #define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED
919 #define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION
921 #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
922 #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
923 #define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
924 #define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
925 #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
926 #define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
927 #define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
928 #define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
929 #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
930 #define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
931 #define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
932 #define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
933 #define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
934 #define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
935 #define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
936 #define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
937 #define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
938 #define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
939 #define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
940 #define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
941 #define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
942 #define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
943 #define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
945 /* Wine extension; Windows doesn't have a name for this code */
946 #define EXCEPTION_CRITICAL_SECTION_WAIT 0xc0000194
948 #define DUPLICATE_CLOSE_SOURCE 0x00000001
949 #define DUPLICATE_SAME_ACCESS 0x00000002
951 #define HANDLE_FLAG_INHERIT 0x00000001
952 #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002
954 #define HINSTANCE_ERROR 32
956 #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
957 #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
958 #define THREAD_PRIORITY_NORMAL 0
959 #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
960 #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
961 #define THREAD_PRIORITY_ERROR_RETURN (0x7fffffff)
962 #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
963 #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
965 /* flags to FormatMessage */
966 #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
967 #define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200
968 #define FORMAT_MESSAGE_FROM_STRING 0x00000400
969 #define FORMAT_MESSAGE_FROM_HMODULE 0x00000800
970 #define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000
971 #define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000
972 #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF
974 #ifdef __WINE__
975 #define CRITICAL_SECTION_INIT { 0, -1, 0, 0, 0, 0 }
976 #endif
978 typedef struct {
979 DWORD dwOSVersionInfoSize;
980 DWORD dwMajorVersion;
981 DWORD dwMinorVersion;
982 DWORD dwBuildNumber;
983 DWORD dwPlatformId;
984 CHAR szCSDVersion[128];
985 } OSVERSIONINFOA, *POSVERSIONINFOA, *LPOSVERSIONINFOA;
987 typedef struct {
988 DWORD dwOSVersionInfoSize;
989 DWORD dwMajorVersion;
990 DWORD dwMinorVersion;
991 DWORD dwBuildNumber;
992 DWORD dwPlatformId;
993 WCHAR szCSDVersion[128];
994 } OSVERSIONINFOW, *POSVERSIONINFOW, *LPOSVERSIONINFOW;
996 DECL_WINELIB_TYPE_AW(OSVERSIONINFO)
997 DECL_WINELIB_TYPE_AW(POSVERSIONINFO)
998 DECL_WINELIB_TYPE_AW(LPOSVERSIONINFO)
1000 #define VER_PLATFORM_WIN32s 0
1001 #define VER_PLATFORM_WIN32_WINDOWS 1
1002 #define VER_PLATFORM_WIN32_NT 2
1004 typedef struct tagCOMSTAT
1006 DWORD status;
1007 DWORD cbInQue;
1008 DWORD cbOutQue;
1009 } COMSTAT,*LPCOMSTAT;
1011 typedef struct tagDCB
1013 DWORD DCBlength;
1014 DWORD BaudRate;
1015 unsigned fBinary :1;
1016 unsigned fParity :1;
1017 unsigned fOutxCtsFlow :1;
1018 unsigned fOutxDsrFlow :1;
1019 unsigned fDtrControl :2;
1020 unsigned fDsrSensitivity :1;
1021 unsigned fTXContinueOnXoff :1;
1022 unsigned fOutX :1;
1023 unsigned fInX :1;
1024 unsigned fErrorChar :1;
1025 unsigned fNull :1;
1026 unsigned fRtsControl :2;
1027 unsigned fAbortOnError :1;
1028 unsigned fDummy2 :17;
1029 WORD wReserved;
1030 WORD XonLim;
1031 WORD XoffLim;
1032 BYTE ByteSize;
1033 BYTE Parity;
1034 BYTE StopBits;
1035 char XonChar;
1036 char XoffChar;
1037 char ErrorChar;
1038 char EofChar;
1039 char EvtChar;
1040 } DCB, *LPDCB;
1042 typedef struct tagCOMMCONFIG {
1043 DWORD dwSize;
1044 WORD wVersion;
1045 WORD wReserved;
1046 DCB dcb;
1047 DWORD dwProviderSubType;
1048 DWORD dwProviderOffset;
1049 DWORD dwProviderSize;
1050 DWORD wcProviderData[1];
1051 } COMMCONFIG, *LPCOMMCONFIG;
1053 typedef struct tagCOMMPROP {
1054 WORD wPacketLength;
1055 WORD wPacketVersion;
1056 DWORD dwServiceMask;
1057 DWORD dwReserved1;
1058 DWORD dwMaxTxQueue;
1059 DWORD dwMaxRxQueue;
1060 DWORD dwMaxBaud;
1061 DWORD dwProvSubType;
1062 DWORD dwProvCapabilities;
1063 DWORD dwSettableParams;
1064 DWORD dwSettableBaud;
1065 WORD wSettableData;
1066 WORD wSettableStopParity;
1067 DWORD dwCurrentTxQueue;
1068 DWORD dwCurrentRxQueue;
1069 DWORD dwProvSpec1;
1070 DWORD dwProvSpec2;
1071 WCHAR wcProvChar[1];
1072 } COMMPROP, *LPCOMMPROP;
1074 #define SP_SERIALCOMM ((DWORD)1)
1076 #define BAUD_075 ((DWORD)0x01)
1077 #define BAUD_110 ((DWORD)0x02)
1078 #define BAUD_134_5 ((DWORD)0x04)
1079 #define BAUD_150 ((DWORD)0x08)
1080 #define BAUD_300 ((DWORD)0x10)
1081 #define BAUD_600 ((DWORD)0x20)
1082 #define BAUD_1200 ((DWORD)0x40)
1083 #define BAUD_1800 ((DWORD)0x80)
1084 #define BAUD_2400 ((DWORD)0x100)
1085 #define BAUD_4800 ((DWORD)0x200)
1086 #define BAUD_7200 ((DWORD)0x400)
1087 #define BAUD_9600 ((DWORD)0x800)
1088 #define BAUD_14400 ((DWORD)0x1000)
1089 #define BAUD_19200 ((DWORD)0x2000)
1090 #define BAUD_38400 ((DWORD)0x4000)
1091 #define BAUD_56K ((DWORD)0x8000)
1092 #define BAUD_57600 ((DWORD)0x40000)
1093 #define BAUD_115200 ((DWORD)0x20000)
1094 #define BAUD_128K ((DWORD)0x10000)
1095 #define BAUD_USER ((DWORD)0x10000000)
1097 #define PST_FAX ((DWORD)0x21)
1098 #define PST_LAT ((DWORD)0x101)
1099 #define PST_MODEM ((DWORD)0x06)
1100 #define PST_NETWORK_BRIDGE ((DWORD)0x100)
1101 #define PST_PARALLEL_PORT ((DWORD)0x02)
1102 #define PST_RS232 ((DWORD)0x01)
1103 #define PST_RS442 ((DWORD)0x03)
1104 #define PST_RS423 ((DWORD)0x04)
1105 #define PST_RS449 ((DWORD)0x06)
1106 #define PST_SCANNER ((DWORD)0x22)
1107 #define PST_TCPIP_TELNET ((DWORD)0x102)
1108 #define PST_UNSPECIFIED ((DWORD)0x00)
1109 #define PST_X25 ((DWORD)0x103)
1111 #define PCF_16BITMODE ((DWORD)0x200)
1112 #define PCF_DTRDSR ((DWORD)0x01)
1113 #define PCF_INTTIMEOUTS ((DWORD)0x80)
1114 #define PCF_PARITY_CHECK ((DWORD)0x08)
1115 #define PCF_RLSD ((DWORD)0x04)
1116 #define PCF_RTSCTS ((DWORD)0x02)
1117 #define PCF_SETXCHAR ((DWORD)0x20)
1118 #define PCF_SPECIALCHARS ((DWORD)0x100)
1119 #define PCF_TOTALTIMEOUTS ((DWORD)0x40)
1120 #define PCF_XONXOFF ((DWORD)0x10)
1122 #define SP_BAUD ((DWORD)0x02)
1123 #define SP_DATABITS ((DWORD)0x04)
1124 #define SP_HANDSHAKING ((DWORD)0x10)
1125 #define SP_PARITY ((DWORD)0x01)
1126 #define SP_PARITY_CHECK ((DWORD)0x20)
1127 #define SP_RLSD ((DWORD)0x40)
1128 #define SP_STOPBITS ((DWORD)0x08)
1130 #define DATABITS_5 ((DWORD)0x01)
1131 #define DATABITS_6 ((DWORD)0x02)
1132 #define DATABITS_7 ((DWORD)0x04)
1133 #define DATABITS_8 ((DWORD)0x08)
1134 #define DATABITS_16 ((DWORD)0x10)
1135 #define DATABITS_16X ((DWORD)0x20)
1137 #define STOPBITS_10 ((DWORD)1)
1138 #define STOPBITS_15 ((DWORD)2)
1139 #define STOPBITS_20 ((DWORD)4)
1141 #define PARITY_NONE ((DWORD)0x100)
1142 #define PARITY_ODD ((DWORD)0x200)
1143 #define PARITY_EVEN ((DWORD)0x400)
1144 #define PARITY_MARK ((DWORD)0x800)
1145 #define PARITY_SPACE ((DWORD)0x1000)
1147 typedef struct tagCOMMTIMEOUTS {
1148 DWORD ReadIntervalTimeout;
1149 DWORD ReadTotalTimeoutMultiplier;
1150 DWORD ReadTotalTimeoutConstant;
1151 DWORD WriteTotalTimeoutMultiplier;
1152 DWORD WriteTotalTimeoutConstant;
1153 } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
1156 #include "poppack.h"
1158 typedef void CALLBACK (*PAPCFUNC)(ULONG_PTR);
1159 typedef void CALLBACK (*PTIMERAPCROUTINE)(LPVOID,DWORD,DWORD);
1161 /*DWORD WINAPI GetVersion( void );*/
1162 BOOL WINAPI GetVersionExA(OSVERSIONINFOA*);
1163 BOOL WINAPI GetVersionExW(OSVERSIONINFOW*);
1164 #define GetVersionEx WINELIB_NAME_AW(GetVersionEx)
1166 /*int WinMain(HINSTANCE, HINSTANCE prev, char *cmd, int show);*/
1168 LONG WINAPI RtlEnterCriticalSection( CRITICAL_SECTION *crit );
1169 LONG WINAPI RtlLeaveCriticalSection( CRITICAL_SECTION *crit );
1170 LONG WINAPI RtlDeleteCriticalSection( CRITICAL_SECTION *crit );
1171 BOOL WINAPI RtlTryEnterCriticalSection( CRITICAL_SECTION *crit );
1172 /* FIXME: need to use defines because we don't have proper imports yet */
1173 #define EnterCriticalSection(crit) RtlEnterCriticalSection(crit)
1174 #define LeaveCriticalSection(crit) RtlLeaveCriticalSection(crit)
1175 #define DeleteCriticalSection(crit) RtlDeleteCriticalSection(crit)
1176 #define TryEnterCriticalSection(crit) RtlTryEnterCriticalSection(crit)
1177 #if 0
1178 void WINAPI DeleteCriticalSection(CRITICAL_SECTION *lpCrit);
1179 void WINAPI EnterCriticalSection(CRITICAL_SECTION *lpCrit);
1180 BOOL WINAPI TryEnterCriticalSection(CRITICAL_SECTION *lpCrit);
1181 void WINAPI LeaveCriticalSection(CRITICAL_SECTION *lpCrit);
1182 #endif
1184 void WINAPI InitializeCriticalSection(CRITICAL_SECTION *lpCrit);
1185 BOOL WINAPI InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION *,DWORD);
1186 void WINAPI MakeCriticalSectionGlobal(CRITICAL_SECTION *lpCrit);
1187 BOOL WINAPI GetProcessWorkingSetSize(HANDLE,LPDWORD,LPDWORD);
1188 DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,ULONG_PTR);
1189 void WINAPI RaiseException(DWORD,DWORD,DWORD,const LPDWORD);
1190 BOOL WINAPI SetProcessWorkingSetSize(HANDLE,DWORD,DWORD);
1191 BOOL WINAPI TerminateProcess(HANDLE,DWORD);
1192 BOOL WINAPI TerminateThread(HANDLE,DWORD);
1193 BOOL WINAPI GetExitCodeThread(HANDLE,LPDWORD);
1195 /* GetBinaryType return values.
1198 #define SCS_32BIT_BINARY 0
1199 #define SCS_DOS_BINARY 1
1200 #define SCS_WOW_BINARY 2
1201 #define SCS_PIF_BINARY 3
1202 #define SCS_POSIX_BINARY 4
1203 #define SCS_OS216_BINARY 5
1205 BOOL WINAPI GetBinaryTypeA( LPCSTR lpApplicationName, LPDWORD lpBinaryType );
1206 BOOL WINAPI GetBinaryTypeW( LPCWSTR lpApplicationName, LPDWORD lpBinaryType );
1207 #define GetBinaryType WINELIB_NAME_AW(GetBinaryType)
1209 /* Declarations for functions that exist only in Win32 */
1211 BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
1212 BOOL WINAPI AttachThreadInput(DWORD,DWORD,BOOL);
1213 BOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR,HANDLE,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,LPDWORD,LPDWORD,LPBOOL);
1214 BOOL WINAPI AdjustTokenPrivileges(HANDLE,BOOL,LPVOID,DWORD,LPVOID,LPDWORD);
1215 BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
1216 BOOL WINAPI AllocateLocallyUniqueId(PLUID);
1217 BOOL WINAPI AllocConsole(void);
1218 BOOL WINAPI AreFileApisANSI(void);
1219 BOOL WINAPI BackupEventLogA(HANDLE,LPCSTR);
1220 BOOL WINAPI BackupEventLogW(HANDLE,LPCWSTR);
1221 #define BackupEventLog WINELIB_NAME_AW(BackupEventLog)
1222 BOOL WINAPI BackupRead(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
1223 BOOL WINAPI BackupSeek(HANDLE,DWORD,DWORD,LPDWORD,LPDWORD,LPVOID*);
1224 BOOL WINAPI BackupWrite(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
1225 BOOL WINAPI Beep(DWORD,DWORD);
1226 BOOL WINAPI BuildCommDCBA(LPCSTR,LPDCB);
1227 BOOL WINAPI BuildCommDCBW(LPCWSTR,LPDCB);
1228 #define BuildCommDCB WINELIB_NAME_AW(BuildCommDCB)
1229 BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR,LPDCB,LPCOMMTIMEOUTS);
1230 BOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR,LPDCB,LPCOMMTIMEOUTS);
1231 #define BuildCommDCBAndTimeouts WINELIB_NAME_AW(BuildCommDCBAndTimeouts)
1232 BOOL WINAPI CancelWaitableTimer(HANDLE);
1233 BOOL WINAPI ClearCommError(HANDLE,LPDWORD,LPCOMSTAT);
1234 BOOL WINAPI ClearEventLogA(HANDLE,LPCSTR);
1235 BOOL WINAPI ClearEventLogW(HANDLE,LPCWSTR);
1236 #define ClearEventLog WINELIB_NAME_AW(ClearEventLog)
1237 BOOL WINAPI CloseEventLog(HANDLE);
1238 BOOL WINAPI CloseHandle(HANDLE);
1239 BOOL WINAPI CommConfigDialogA(LPCSTR,HANDLE,LPCOMMCONFIG);
1240 BOOL WINAPI CommConfigDialogW(LPCWSTR,HANDLE,LPCOMMCONFIG);
1241 #define CommConfigDialog WINELIB_NAME_AW(CommConfigDialog)
1242 BOOL WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD);
1243 HANDLE WINAPI ConvertToGlobalHandle(HANDLE hSrc);
1244 BOOL WINAPI CopyFileA(LPCSTR,LPCSTR,BOOL);
1245 BOOL WINAPI CopyFileW(LPCWSTR,LPCWSTR,BOOL);
1246 #define CopyFile WINELIB_NAME_AW(CopyFile)
1247 BOOL WINAPI CopyFileExA(LPCSTR, LPCSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
1248 BOOL WINAPI CopyFileExW(LPCWSTR, LPCWSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
1249 #define CopyFileEx WINELIB_NAME_AW(CopyFileEx)
1250 BOOL WINAPI CopySid(DWORD,PSID,PSID);
1251 INT WINAPI CompareFileTime(LPFILETIME,LPFILETIME);
1252 HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCSTR);
1253 HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCWSTR);
1254 #define CreateEvent WINELIB_NAME_AW(CreateEvent)
1255 HANDLE WINAPI CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,
1256 DWORD,DWORD,HANDLE);
1257 HANDLE WINAPI CreateFileW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,
1258 DWORD,DWORD,HANDLE);
1259 #define CreateFile WINELIB_NAME_AW(CreateFile)
1260 HANDLE WINAPI CreateFileMappingA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,
1261 DWORD,DWORD,LPCSTR);
1262 HANDLE WINAPI CreateFileMappingW(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,
1263 DWORD,DWORD,LPCWSTR);
1264 #define CreateFileMapping WINELIB_NAME_AW(CreateFileMapping)
1265 HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
1266 HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
1267 #define CreateMutex WINELIB_NAME_AW(CreateMutex)
1268 BOOL WINAPI CreatePipe(PHANDLE,PHANDLE,LPSECURITY_ATTRIBUTES,DWORD);
1269 BOOL WINAPI CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,
1270 LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCSTR,
1271 LPSTARTUPINFOA,LPPROCESS_INFORMATION);
1272 BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,
1273 LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCWSTR,
1274 LPSTARTUPINFOW,LPPROCESS_INFORMATION);
1275 #define CreateProcess WINELIB_NAME_AW(CreateProcess)
1276 HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR);
1277 HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR);
1278 #define CreateSemaphore WINELIB_NAME_AW(CreateSemaphore)
1279 DWORD WINAPI CreateTapePartition(HANDLE,DWORD,DWORD,DWORD);
1280 HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
1281 HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
1282 HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
1283 #define CreateWaitableTimer WINELIB_NAME_AW(CreateWaitableTimer)
1284 BOOL WINAPI DebugActiveProcess(DWORD);
1285 void WINAPI DebugBreak(void);
1286 BOOL WINAPI DeregisterEventSource(HANDLE);
1287 BOOL WINAPI DisableThreadLibraryCalls(HMODULE);
1288 BOOL WINAPI DosDateTimeToFileTime(WORD,WORD,LPFILETIME);
1289 BOOL WINAPI DuplicateHandle(HANDLE,HANDLE,HANDLE,HANDLE*,DWORD,BOOL,DWORD);
1290 BOOL WINAPI EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,
1291 ENUMRESLANGPROCA,LONG);
1292 BOOL WINAPI EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,
1293 ENUMRESLANGPROCW,LONG);
1294 #define EnumResourceLanguages WINELIB_NAME_AW(EnumResourceLanguages)
1295 BOOL WINAPI EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROCA,
1296 LONG);
1297 BOOL WINAPI EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROCW,
1298 LONG);
1299 #define EnumResourceNames WINELIB_NAME_AW(EnumResourceNames)
1300 BOOL WINAPI EnumResourceTypesA(HMODULE,ENUMRESTYPEPROCA,LONG);
1301 BOOL WINAPI EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG);
1302 #define EnumResourceTypes WINELIB_NAME_AW(EnumResourceTypes)
1303 BOOL WINAPI EqualSid(PSID, PSID);
1304 BOOL WINAPI EqualPrefixSid(PSID,PSID);
1305 DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL);
1306 VOID WINAPI ExitProcess(DWORD) WINE_NORETURN;
1307 VOID WINAPI ExitThread(DWORD) WINE_NORETURN;
1308 DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
1309 DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
1310 #define ExpandEnvironmentStrings WINELIB_NAME_AW(ExpandEnvironmentStrings)
1311 BOOL WINAPI FileTimeToDosDateTime(const FILETIME*,LPWORD,LPWORD);
1312 BOOL WINAPI FileTimeToLocalFileTime(const FILETIME*,LPFILETIME);
1313 BOOL WINAPI FileTimeToSystemTime(const FILETIME*,LPSYSTEMTIME);
1314 HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR,BOOL,DWORD);
1315 HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR,BOOL,DWORD);
1316 #define FindFirstChangeNotification WINELIB_NAME_AW(FindFirstChangeNotification)
1317 BOOL WINAPI FindNextChangeNotification(HANDLE);
1318 BOOL WINAPI FindCloseChangeNotification(HANDLE);
1319 HRSRC WINAPI FindResourceExA(HMODULE,LPCSTR,LPCSTR,WORD);
1320 HRSRC WINAPI FindResourceExW(HMODULE,LPCWSTR,LPCWSTR,WORD);
1321 #define FindResourceEx WINELIB_NAME_AW(FindResourceEx)
1322 BOOL WINAPI FlushConsoleInputBuffer(HANDLE);
1323 BOOL WINAPI FlushFileBuffers(HANDLE);
1324 BOOL WINAPI FlushViewOfFile(LPCVOID, DWORD);
1325 DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
1326 DWORD WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
1327 #define FormatMessage WINELIB_NAME_AW(FormatMessage)
1328 BOOL WINAPI FreeConsole(void);
1329 BOOL WINAPI FreeEnvironmentStringsA(LPSTR);
1330 BOOL WINAPI FreeEnvironmentStringsW(LPWSTR);
1331 #define FreeEnvironmentStrings WINELIB_NAME_AW(FreeEnvironmentStrings)
1332 VOID WINAPI FreeLibraryAndExitThread(HINSTANCE,DWORD);
1333 PVOID WINAPI FreeSid(PSID);
1334 UINT WINAPI GetACP(void);
1335 BOOL WINAPI GetCommConfig(HANDLE,LPCOMMCONFIG);
1336 BOOL WINAPI GetCommMask(HANDLE,LPDWORD);
1337 BOOL WINAPI GetCommModemStatus(HANDLE,LPDWORD);
1338 BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP);
1339 BOOL WINAPI GetCommState(HANDLE,LPDCB);
1340 BOOL WINAPI GetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
1341 LPSTR WINAPI GetCommandLineA(void);
1342 LPWSTR WINAPI GetCommandLineW(void);
1343 #define GetCommandLine WINELIB_NAME_AW(GetCommandLine)
1344 BOOL WINAPI GetComputerNameA(LPSTR,LPDWORD);
1345 BOOL WINAPI GetComputerNameW(LPWSTR,LPDWORD);
1346 #define GetComputerName WINELIB_NAME_AW(GetComputerName)
1347 UINT WINAPI GetConsoleCP(void);
1348 BOOL WINAPI GetConsoleMode(HANDLE,LPDWORD);
1349 UINT WINAPI GetConsoleOutputCP(void);
1350 DWORD WINAPI GetConsoleTitleA(LPSTR,DWORD);
1351 DWORD WINAPI GetConsoleTitleW(LPWSTR,DWORD);
1352 #define GetConsoleTitle WINELIB_NAME_AW(GetConsoleTitle)
1353 HANDLE WINAPI GetCurrentProcess(void);
1354 HANDLE WINAPI GetCurrentThread(void);
1355 INT WINAPI GetDateFormatA(LCID,DWORD,LPSYSTEMTIME,LPCSTR,LPSTR,INT);
1356 INT WINAPI GetDateFormatW(LCID,DWORD,LPSYSTEMTIME,LPCWSTR,LPWSTR,INT);
1357 #define GetDateFormat WINELIB_NAME_AW(GetDateFormat)
1358 BOOL WINAPI GetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,LPDWORD);
1359 BOOL WINAPI GetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,LPDWORD);
1360 #define GetDefaultCommConfig WINELIB_NAME_AW(GetDefaultCommConfig)
1361 LPSTR WINAPI GetEnvironmentStringsA(void);
1362 LPWSTR WINAPI GetEnvironmentStringsW(void);
1363 #define GetEnvironmentStrings WINELIB_NAME_AW(GetEnvironmentStrings)
1364 DWORD WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD);
1365 DWORD WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD);
1366 #define GetEnvironmentVariable WINELIB_NAME_AW(GetEnvironmentVariable)
1367 BOOL WINAPI GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
1368 BOOL WINAPI GetFileAttributesExW(LPCWSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
1369 #define GetFileattributesEx WINELIB_NAME_AW(GetFileAttributesEx)
1370 DWORD WINAPI GetFileInformationByHandle(HANDLE,BY_HANDLE_FILE_INFORMATION*);
1371 BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
1372 BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
1373 #define GetFileSecurity WINELIB_NAME_AW(GetFileSecurity)
1374 DWORD WINAPI GetFileSize(HANDLE,LPDWORD);
1375 BOOL WINAPI GetFileTime(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME);
1376 DWORD WINAPI GetFileType(HANDLE);
1377 DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*);
1378 DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
1379 #define GetFullPathName WINELIB_NAME_AW(GetFullPathName)
1380 BOOL WINAPI GetHandleInformation(HANDLE,LPDWORD);
1381 DWORD WINAPI GetLengthSid(PSID);
1382 VOID WINAPI GetLocalTime(LPSYSTEMTIME);
1383 DWORD WINAPI GetLogicalDrives(void);
1384 DWORD WINAPI GetLongPathNameA(LPCSTR,LPSTR,DWORD);
1385 DWORD WINAPI GetLongPathNameW(LPCWSTR,LPWSTR,DWORD);
1386 #define GetLongPathName WINELIB_NAME_AW(GetLongPathName)
1387 BOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE,LPDWORD);
1388 BOOL WINAPI GetNumberOfConsoleMouseButtons(LPDWORD);
1389 BOOL WINAPI GetNumberOfEventLogRecords(HANDLE,PDWORD);
1390 UINT WINAPI GetOEMCP(void);
1391 BOOL WINAPI GetOldestEventLogRecord(HANDLE,PDWORD);
1392 DWORD WINAPI GetPriorityClass(HANDLE);
1393 BOOL WINAPI GetProcessTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
1394 DWORD WINAPI GetProcessVersion(DWORD);
1395 BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
1396 BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL *,LPBOOL);
1397 BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID *,LPBOOL);
1398 DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR);
1399 BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID *,LPBOOL);
1400 BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL *,LPBOOL);
1401 PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID);
1402 DWORD WINAPI GetSidLengthRequired(BYTE);
1403 PDWORD WINAPI GetSidSubAuthority(PSID,DWORD);
1404 PUCHAR WINAPI GetSidSubAuthorityCount(PSID);
1405 DWORD WINAPI GetShortPathNameA(LPCSTR,LPSTR,DWORD);
1406 DWORD WINAPI GetShortPathNameW(LPCWSTR,LPWSTR,DWORD);
1407 #define GetShortPathName WINELIB_NAME_AW(GetShortPathName)
1408 HANDLE WINAPI GetStdHandle(DWORD);
1409 BOOL WINAPI GetStringTypeExA(LCID,DWORD,LPCSTR,INT,LPWORD);
1410 BOOL WINAPI GetStringTypeExW(LCID,DWORD,LPCWSTR,INT,LPWORD);
1411 #define GetStringTypeEx WINELIB_NAME_AW(GetStringTypeEx)
1412 VOID WINAPI GetSystemInfo(LPSYSTEM_INFO);
1413 BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
1414 VOID WINAPI GetSystemTime(LPSYSTEMTIME);
1415 VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME);
1416 DWORD WINAPI GetTapeParameters(HANDLE,DWORD,LPDWORD,LPVOID);
1417 DWORD WINAPI GetTapePosition(HANDLE,DWORD,LPDWORD,LPDWORD,LPDWORD);
1418 DWORD WINAPI GetTapeStatus(HANDLE);
1419 INT WINAPI GetTimeFormatA(LCID,DWORD,LPSYSTEMTIME,LPCSTR,LPSTR,INT);
1420 INT WINAPI GetTimeFormatW(LCID,DWORD,LPSYSTEMTIME,LPCWSTR,LPWSTR,INT);
1421 #define GetTimeFormat WINELIB_NAME_AW(GetTimeFormat)
1422 DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
1423 BOOL WINAPI GetThreadContext(HANDLE,CONTEXT *);
1424 LCID WINAPI GetThreadLocale(void);
1425 INT WINAPI GetThreadPriority(HANDLE);
1426 BOOL WINAPI GetThreadPriorityBoost(HANDLE,PBOOL);
1427 BOOL WINAPI GetThreadSelectorEntry(HANDLE,DWORD,LPLDT_ENTRY);
1428 BOOL WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
1429 BOOL WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,LPVOID,DWORD,LPDWORD);
1430 BOOL WINAPI GetUserNameA(LPSTR,LPDWORD);
1431 BOOL WINAPI GetUserNameW(LPWSTR,LPDWORD);
1432 #define GetUserName WINELIB_NAME_AW(GetUserName)
1433 VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS);
1434 LPVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD);
1435 DWORD WINAPI HeapCompact(HANDLE,DWORD);
1436 HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD);
1437 BOOL WINAPI HeapDestroy(HANDLE);
1438 BOOL WINAPI HeapFree(HANDLE,DWORD,LPVOID);
1439 BOOL WINAPI HeapLock(HANDLE);
1440 LPVOID WINAPI HeapReAlloc(HANDLE,DWORD,LPVOID,DWORD);
1441 DWORD WINAPI HeapSize(HANDLE,DWORD,LPVOID);
1442 BOOL WINAPI HeapUnlock(HANDLE);
1443 BOOL WINAPI HeapValidate(HANDLE,DWORD,LPCVOID);
1444 BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
1445 DWORD WINAPI InitializeAcl(PACL,DWORD,DWORD);
1446 BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
1447 BOOL WINAPI InitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
1448 BOOL WINAPI IsTextUnicode(CONST LPVOID lpBuffer, int cb, LPINT lpi);
1449 BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
1450 BOOL WINAPI IsValidSid(PSID);
1451 BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
1452 BOOL WINAPI IsDBCSLeadByteEx(UINT,BYTE);
1453 BOOL WINAPI IsProcessorFeaturePresent(DWORD);
1454 BOOL WINAPI IsValidLocale(DWORD,DWORD);
1455 BOOL WINAPI LookupAccountSidA(LPCSTR,PSID,LPSTR,LPDWORD,LPSTR,LPDWORD,PSID_NAME_USE);
1456 BOOL WINAPI LookupAccountSidW(LPCWSTR,PSID,LPWSTR,LPDWORD,LPWSTR,LPDWORD,PSID_NAME_USE);
1457 #define LookupAccountSid WINELIB_NAME_AW(LookupAccountSid)
1458 BOOL WINAPI LocalFileTimeToFileTime(const FILETIME*,LPFILETIME);
1459 BOOL WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1460 BOOL WINAPI LockFileEx(HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED);
1461 BOOL WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,LPVOID);
1462 BOOL WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,LPVOID);
1463 #define LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
1464 BOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
1465 HMODULE WINAPI MapHModuleSL(WORD);
1466 WORD WINAPI MapHModuleLS(HMODULE);
1467 LPVOID WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1468 LPVOID WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,LPVOID);
1469 BOOL WINAPI MoveFileA(LPCSTR,LPCSTR);
1470 BOOL WINAPI MoveFileW(LPCWSTR,LPCWSTR);
1471 #define MoveFile WINELIB_NAME_AW(MoveFile)
1472 BOOL WINAPI MoveFileExA(LPCSTR,LPCSTR,DWORD);
1473 BOOL WINAPI MoveFileExW(LPCWSTR,LPCWSTR,DWORD);
1474 #define MoveFileEx WINELIB_NAME_AW(MoveFileEx)
1475 INT WINAPI MultiByteToWideChar(UINT,DWORD,LPCSTR,INT,LPWSTR,INT);
1476 BOOL WINAPI NotifyChangeEventLog(HANDLE,HANDLE);
1477 INT WINAPI WideCharToMultiByte(UINT,DWORD,LPCWSTR,INT,LPSTR,INT,LPCSTR,BOOL*);
1478 HANDLE WINAPI OpenBackupEventLogA(LPCSTR,LPCSTR);
1479 HANDLE WINAPI OpenBackupEventLogW(LPCWSTR,LPCWSTR);
1480 #define OpenBackupEventLog WINELIB_NAME_AW(OpenBackupEventLog)
1481 HANDLE WINAPI OpenEventA(DWORD,BOOL,LPCSTR);
1482 HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR);
1483 #define OpenEvent WINELIB_NAME_AW(OpenEvent)
1484 HANDLE WINAPI OpenEventLogA(LPCSTR,LPCSTR);
1485 HANDLE WINAPI OpenEventLogW(LPCWSTR,LPCWSTR);
1486 #define OpenEventLog WINELIB_NAME_AW(OpenEventLog)
1487 HANDLE WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR);
1488 HANDLE WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR);
1489 #define OpenFileMapping WINELIB_NAME_AW(OpenFileMapping)
1490 HANDLE WINAPI OpenMutexA(DWORD,BOOL,LPCSTR);
1491 HANDLE WINAPI OpenMutexW(DWORD,BOOL,LPCWSTR);
1492 #define OpenMutex WINELIB_NAME_AW(OpenMutex)
1493 HANDLE WINAPI OpenProcess(DWORD,BOOL,DWORD);
1494 BOOL WINAPI OpenProcessToken(HANDLE,DWORD,PHANDLE);
1495 HANDLE WINAPI OpenSemaphoreA(DWORD,BOOL,LPCSTR);
1496 HANDLE WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR);
1497 #define OpenSemaphore WINELIB_NAME_AW(OpenSemaphore)
1498 BOOL WINAPI OpenThreadToken(HANDLE,DWORD,BOOL,PHANDLE);
1499 HANDLE WINAPI OpenWaitableTimerA(DWORD,BOOL,LPCSTR);
1500 HANDLE WINAPI OpenWaitableTimerW(DWORD,BOOL,LPCWSTR);
1501 #define OpenWaitableTimer WINELIB_NAME_AW(OpenWaitableTimer)
1502 DWORD WINAPI PrepareTape(HANDLE,DWORD,BOOL);
1503 BOOL WINAPI PulseEvent(HANDLE);
1504 BOOL WINAPI PurgeComm(HANDLE,DWORD);
1505 DWORD WINAPI QueryDosDeviceA(LPCSTR,LPSTR,DWORD);
1506 DWORD WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
1507 #define QueryDosDevice WINELIB_NAME_AW(QueryDosDevice)
1508 BOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER*);
1509 BOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER*);
1510 BOOL WINAPI ReadConsoleA(HANDLE,LPVOID,DWORD,LPDWORD,LPVOID);
1511 BOOL WINAPI ReadConsoleW(HANDLE,LPVOID,DWORD,LPDWORD,LPVOID);
1512 #define ReadConsole WINELIB_NAME_AW(ReadConsole)
1513 BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
1514 BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
1515 #define ReadEventLog WINELIB_NAME_AW(ReadEventLog)
1516 BOOL WINAPI ReadFile(HANDLE,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
1517 HANDLE WINAPI RegisterEventSourceA(LPCSTR,LPCSTR);
1518 HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
1519 #define RegisterEventSource WINELIB_NAME_AW(RegisterEventSource)
1520 BOOL WINAPI ReleaseMutex(HANDLE);
1521 BOOL WINAPI ReleaseSemaphore(HANDLE,LONG,LPLONG);
1522 BOOL WINAPI ReportEventA(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCSTR *,LPVOID);
1523 BOOL WINAPI ReportEventW(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCWSTR *,LPVOID);
1524 #define ReportEvent WINELIB_NAME_AW(ReportEvent)
1525 BOOL WINAPI ResetEvent(HANDLE);
1526 DWORD WINAPI ResumeThread(HANDLE);
1527 BOOL WINAPI RevertToSelf(void);
1528 DWORD WINAPI SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*);
1529 DWORD WINAPI SearchPathW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPWSTR*);
1530 #define SearchPath WINELIB_NAME_AW(SearchPath)
1531 BOOL WINAPI SetCommConfig(HANDLE,LPCOMMCONFIG);
1532 BOOL WINAPI SetCommMask(HANDLE,DWORD);
1533 BOOL WINAPI SetCommState(HANDLE,LPDCB);
1534 BOOL WINAPI SetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
1535 BOOL WINAPI SetComputerNameA(LPCSTR);
1536 BOOL WINAPI SetComputerNameW(LPCWSTR);
1537 #define SetComputerName WINELIB_NAME_AW(SetComputerName)
1538 BOOL WINAPI SetConsoleMode(HANDLE,DWORD);
1539 BOOL WINAPI SetConsoleTitleA(LPCSTR);
1540 BOOL WINAPI SetConsoleTitleW(LPCWSTR);
1541 #define SetConsoleTitle WINELIB_NAME_AW(SetConsoleTitle)
1542 BOOL WINAPI SetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,DWORD);
1543 BOOL WINAPI SetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,DWORD);
1544 #define SetDefaultCommConfig WINELIB_NAME_AW(SetDefaultCommConfig)
1545 BOOL WINAPI SetEndOfFile(HANDLE);
1546 BOOL WINAPI SetEnvironmentVariableA(LPCSTR,LPCSTR);
1547 BOOL WINAPI SetEnvironmentVariableW(LPCWSTR,LPCWSTR);
1548 #define SetEnvironmentVariable WINELIB_NAME_AW(SetEnvironmentVariable)
1549 BOOL WINAPI SetEvent(HANDLE);
1550 VOID WINAPI SetFileApisToANSI(void);
1551 VOID WINAPI SetFileApisToOEM(void);
1552 DWORD WINAPI SetFilePointer(HANDLE,LONG,LPLONG,DWORD);
1553 BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1554 BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1555 #define SetFileSecurity WINELIB_NAME_AW(SetFileSecurity)
1556 BOOL WINAPI SetFileTime(HANDLE,const FILETIME*,const FILETIME*,const FILETIME*);
1557 BOOL WINAPI SetHandleInformation(HANDLE,DWORD,DWORD);
1558 BOOL WINAPI SetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1559 BOOL WINAPI SetPriorityClass(HANDLE,DWORD);
1560 BOOL WINAPI SetLocalTime(const SYSTEMTIME*);
1561 BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
1562 BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL);
1563 BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID,BOOL);
1564 BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
1565 BOOL WINAPI SetStdHandle(DWORD,HANDLE);
1566 BOOL WINAPI SetSystemPowerState(BOOL,BOOL);
1567 BOOL WINAPI SetSystemTime(const SYSTEMTIME*);
1568 DWORD WINAPI SetTapeParameters(HANDLE,DWORD,LPVOID);
1569 DWORD WINAPI SetTapePosition(HANDLE,DWORD,DWORD,DWORD,DWORD,BOOL);
1570 DWORD WINAPI SetThreadAffinityMask(HANDLE,DWORD);
1571 BOOL WINAPI SetThreadContext(HANDLE,const CONTEXT *);
1572 BOOL WINAPI SetThreadLocale(LCID);
1573 BOOL WINAPI SetThreadPriority(HANDLE,INT);
1574 BOOL WINAPI SetThreadPriorityBoost(HANDLE,BOOL);
1575 BOOL WINAPI SetThreadToken(PHANDLE,HANDLE);
1576 BOOL WINAPI SetTimeZoneInformation(const LPTIME_ZONE_INFORMATION);
1577 BOOL WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,LPVOID,BOOL);
1578 BOOL WINAPI SetupComm(HANDLE,DWORD,DWORD);
1579 VOID WINAPI Sleep(DWORD);
1580 DWORD WINAPI SleepEx(DWORD,BOOL);
1581 DWORD WINAPI SuspendThread(HANDLE);
1582 BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
1583 DWORD WINAPI TlsAlloc(void);
1584 BOOL WINAPI TlsFree(DWORD);
1585 LPVOID WINAPI TlsGetValue(DWORD);
1586 BOOL WINAPI TlsSetValue(DWORD,LPVOID);
1587 BOOL WINAPI TransmitCommChar(HANDLE,CHAR);
1588 BOOL WINAPI UnlockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
1589 BOOL WINAPI UnmapViewOfFile(LPVOID);
1590 LPVOID WINAPI VirtualAlloc(LPVOID,DWORD,DWORD,DWORD);
1591 LPVOID WINAPI VirtualAllocEx(HANDLE,LPVOID,DWORD,DWORD,DWORD);
1592 BOOL WINAPI VirtualFree(LPVOID,DWORD,DWORD);
1593 BOOL WINAPI VirtualLock(LPVOID,DWORD);
1594 BOOL WINAPI VirtualProtect(LPVOID,DWORD,DWORD,LPDWORD);
1595 BOOL WINAPI VirtualProtectEx(HANDLE,LPVOID,DWORD,DWORD,LPDWORD);
1596 DWORD WINAPI VirtualQuery(LPCVOID,LPMEMORY_BASIC_INFORMATION,DWORD);
1597 DWORD WINAPI VirtualQueryEx(HANDLE,LPCVOID,LPMEMORY_BASIC_INFORMATION,DWORD);
1598 BOOL WINAPI VirtualUnlock(LPVOID,DWORD);
1599 BOOL WINAPI WaitCommEvent(HANDLE,LPDWORD,LPOVERLAPPED);
1600 BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD);
1601 DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD);
1602 DWORD WINAPI WaitForMultipleObjectsEx(DWORD,const HANDLE*,BOOL,DWORD,BOOL);
1603 DWORD WINAPI WaitForSingleObject(HANDLE,DWORD);
1604 DWORD WINAPI WaitForSingleObjectEx(HANDLE,DWORD,BOOL);
1605 BOOL WINAPI WriteConsoleA(HANDLE,LPCVOID,DWORD,LPDWORD,LPVOID);
1606 BOOL WINAPI WriteConsoleW(HANDLE,LPCVOID,DWORD,LPDWORD,LPVOID);
1607 #define WriteConsole WINELIB_NAME_AW(WriteConsole)
1608 BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
1609 BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
1610 DWORD WINAPI WriteTapemark(HANDLE,DWORD,DWORD,BOOL);
1611 LANGID WINAPI GetSystemDefaultLangID(void);
1612 LCID WINAPI GetSystemDefaultLCID(void);
1613 LANGID WINAPI GetUserDefaultLangID(void);
1614 LCID WINAPI GetUserDefaultLCID(void);
1615 ATOM WINAPI AddAtomA(LPCSTR);
1616 ATOM WINAPI AddAtomW(LPCWSTR);
1617 #define AddAtom WINELIB_NAME_AW(AddAtom)
1618 UINT WINAPI CompareStringA(DWORD,DWORD,LPCSTR,DWORD,LPCSTR,DWORD);
1619 UINT WINAPI CompareStringW(DWORD,DWORD,LPCWSTR,DWORD,LPCWSTR,DWORD);
1620 #define CompareString WINELIB_NAME_AW(CompareString)
1621 BOOL WINAPI CreateDirectoryA(LPCSTR,LPSECURITY_ATTRIBUTES);
1622 BOOL WINAPI CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES);
1623 #define CreateDirectory WINELIB_NAME_AW(CreateDirectory)
1624 BOOL WINAPI CreateDirectoryExA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES);
1625 BOOL WINAPI CreateDirectoryExW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES);
1626 #define CreateDirectoryEx WINELIB_NAME_AW(CreateDirectoryEx)
1627 BOOL WINAPI DefineDosDeviceA(DWORD,LPCSTR,LPCSTR);
1628 #define DefineHandleTable(w) ((w),TRUE)
1629 ATOM WINAPI DeleteAtom(ATOM);
1630 BOOL WINAPI DeleteFileA(LPCSTR);
1631 BOOL WINAPI DeleteFileW(LPCWSTR);
1632 #define DeleteFile WINELIB_NAME_AW(DeleteFile)
1633 void WINAPI FatalAppExitA(UINT,LPCSTR);
1634 void WINAPI FatalAppExitW(UINT,LPCWSTR);
1635 #define FatalAppExit WINELIB_NAME_AW(FatalAppExit)
1636 ATOM WINAPI FindAtomA(LPCSTR);
1637 ATOM WINAPI FindAtomW(LPCWSTR);
1638 #define FindAtom WINELIB_NAME_AW(FindAtom)
1639 BOOL WINAPI FindClose(HANDLE);
1640 HANDLE WINAPI FindFirstFileA(LPCSTR,LPWIN32_FIND_DATAA);
1641 HANDLE WINAPI FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW);
1642 #define FindFirstFile WINELIB_NAME_AW(FindFirstFile)
1643 HANDLE WINAPI FindFirstFileExA(LPCSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD);
1644 HANDLE WINAPI FindFirstFileExW(LPCWSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD);
1645 #define FindFirstFileEx WINELIB_NAME_AW(FindFirstFileEx)
1646 BOOL WINAPI FindNextFileA(HANDLE,LPWIN32_FIND_DATAA);
1647 BOOL WINAPI FindNextFileW(HANDLE,LPWIN32_FIND_DATAW);
1648 #define FindNextFile WINELIB_NAME_AW(FindNextFile)
1649 HRSRC WINAPI FindResourceA(HMODULE,LPCSTR,LPCSTR);
1650 HRSRC WINAPI FindResourceW(HMODULE,LPCWSTR,LPCWSTR);
1651 #define FindResource WINELIB_NAME_AW(FindResource)
1652 BOOL WINAPI FreeLibrary(HMODULE);
1653 #define FreeModule(handle) FreeLibrary(handle)
1654 #define FreeProcInstance(proc) /*nothing*/
1655 BOOL WINAPI FreeResource(HGLOBAL);
1656 UINT WINAPI GetAtomNameA(ATOM,LPSTR,INT);
1657 UINT WINAPI GetAtomNameW(ATOM,LPWSTR,INT);
1658 #define GetAtomName WINELIB_NAME_AW(GetAtomName)
1659 UINT WINAPI GetCurrentDirectoryA(UINT,LPSTR);
1660 UINT WINAPI GetCurrentDirectoryW(UINT,LPWSTR);
1661 #define GetCurrentDirectory WINELIB_NAME_AW(GetCurrentDirectory)
1662 #define GetCurrentTime() GetTickCount()
1663 BOOL WINAPI GetDiskFreeSpaceA(LPCSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1664 BOOL WINAPI GetDiskFreeSpaceW(LPCWSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
1665 #define GetDiskFreeSpace WINELIB_NAME_AW(GetDiskFreeSpace)
1666 BOOL WINAPI GetDiskFreeSpaceExA(LPCSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
1667 BOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
1668 #define GetDiskFreeSpaceEx WINELIB_NAME_AW(GetDiskFreeSpaceEx)
1669 UINT WINAPI GetDriveTypeA(LPCSTR);
1670 UINT WINAPI GetDriveTypeW(LPCWSTR);
1671 #define GetDriveType WINELIB_NAME_AW(GetDriveType)
1672 BOOL WINAPI GetExitCodeProcess(HANDLE,LPDWORD);
1673 DWORD WINAPI GetFileAttributesA(LPCSTR);
1674 DWORD WINAPI GetFileAttributesW(LPCWSTR);
1675 #define GetFileAttributes WINELIB_NAME_AW(GetFileAttributes)
1676 #define GetFreeSpace(w) (0x100000L)
1677 UINT WINAPI GetLogicalDriveStringsA(UINT,LPSTR);
1678 UINT WINAPI GetLogicalDriveStringsW(UINT,LPWSTR);
1679 #define GetLogicalDriveStrings WINELIB_NAME_AW(GetLogicalDriveStrings)
1680 DWORD WINAPI GetModuleFileNameA(HMODULE,LPSTR,DWORD);
1681 DWORD WINAPI GetModuleFileNameW(HMODULE,LPWSTR,DWORD);
1682 #define GetModuleFileName WINELIB_NAME_AW(GetModuleFileName)
1683 HMODULE WINAPI GetModuleHandleA(LPCSTR);
1684 HMODULE WINAPI GetModuleHandleW(LPCWSTR);
1685 #define GetModuleHandle WINELIB_NAME_AW(GetModuleHandle)
1686 BOOL WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,LPDWORD,BOOL);
1687 UINT WINAPI GetPrivateProfileIntA(LPCSTR,LPCSTR,INT,LPCSTR);
1688 UINT WINAPI GetPrivateProfileIntW(LPCWSTR,LPCWSTR,INT,LPCWSTR);
1689 #define GetPrivateProfileInt WINELIB_NAME_AW(GetPrivateProfileInt)
1690 INT WINAPI GetPrivateProfileSectionA(LPCSTR,LPSTR,DWORD,LPCSTR);
1691 INT WINAPI GetPrivateProfileSectionW(LPCWSTR,LPWSTR,DWORD,LPCWSTR);
1692 #define GetPrivateProfileSection WINELIB_NAME_AW(GetPrivateProfileSection)
1693 DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR,DWORD,LPCSTR);
1694 DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR,DWORD,LPCWSTR);
1695 #define GetPrivateProfileSectionNames WINELIB_NAME_AW(GetPrivateProfileSectionNames)
1696 INT WINAPI GetPrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT,LPCSTR);
1697 INT WINAPI GetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT,LPCWSTR);
1698 #define GetPrivateProfileString WINELIB_NAME_AW(GetPrivateProfileString)
1699 BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
1700 BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
1701 #define GetPrivateProfileStruct WINELIB_NAME_AW(GetPrivateProfileStruct)
1702 FARPROC WINAPI GetProcAddress(HMODULE,LPCSTR);
1703 UINT WINAPI GetProfileIntA(LPCSTR,LPCSTR,INT);
1704 UINT WINAPI GetProfileIntW(LPCWSTR,LPCWSTR,INT);
1705 #define GetProfileInt WINELIB_NAME_AW(GetProfileInt)
1706 INT WINAPI GetProfileSectionA(LPCSTR,LPSTR,DWORD);
1707 INT WINAPI GetProfileSectionW(LPCWSTR,LPWSTR,DWORD);
1708 #define GetProfileSection WINELIB_NAME_AW(GetProfileSection)
1709 INT WINAPI GetProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT);
1710 INT WINAPI GetProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT);
1711 #define GetProfileString WINELIB_NAME_AW(GetProfileString)
1712 VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA);
1713 VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW);
1714 #define GetStartupInfo WINELIB_NAME_AW(GetStartupInfo)
1715 BOOL WINAPI GetStringTypeA(LCID,DWORD,LPCSTR,INT,LPWORD);
1716 BOOL WINAPI GetStringTypeW(DWORD,LPCWSTR,INT,LPWORD);
1717 UINT WINAPI GetSystemDirectoryA(LPSTR,UINT);
1718 UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT);
1719 #define GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
1720 DWORD WINAPI GetTickCount(void);
1721 UINT WINAPI GetTempFileNameA(LPCSTR,LPCSTR,UINT,LPSTR);
1722 UINT WINAPI GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR);
1723 #define GetTempFileName WINELIB_NAME_AW(GetTempFileName)
1724 UINT WINAPI GetTempPathA(UINT,LPSTR);
1725 UINT WINAPI GetTempPathW(UINT,LPWSTR);
1726 #define GetTempPath WINELIB_NAME_AW(GetTempPath)
1727 LONG WINAPI GetVersion(void);
1728 BOOL WINAPI GetVolumeInformationA(LPCSTR,LPSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPSTR,DWORD);
1729 BOOL WINAPI GetVolumeInformationW(LPCWSTR,LPWSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPWSTR,DWORD);
1730 #define GetVolumeInformation WINELIB_NAME_AW(GetVolumeInformation)
1731 UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT);
1732 UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
1733 #define GetWindowsDirectory WINELIB_NAME_AW(GetWindowsDirectory)
1734 ATOM WINAPI GlobalAddAtomA(LPCSTR);
1735 ATOM WINAPI GlobalAddAtomW(LPCWSTR);
1736 #define GlobalAddAtom WINELIB_NAME_AW(GlobalAddAtom)
1737 HGLOBAL WINAPI GlobalAlloc(UINT,DWORD);
1738 DWORD WINAPI GlobalCompact(DWORD);
1739 ATOM WINAPI GlobalDeleteAtom(ATOM);
1740 ATOM WINAPI GlobalFindAtomA(LPCSTR);
1741 ATOM WINAPI GlobalFindAtomW(LPCWSTR);
1742 #define GlobalFindAtom WINELIB_NAME_AW(GlobalFindAtom)
1743 UINT WINAPI GlobalFlags(HGLOBAL);
1744 HGLOBAL WINAPI GlobalFree(HGLOBAL);
1745 UINT WINAPI GlobalGetAtomNameA(ATOM,LPSTR,INT);
1746 UINT WINAPI GlobalGetAtomNameW(ATOM,LPWSTR,INT);
1747 #define GlobalGetAtomName WINELIB_NAME_AW(GlobalGetAtomName)
1748 HGLOBAL WINAPI GlobalHandle(LPCVOID);
1749 VOID WINAPI GlobalFix(HGLOBAL);
1750 LPVOID WINAPI GlobalLock(HGLOBAL);
1751 HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,DWORD,UINT);
1752 DWORD WINAPI GlobalSize(HGLOBAL);
1753 VOID WINAPI GlobalUnfix(HGLOBAL);
1754 BOOL WINAPI GlobalUnlock(HGLOBAL);
1755 BOOL WINAPI GlobalUnWire(HGLOBAL);
1756 LPVOID WINAPI GlobalWire(HGLOBAL);
1757 #define HasOverlappedCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
1758 BOOL WINAPI InitAtomTable(DWORD);
1759 BOOL WINAPI IsBadCodePtr(FARPROC);
1760 BOOL WINAPI IsBadHugeReadPtr(LPCVOID,UINT);
1761 BOOL WINAPI IsBadHugeWritePtr(LPVOID,UINT);
1762 BOOL WINAPI IsBadReadPtr(LPCVOID,UINT);
1763 BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT);
1764 BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT);
1765 #define IsBadStringPtr WINELIB_NAME_AW(IsBadStringPtr)
1766 BOOL WINAPI IsBadWritePtr(LPVOID,UINT);
1767 BOOL WINAPI IsDBCSLeadByte(BYTE);
1768 BOOL WINAPI IsDebuggerPresent(void);
1769 HMODULE WINAPI LoadLibraryA(LPCSTR);
1770 HMODULE WINAPI LoadLibraryW(LPCWSTR);
1771 #define LoadLibrary WINELIB_NAME_AW(LoadLibrary)
1772 HMODULE WINAPI LoadLibraryExA(LPCSTR,HANDLE,DWORD);
1773 HMODULE WINAPI LoadLibraryExW(LPCWSTR,HANDLE,DWORD);
1774 #define LoadLibraryEx WINELIB_NAME_AW(LoadLibraryEx)
1775 HINSTANCE WINAPI LoadModule(LPCSTR,LPVOID);
1776 HGLOBAL WINAPI LoadResource(HMODULE,HRSRC);
1777 HLOCAL WINAPI LocalAlloc(UINT,DWORD);
1778 UINT WINAPI LocalCompact(UINT);
1779 UINT WINAPI LocalFlags(HLOCAL);
1780 HLOCAL WINAPI LocalFree(HLOCAL);
1781 HLOCAL WINAPI LocalHandle(LPCVOID);
1782 LPVOID WINAPI LocalLock(HLOCAL);
1783 HLOCAL WINAPI LocalReAlloc(HLOCAL,DWORD,UINT);
1784 UINT WINAPI LocalShrink(HGLOBAL,UINT);
1785 UINT WINAPI LocalSize(HLOCAL);
1786 BOOL WINAPI LocalUnlock(HLOCAL);
1787 LPVOID WINAPI LockResource(HGLOBAL);
1788 #define LockSegment(handle) GlobalFix((HANDLE)(handle))
1789 #define MakeProcInstance(proc,inst) (proc)
1790 HFILE WINAPI OpenFile(LPCSTR,OFSTRUCT*,UINT);
1791 VOID WINAPI OutputDebugStringA(LPCSTR);
1792 VOID WINAPI OutputDebugStringW(LPCWSTR);
1793 #define OutputDebugString WINELIB_NAME_AW(OutputDebugString)
1794 BOOL WINAPI ReadProcessMemory(HANDLE, LPCVOID, LPVOID, DWORD, LPDWORD);
1795 BOOL WINAPI RemoveDirectoryA(LPCSTR);
1796 BOOL WINAPI RemoveDirectoryW(LPCWSTR);
1797 #define RemoveDirectory WINELIB_NAME_AW(RemoveDirectory)
1798 BOOL WINAPI SetCurrentDirectoryA(LPCSTR);
1799 BOOL WINAPI SetCurrentDirectoryW(LPCWSTR);
1800 #define SetCurrentDirectory WINELIB_NAME_AW(SetCurrentDirectory)
1801 UINT WINAPI SetErrorMode(UINT);
1802 BOOL WINAPI SetFileAttributesA(LPCSTR,DWORD);
1803 BOOL WINAPI SetFileAttributesW(LPCWSTR,DWORD);
1804 #define SetFileAttributes WINELIB_NAME_AW(SetFileAttributes)
1805 UINT WINAPI SetHandleCount(UINT);
1806 #define SetSwapAreaSize(w) (w)
1807 BOOL WINAPI SetVolumeLabelA(LPCSTR,LPCSTR);
1808 BOOL WINAPI SetVolumeLabelW(LPCWSTR,LPCWSTR);
1809 #define SetVolumeLabel WINELIB_NAME_AW(SetVolumeLabel)
1810 DWORD WINAPI SizeofResource(HMODULE,HRSRC);
1811 BOOL WINAPI UnlockFileEx(HFILE,DWORD,DWORD,DWORD,LPOVERLAPPED);
1812 #define UnlockSegment(handle) GlobalUnfix((HANDLE)(handle))
1813 BOOL WINAPI WritePrivateProfileSectionA(LPCSTR,LPCSTR,LPCSTR);
1814 BOOL WINAPI WritePrivateProfileSectionW(LPCWSTR,LPCWSTR,LPCWSTR);
1815 #define WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
1816 BOOL WINAPI WritePrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
1817 BOOL WINAPI WritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
1818 #define WritePrivateProfileString WINELIB_NAME_AW(WritePrivateProfileString)
1819 BOOL WINAPI WriteProfileSectionA(LPCSTR,LPCSTR);
1820 BOOL WINAPI WriteProfileSectionW(LPCWSTR,LPCWSTR);
1821 #define WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
1822 BOOL WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
1823 BOOL WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
1824 #define WritePrivateProfileStruct WINELIB_NAME_AW(WritePrivateProfileStruct)
1825 BOOL WINAPI WriteProcessMemory(HANDLE, LPVOID, LPVOID, DWORD, LPDWORD);
1826 BOOL WINAPI WriteProfileStringA(LPCSTR,LPCSTR,LPCSTR);
1827 BOOL WINAPI WriteProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR);
1828 #define WriteProfileString WINELIB_NAME_AW(WriteProfileString)
1829 #define Yield32()
1830 LPSTR WINAPI lstrcatA(LPSTR,LPCSTR);
1831 LPWSTR WINAPI lstrcatW(LPWSTR,LPCWSTR);
1832 #define lstrcat WINELIB_NAME_AW(lstrcat)
1833 LPSTR WINAPI lstrcpyA(LPSTR,LPCSTR);
1834 LPWSTR WINAPI lstrcpyW(LPWSTR,LPCWSTR);
1835 #define lstrcpy WINELIB_NAME_AW(lstrcpy)
1836 LPSTR WINAPI lstrcpynA(LPSTR,LPCSTR,INT);
1837 LPWSTR WINAPI lstrcpynW(LPWSTR,LPCWSTR,INT);
1838 #define lstrcpyn WINELIB_NAME_AW(lstrcpyn)
1839 INT WINAPI lstrlenA(LPCSTR);
1840 INT WINAPI lstrlenW(LPCWSTR);
1841 #define lstrlen WINELIB_NAME_AW(lstrlen)
1842 HINSTANCE WINAPI WinExec(LPCSTR,UINT);
1843 LONG WINAPI _hread(HFILE,LPVOID,LONG);
1844 LONG WINAPI _hwrite(HFILE,LPCSTR,LONG);
1845 HFILE WINAPI _lcreat(LPCSTR,INT);
1846 HFILE WINAPI _lclose(HFILE);
1847 LONG WINAPI _llseek(HFILE,LONG,INT);
1848 HFILE WINAPI _lopen(LPCSTR,INT);
1849 UINT WINAPI _lread(HFILE,LPVOID,UINT);
1850 UINT WINAPI _lwrite(HFILE,LPCSTR,UINT);
1851 INT WINAPI lstrcmpA(LPCSTR,LPCSTR);
1852 INT WINAPI lstrcmpW(LPCWSTR,LPCWSTR);
1853 #define lstrcmp WINELIB_NAME_AW(lstrcmp)
1854 INT WINAPI lstrcmpiA(LPCSTR,LPCSTR);
1855 INT WINAPI lstrcmpiW(LPCWSTR,LPCWSTR);
1856 #define lstrcmpi WINELIB_NAME_AW(lstrcmpi)
1858 /* compatibility macros */
1859 #define FillMemory RtlFillMemory
1860 #define MoveMemory RtlMoveMemory
1861 #define ZeroMemory RtlZeroMemory
1862 #define CopyMemory RtlCopyMemory
1864 /* undocumented functions */
1866 typedef struct tagSYSLEVEL
1868 CRITICAL_SECTION crst;
1869 INT level;
1870 } SYSLEVEL;
1872 /* [GS]etProcessDword offsets */
1873 #define GPD_APP_COMPAT_FLAGS (-56)
1874 #define GPD_LOAD_DONE_EVENT (-52)
1875 #define GPD_HINSTANCE16 (-48)
1876 #define GPD_WINDOWS_VERSION (-44)
1877 #define GPD_THDB (-40)
1878 #define GPD_PDB (-36)
1879 #define GPD_STARTF_SHELLDATA (-32)
1880 #define GPD_STARTF_HOTKEY (-28)
1881 #define GPD_STARTF_SHOWWINDOW (-24)
1882 #define GPD_STARTF_SIZE (-20)
1883 #define GPD_STARTF_POSITION (-16)
1884 #define GPD_STARTF_FLAGS (-12)
1885 #define GPD_PARENT (- 8)
1886 #define GPD_FLAGS (- 4)
1887 #define GPD_USERDATA ( 0)
1889 void WINAPI DisposeLZ32Handle(HANDLE);
1890 HANDLE WINAPI DosFileHandleToWin32Handle(HFILE);
1891 DWORD WINAPI GetProcessDword(DWORD,INT);
1892 VOID WINAPI GetpWin16Lock(SYSLEVEL**);
1893 DWORD WINAPI MapLS(LPCVOID);
1894 DWORD WINAPI MapProcessHandle(HANDLE);
1895 LPVOID WINAPI MapSL(DWORD);
1896 VOID WINAPI ReleaseThunkLock(DWORD*);
1897 VOID WINAPI RestoreThunkLock(DWORD);
1898 void WINAPI SetProcessDword(DWORD,INT,DWORD);
1899 VOID WINAPI UnMapLS(DWORD);
1900 HFILE WINAPI Win32HandleToDosFileHandle(HANDLE);
1901 DWORD WINAPI _ConfirmWin16Lock(void);
1902 DWORD WINAPI _ConfirmSysLevel(SYSLEVEL*);
1903 VOID WINAPI _EnterSysLevel(SYSLEVEL*);
1904 VOID WINAPI _LeaveSysLevel(SYSLEVEL*);
1907 /* Wine internal functions */
1909 BOOL WINAPI wine_get_unix_file_name( LPCSTR dos, LPSTR buffer, DWORD len );
1912 /* a few optimizations for i386/gcc */
1914 #if defined(__i386__) && defined(__GNUC__)
1916 extern inline PVOID WINAPI InterlockedCompareExchange( PVOID *dest, PVOID xchg, PVOID compare );
1917 extern inline PVOID WINAPI InterlockedCompareExchange( PVOID *dest, PVOID xchg, PVOID compare )
1919 PVOID ret;
1920 __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
1921 : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
1922 return ret;
1925 extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val );
1926 extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val )
1928 LONG ret;
1929 __asm__ __volatile__( "lock; xchgl %0,(%1)"
1930 : "=r" (ret) :"r" (dest), "0" (val) : "memory" );
1931 return ret;
1934 extern inline LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr );
1935 extern inline LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr )
1937 LONG ret;
1938 __asm__ __volatile__( "lock; xaddl %0,(%1)"
1939 : "=r" (ret) : "r" (dest), "0" (incr) : "memory" );
1940 return ret;
1943 extern inline LONG WINAPI InterlockedIncrement( PLONG dest );
1944 extern inline LONG WINAPI InterlockedIncrement( PLONG dest )
1946 return InterlockedExchangeAdd( dest, 1 ) + 1;
1949 extern inline LONG WINAPI InterlockedDecrement( PLONG dest );
1950 extern inline LONG WINAPI InterlockedDecrement( PLONG dest )
1952 return InterlockedExchangeAdd( dest, -1 ) - 1;
1955 extern inline DWORD WINAPI GetLastError(void);
1956 extern inline DWORD WINAPI GetLastError(void)
1958 DWORD ret;
1959 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x60,%0" : "=r" (ret) );
1960 return ret;
1963 extern inline DWORD WINAPI GetCurrentProcessId(void);
1964 extern inline DWORD WINAPI GetCurrentProcessId(void)
1966 DWORD ret;
1967 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x20,%0" : "=r" (ret) );
1968 return ret;
1971 extern inline DWORD WINAPI GetCurrentThreadId(void);
1972 extern inline DWORD WINAPI GetCurrentThreadId(void)
1974 DWORD ret;
1975 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x24,%0" : "=r" (ret) );
1976 return ret;
1979 extern inline void WINAPI SetLastError( DWORD err );
1980 extern inline void WINAPI SetLastError( DWORD err )
1982 __asm__ __volatile__( ".byte 0x64\n\tmovl %0,0x60" : : "r" (err) : "memory" );
1985 extern inline HANDLE WINAPI GetProcessHeap(void);
1986 extern inline HANDLE WINAPI GetProcessHeap(void)
1988 HANDLE *pdb;
1989 __asm__ __volatile__( ".byte 0x64\n\tmovl 0x30,%0" : "=r" (pdb) );
1990 return pdb[0x18 / sizeof(HANDLE)]; /* get dword at offset 0x18 in pdb */
1993 #else /* __i386__ && __GNUC__ */
1994 DWORD WINAPI GetCurrentProcessId(void);
1995 DWORD WINAPI GetCurrentThreadId(void);
1996 DWORD WINAPI GetLastError(void);
1997 HANDLE WINAPI GetProcessHeap(void);
1998 PVOID WINAPI InterlockedCompareExchange(PVOID*,PVOID,PVOID);
1999 LONG WINAPI InterlockedDecrement(PLONG);
2000 LONG WINAPI InterlockedExchange(PLONG,LONG);
2001 LONG WINAPI InterlockedExchangeAdd(PLONG,LONG);
2002 LONG WINAPI InterlockedIncrement(PLONG);
2003 VOID WINAPI SetLastError(DWORD);
2004 #endif /* __i386__ && __GNUC__ */
2006 #ifdef __WINE__
2007 #define GetCurrentProcess() ((HANDLE)0xffffffff)
2008 #define GetCurrentThread() ((HANDLE)0xfffffffe)
2009 #endif
2011 /* WinMain(entry point) must be declared in winbase.h. */
2012 /* If this is not declared, we cannot compile many sources written with C++. */
2013 int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
2015 #ifdef __cplusplus
2017 #endif
2019 #endif /* __WINE_WINBASE_H */