1 #ifndef __WINE_WINBASE_H
2 #define __WINE_WINBASE_H
13 #define WAIT_FAILED 0xffffffff
14 #define WAIT_OBJECT_0 0
15 #define WAIT_ABANDONED STATUS_ABANDONED_WAIT_0
16 #define WAIT_ABANDONED_0 STATUS_ABANDONED_WAIT_0
17 #define WAIT_IO_COMPLETION STATUS_USER_APC
18 #define WAIT_TIMEOUT STATUS_TIMEOUT
20 #define PAGE_NOACCESS 0x01
21 #define PAGE_READONLY 0x02
22 #define PAGE_READWRITE 0x04
23 #define PAGE_WRITECOPY 0x08
24 #define PAGE_EXECUTE 0x10
25 #define PAGE_EXECUTE_READ 0x20
26 #define PAGE_EXECUTE_READWRITE 0x40
27 #define PAGE_EXECUTE_WRITECOPY 0x80
28 #define PAGE_GUARD 0x100
29 #define PAGE_NOCACHE 0x200
31 #define MEM_COMMIT 0x00001000
32 #define MEM_RESERVE 0x00002000
33 #define MEM_DECOMMIT 0x00004000
34 #define MEM_RELEASE 0x00008000
35 #define MEM_FREE 0x00010000
36 #define MEM_PRIVATE 0x00020000
37 #define MEM_MAPPED 0x00040000
38 #define MEM_TOP_DOWN 0x00100000
40 #define SEC_FILE 0x00800000
41 #define SEC_IMAGE 0x01000000
42 #define SEC_RESERVE 0x04000000
43 #define SEC_COMMIT 0x08000000
44 #define SEC_NOCACHE 0x10000000
47 #define FILE_CURRENT 1
50 #define FILE_CASE_SENSITIVE_SEARCH 0x00000001
51 #define FILE_CASE_PRESERVED_NAMES 0x00000002
52 #define FILE_UNICODE_ON_DISK 0x00000004
53 #define FILE_PERSISTENT_ACLS 0x00000008
55 #define FILE_MAP_COPY 0x00000001
56 #define FILE_MAP_WRITE 0x00000002
57 #define FILE_MAP_READ 0x00000004
58 #define FILE_MAP_ALL_ACCESS 0x000f001f
60 #define MOVEFILE_REPLACE_EXISTING 0x00000001
61 #define MOVEFILE_COPY_ALLOWED 0x00000002
62 #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
64 #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
65 #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
66 #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
69 #define STATUS_SUCCESS 0x00000000
70 #define STATUS_WAIT_0 0x00000000
71 #define STATUS_ABANDONED_WAIT_0 0x00000080
72 #define STATUS_USER_APC 0x000000C0
73 #define STATUS_TIMEOUT 0x00000102
74 #define STATUS_PENDING 0x00000103
75 #define STATUS_GUARD_PAGE_VIOLATION 0x80000001
76 #define STATUS_DATATYPE_MISALIGNMENT 0x80000002
77 #define STATUS_BREAKPOINT 0x80000003
78 #define STATUS_SINGLE_STEP 0x80000004
79 #define STATUS_BUFFER_OVERFLOW 0x80000005
80 #define STATUS_ACCESS_VIOLATION 0xC0000005
81 #define STATUS_IN_PAGE_ERROR 0xC0000006
82 #define STATUS_INVALID_PARAMETER 0xC000000D
83 #define STATUS_NO_MEMORY 0xC0000017
84 #define STATUS_ILLEGAL_INSTRUCTION 0xC000001D
85 #define STATUS_BUFFER_TOO_SMALL 0xC0000023
86 #define STATUS_NONCONTINUABLE_EXCEPTION 0xC0000025
87 #define STATUS_INVALID_DISPOSITION 0xC0000026
88 #define STATUS_UNKNOWN_REVISION 0xC0000058
89 #define STATUS_INVALID_SECURITY_DESCR 0xC0000079
90 #define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C
91 #define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D
92 #define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E
93 #define STATUS_FLOAT_INEXACT_RESULT 0xC000008F
94 #define STATUS_FLOAT_INVALID_OPERATION 0xC0000090
95 #define STATUS_FLOAT_OVERFLOW 0xC0000091
96 #define STATUS_FLOAT_STACK_CHECK 0xC0000092
97 #define STATUS_FLOAT_UNDERFLOW 0xC0000093
98 #define STATUS_INTEGER_DIVIDE_BY_ZERO 0xC0000094
99 #define STATUS_INTEGER_OVERFLOW 0xC0000095
100 #define STATUS_PRIVILEGED_INSTRUCTION 0xC0000096
101 #define STATUS_INVALID_PARAMETER_2 0xC00000F0
102 #define STATUS_STACK_OVERFLOW 0xC00000FD
103 #define STATUS_CONTROL_C_EXIT 0xC000013A
105 #define DUPLICATE_CLOSE_SOURCE 0x00000001
106 #define DUPLICATE_SAME_ACCESS 0x00000002
108 #define HANDLE_FLAG_INHERIT 0x00000001
109 #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002
111 #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
112 #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
113 #define THREAD_PRIORITY_NORMAL 0
114 #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
115 #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
116 #define THREAD_PRIORITY_ERROR_RETURN (0x7fffffff)
117 #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
118 #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
143 /* Could this type be considered opaque? */
148 HANDLE32 OwningThread
;
149 HANDLE32 LockSemaphore
;
154 DWORD dwOSVersionInfoSize
;
155 DWORD dwMajorVersion
;
156 DWORD dwMinorVersion
;
159 CHAR szCSDVersion
[128];
163 DWORD dwOSVersionInfoSize
;
164 DWORD dwMajorVersion
;
165 DWORD dwMinorVersion
;
168 CHAR szCSDVersion
[128];
172 DWORD dwOSVersionInfoSize
;
173 DWORD dwMajorVersion
;
174 DWORD dwMinorVersion
;
177 WCHAR szCSDVersion
[128];
180 DECL_WINELIB_TYPE_AW(OSVERSIONINFO
)
182 #define VER_PLATFORM_WIN32s 0
183 #define VER_PLATFORM_WIN32_WINDOWS 1
184 #define VER_PLATFORM_WIN32_NT 2
186 typedef struct tagCOMSTAT
189 UINT16 cbInQue WINE_PACKED
;
190 UINT16 cbOutQue WINE_PACKED
;
191 } COMSTAT
,*LPCOMSTAT
;
193 typedef struct tagDCB16
196 UINT16 BaudRate WINE_PACKED
;
205 UINT16 fRtsDisable
:1;
207 UINT16 fOutxCtsFlow
:1;
208 UINT16 fOutxDsrFlow
:1;
210 UINT16 fDtrDisable
:1;
228 UINT16 TxDelay WINE_PACKED
;
231 typedef struct tagDCB32
237 DWORD fOutxCtsFlow
:1;
238 DWORD fOutxDsrFlow
:1;
239 DWORD fDtrControl
:2;
240 DWORD fDsrSensitivity
:1;
241 DWORD fTXContinueOnXoff
:1;
246 DWORD fRtsControl
:2;
247 DWORD fAbortOnError
:1;
262 DECL_WINELIB_TYPE(DCB
)
263 DECL_WINELIB_TYPE(LPDCB
)
266 typedef struct tagCOMMTIMEOUTS
{
267 DWORD ReadIntervalTimeout
;
268 DWORD ReadTotalTimeoutMultiplier
;
269 DWORD ReadTotalTimeoutConstant
;
270 DWORD WriteTotalTimeoutMultiplier
;
271 DWORD WriteTotalTimeoutConstant
;
272 } COMMTIMEOUTS
,*LPCOMMTIMEOUTS
;
276 BOOL32 WINAPI
ClearCommError(INT32
,LPDWORD
,LPCOMSTAT
);
277 BOOL32 WINAPI
BuildCommDCB32A(LPCSTR
,LPDCB32
);
278 BOOL32 WINAPI
BuildCommDCB32W(LPCWSTR
,LPDCB32
);
279 #define BuildCommDCB WINELIB_NAME_AW(BuildCommDCB)
280 BOOL32 WINAPI
BuildCommDCBAndTimeouts32A(LPCSTR
,LPDCB32
,LPCOMMTIMEOUTS
);
281 BOOL32 WINAPI
BuildCommDCBAndTimeouts32W(LPCWSTR
,LPDCB32
,LPCOMMTIMEOUTS
);
282 #define BuildCommDCBAndTimeouts WINELIB_NAME_AW(BuildCommDCBAndTimeouts)
283 BOOL32 WINAPI
GetCommTimeouts(INT32
,LPCOMMTIMEOUTS
);
284 BOOL32 WINAPI
SetCommTimeouts(INT32
,LPCOMMTIMEOUTS
);
285 BOOL32 WINAPI
GetCommState32(INT32
,LPDCB32
);
286 #define GetCommState WINELIB_NAME(GetCommState)
287 BOOL32 WINAPI
SetCommState32(INT32
,LPDCB32
);
288 #define SetCommState WINELIB_NAME(SetCommState)
289 BOOL32 WINAPI
TransmitCommChar32(INT32
,CHAR
);
290 #define TransmitCommChar WINELIB_NAME(TransmitCommChar)
293 /*DWORD WINAPI GetVersion( void );*/
294 BOOL16 WINAPI
GetVersionEx16(OSVERSIONINFO16
*);
295 BOOL32 WINAPI
GetVersionEx32A(OSVERSIONINFO32A
*);
296 BOOL32 WINAPI
GetVersionEx32W(OSVERSIONINFO32W
*);
297 #define GetVersionEx WINELIB_NAME_AW(GetVersionEx)
299 /*int WinMain(HINSTANCE, HINSTANCE prev, char *cmd, int show);*/
301 void WINAPI
DeleteCriticalSection(CRITICAL_SECTION
*lpCrit
);
302 void WINAPI
EnterCriticalSection(CRITICAL_SECTION
*lpCrit
);
303 void WINAPI
InitializeCriticalSection(CRITICAL_SECTION
*lpCrit
);
304 void WINAPI
LeaveCriticalSection(CRITICAL_SECTION
*lpCrit
);
305 HANDLE32 WINAPI
OpenProcess(DWORD access
, BOOL32 inherit
, DWORD id
);
306 BOOL32 WINAPI
GetProcessWorkingSetSize(HANDLE32
,LPDWORD
,LPDWORD
);
307 BOOL32 WINAPI
SetProcessWorkingSetSize(HANDLE32
,DWORD
,DWORD
);
308 void WINAPI
RaiseException(DWORD
,DWORD
,DWORD
,const LPDWORD
);
309 BOOL32 WINAPI
TerminateProcess(HANDLE32
,DWORD
);
310 BOOL32 WINAPI
TerminateThread(HANDLE32
,DWORD
);
313 /* GetBinaryType return values.
316 #define SCS_32BIT_BINARY 0
317 #define SCS_DOS_BINARY 1
318 #define SCS_WOW_BINARY 2
319 #define SCS_PIF_BINARY 3
320 #define SCS_POSIX_BINARY 4
321 #define SCS_OS216_BINARY 5
323 BOOL32 WINAPI
GetBinaryType32A( LPCSTR lpApplicationName
, LPDWORD lpBinaryType
);
324 BOOL32 WINAPI
GetBinaryType32W( LPCWSTR lpApplicationName
, LPDWORD lpBinaryType
);
325 #define GetBinaryType WINELIB_NAME_AW(GetBinaryType)
333 #endif /* __WINE_WINBASE_H */