1 #ifndef __WINE_WINBASE_H
2 #define __WINE_WINBASE_H
10 #define WAIT_FAILED 0xffffffff
11 #define WAIT_OBJECT_0 0
12 #define WAIT_ABANDONED STATUS_ABANDONED_WAIT_0
13 #define WAIT_ABANDONED_0 STATUS_ABANDONED_WAIT_0
14 #define WAIT_IO_COMPLETION STATUS_USER_APC
15 #define WAIT_TIMEOUT STATUS_TIMEOUT
17 #define PAGE_NOACCESS 0x01
18 #define PAGE_READONLY 0x02
19 #define PAGE_READWRITE 0x04
20 #define PAGE_WRITECOPY 0x08
21 #define PAGE_EXECUTE 0x10
22 #define PAGE_EXECUTE_READ 0x20
23 #define PAGE_EXECUTE_READWRITE 0x40
24 #define PAGE_EXECUTE_WRITECOPY 0x80
25 #define PAGE_GUARD 0x100
26 #define PAGE_NOCACHE 0x200
28 #define MEM_COMMIT 0x00001000
29 #define MEM_RESERVE 0x00002000
30 #define MEM_DECOMMIT 0x00004000
31 #define MEM_RELEASE 0x00008000
32 #define MEM_FREE 0x00010000
33 #define MEM_PRIVATE 0x00020000
34 #define MEM_MAPPED 0x00040000
35 #define MEM_TOP_DOWN 0x00100000
37 #define SEC_FILE 0x00800000
38 #define SEC_IMAGE 0x01000000
39 #define SEC_RESERVE 0x04000000
40 #define SEC_COMMIT 0x08000000
41 #define SEC_NOCACHE 0x10000000
44 #define FILE_CURRENT 1
47 #define FILE_CASE_SENSITIVE_SEARCH 0x00000001
48 #define FILE_CASE_PRESERVED_NAMES 0x00000002
49 #define FILE_UNICODE_ON_DISK 0x00000004
50 #define FILE_PERSISTENT_ACLS 0x00000008
52 #define FILE_MAP_COPY 0x00000001
53 #define FILE_MAP_WRITE 0x00000002
54 #define FILE_MAP_READ 0x00000004
55 #define FILE_MAP_ALL_ACCESS 0x000f001f
57 #define MOVEFILE_REPLACE_EXISTING 0x00000001
58 #define MOVEFILE_COPY_ALLOWED 0x00000002
59 #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
61 #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
62 #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
63 #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
66 #define STATUS_SUCCESS 0x00000000
67 #define STATUS_WAIT_0 0x00000000
68 #define STATUS_ABANDONED_WAIT_0 0x00000080
69 #define STATUS_USER_APC 0x000000C0
70 #define STATUS_TIMEOUT 0x00000102
71 #define STATUS_PENDING 0x00000103
72 #define STATUS_GUARD_PAGE_VIOLATION 0x80000001
73 #define STATUS_DATATYPE_MISALIGNMENT 0x80000002
74 #define STATUS_BREAKPOINT 0x80000003
75 #define STATUS_SINGLE_STEP 0x80000004
76 #define STATUS_BUFFER_OVERFLOW 0x80000005
77 #define STATUS_ACCESS_VIOLATION 0xC0000005
78 #define STATUS_IN_PAGE_ERROR 0xC0000006
79 #define STATUS_INVALID_PARAMETER 0xC000000D
80 #define STATUS_NO_MEMORY 0xC0000017
81 #define STATUS_ILLEGAL_INSTRUCTION 0xC000001D
82 #define STATUS_BUFFER_TOO_SMALL 0xC0000023
83 #define STATUS_NONCONTINUABLE_EXCEPTION 0xC0000025
84 #define STATUS_INVALID_DISPOSITION 0xC0000026
85 #define STATUS_UNKNOWN_REVISION 0xC0000058
86 #define STATUS_INVALID_SECURITY_DESCR 0xC0000079
87 #define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C
88 #define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D
89 #define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E
90 #define STATUS_FLOAT_INEXACT_RESULT 0xC000008F
91 #define STATUS_FLOAT_INVALID_OPERATION 0xC0000090
92 #define STATUS_FLOAT_OVERFLOW 0xC0000091
93 #define STATUS_FLOAT_STACK_CHECK 0xC0000092
94 #define STATUS_FLOAT_UNDERFLOW 0xC0000093
95 #define STATUS_INTEGER_DIVIDE_BY_ZERO 0xC0000094
96 #define STATUS_INTEGER_OVERFLOW 0xC0000095
97 #define STATUS_PRIVILEGED_INSTRUCTION 0xC0000096
98 #define STATUS_INVALID_PARAMETER_2 0xC00000F0
99 #define STATUS_STACK_OVERFLOW 0xC00000FD
100 #define STATUS_CONTROL_C_EXIT 0xC000013A
102 #define DUPLICATE_CLOSE_SOURCE 0x00000001
103 #define DUPLICATE_SAME_ACCESS 0x00000002
105 #define HANDLE_FLAG_INHERIT 0x00000001
106 #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002
108 #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
109 #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
110 #define THREAD_PRIORITY_NORMAL 0
111 #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
112 #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
113 #define THREAD_PRIORITY_ERROR_RETURN (0x7fffffff)
114 #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
115 #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
140 /* Could this type be considered opaque? */
145 HANDLE32 OwningThread
;
146 HANDLE32 LockSemaphore
;
151 DWORD dwOSVersionInfoSize
;
152 DWORD dwMajorVersion
;
153 DWORD dwMinorVersion
;
156 CHAR szCSDVersion
[128];
160 DWORD dwOSVersionInfoSize
;
161 DWORD dwMajorVersion
;
162 DWORD dwMinorVersion
;
165 CHAR szCSDVersion
[128];
169 DWORD dwOSVersionInfoSize
;
170 DWORD dwMajorVersion
;
171 DWORD dwMinorVersion
;
174 WCHAR szCSDVersion
[128];
177 DECL_WINELIB_TYPE_AW(OSVERSIONINFO
)
179 #define VER_PLATFORM_WIN32s 0
180 #define VER_PLATFORM_WIN32_WINDOWS 1
181 #define VER_PLATFORM_WIN32_NT 2
183 /*DWORD WINAPI GetVersion( void );*/
184 BOOL16 WINAPI
GetVersionEx16(OSVERSIONINFO16
*);
185 BOOL32 WINAPI
GetVersionEx32A(OSVERSIONINFO32A
*);
186 BOOL32 WINAPI
GetVersionEx32W(OSVERSIONINFO32W
*);
187 #define GetVersionEx WINELIB_NAME_AW(GetVersionEx)
189 /*int WinMain(HINSTANCE, HINSTANCE prev, char *cmd, int show);*/
191 void WINAPI
DeleteCriticalSection(CRITICAL_SECTION
*lpCrit
);
192 void WINAPI
EnterCriticalSection(CRITICAL_SECTION
*lpCrit
);
193 void WINAPI
InitializeCriticalSection(CRITICAL_SECTION
*lpCrit
);
194 void WINAPI
LeaveCriticalSection(CRITICAL_SECTION
*lpCrit
);
195 HANDLE32 WINAPI
OpenProcess(DWORD access
, BOOL32 inherit
, DWORD id
);
196 BOOL32 WINAPI
GetProcessWorkingSetSize(HANDLE32
,LPDWORD
,LPDWORD
);
197 BOOL32 WINAPI
SetProcessWorkingSetSize(HANDLE32
,DWORD
,DWORD
);
198 void WINAPI
RaiseException(DWORD
,DWORD
,DWORD
,const LPDWORD
);
199 BOOL32 WINAPI
TerminateProcess(HANDLE32
,DWORD
);
200 BOOL32 WINAPI
TerminateThread(HANDLE32
,DWORD
);
206 #endif /* __WINE_WINBASE_H */