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