Release 960114
[wine/gsoc-2012-control.git] / include / kernel32.h
blobecb4fc60945f71cd79070bddbb55d0287fa5609c
1 /* kernel32.h - 95-09-14 Cameron Heide
3 * Win32 functions, structures, and types related to kernel functions
4 */
5 #ifndef __WINE_KERNEL32_H
6 #define __WINE_KERNEL32_H
8 #include <stddef.h>
10 int KERN32_Init(void);
11 void SetLastError(DWORD error);
12 DWORD ErrnoToLastError(int errno_num);
14 /* Linux's wchar_t is unsigned long but Win32 wants unsigned short
16 typedef unsigned short WCHAR;
17 typedef WCHAR *LPTSTR;
19 /* Code page information.
21 typedef struct {
22 DWORD MaxCharSize;
23 BYTE DefaultChar[2];
24 BYTE LeadBytes[5];
25 } CPINFO, *LPCPINFO;
27 /* The 'overlapped' data structure used by async I/O functions.
29 typedef struct {
30 DWORD Internal;
31 DWORD InternalHigh;
32 DWORD Offset;
33 DWORD OffsetHigh;
34 HANDLE hEvent;
35 } OVERLAPPED, *LPOVERLAPPED;
37 /* Process startup information.
39 typedef struct {
40 DWORD cb;
41 LPSTR lpReserved;
42 LPSTR lpDesktop;
43 LPSTR lpTitle;
44 DWORD dwX;
45 DWORD dwY;
46 DWORD dwXSize;
47 DWORD dwYSize;
48 DWORD dwXCountChars;
49 DWORD dwYCountChars;
50 DWORD dwFillAttribute;
51 DWORD dwFlags;
52 WORD wShowWindow;
53 WORD cbReserved2;
54 BYTE *lpReserved2;
55 HANDLE hStdInput;
56 HANDLE hStdOutput;
57 HANDLE hStdError;
58 } STARTUPINFO, *LPSTARTUPINFO;
60 /* SYSTEMTIME, and LPSYSTEMTIME moved to include/windows.h (JBP) */
62 typedef struct {
63 LONG Bias;
64 WCHAR StandardName[32];
65 SYSTEMTIME StandardDate;
66 LONG StandardBias;
67 WCHAR DaylightName[32];
68 SYSTEMTIME DaylightDate;
69 LONG DaylightBias;
70 } TIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
72 #define TIME_ZONE_ID_UNKNOWN 0
73 #define TIME_ZONE_ID_STANDARD 1
74 #define TIME_ZONE_ID_DAYLIGHT 2
77 /* File object type definitions
79 #define FILE_TYPE_UNKNOWN 0
80 #define FILE_TYPE_DISK 1
81 #define FILE_TYPE_CHAR 2
82 #define FILE_TYPE_PIPE 3
83 #define FILE_TYPE_REMOTE 32768
85 /* File creation flags
87 #define GENERIC_READ 0x80000000L
88 #define GENERIC_WRITE 0x40000000L
89 #define CREATE_NEW 1
90 #define CREATE_ALWAYS 2
91 #define OPEN_EXISTING 3
92 #define OPEN_ALWAYS 4
93 #define TRUNCATE_EXISTING 5
95 /* Standard handle identifiers
97 #define STD_INPUT_HANDLE ((DWORD) -10)
98 #define STD_OUTPUT_HANDLE ((DWORD) -11)
99 #define STD_ERROR_HANDLE ((DWORD) -12)
101 /* The security attributes structure
103 typedef struct {
104 DWORD nLength;
105 void *lpSecurityDescriptor;
106 BOOL bInheritHandle;
107 } SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
109 typedef struct
111 int dwLowDateTime;
112 int dwHighDateTime;
113 } FILETIME;
115 typedef struct
117 int dwFileAttributes;
118 FILETIME ftCreationTime;
119 FILETIME ftLastAccessTime;
120 FILETIME ftLastWriteTime;
121 int dwVolumeSerialNumber;
122 int nFileSizeHigh;
123 int nFileSizeLow;
124 int nNumberOfLinks;
125 int nFileIndexHigh;
126 int nFileIndexLow;
127 } BY_HANDLE_FILE_INFORMATION ;
129 /* File attribute flags
131 #define FILE_ATTRIBUTE_ARCHIVE 0x0020
132 #define FILE_ATTRIBUTE_COMPRESSED 0x0800
133 #define FILE_ATTRIBUTE_DIRECTORY 0x0010
134 #define FILE_ATTRIBUTE_HIDDEN 0x0002
135 #define FILE_ATTRIBUTE_NORMAL 0x0080
136 #define FILE_ATTRIBUTE_READONLY 0x0001
137 #define FILE_ATTRIBUTE_SYSTEM 0x0004
138 #define FILE_ATTRIBUTE_TEMPORARY 0x0100
139 #define FILE_ATTRIBUTE_ATOMIC_WRITE 0x0200
140 #define FILE_ATTRIBUTE_XACTION_WRITE 0x0400
142 #endif /* __WINE_KERNEL32_H */