Release 951212
[wine/gsoc-2012-control.git] / include / kernel32.h
blob501e8d8a55aecadbdaaa01de4b07956a7d3bb866
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;
18 /* Code page information.
20 typedef struct {
21 DWORD MaxCharSize;
22 BYTE DefaultChar[2];
23 BYTE LeadBytes[5];
24 } CPINFO, *LPCPINFO;
26 /* The 'overlapped' data structure used by async I/O functions.
28 typedef struct {
29 DWORD Internal;
30 DWORD InternalHigh;
31 DWORD Offset;
32 DWORD OffsetHigh;
33 HANDLE hEvent;
34 } OVERLAPPED, *LPOVERLAPPED;
36 /* Process startup information.
38 typedef struct {
39 DWORD cb;
40 LPSTR lpReserved;
41 LPSTR lpDesktop;
42 LPSTR lpTitle;
43 DWORD dwX;
44 DWORD dwY;
45 DWORD dwXSize;
46 DWORD dwYSize;
47 DWORD dwXCountChars;
48 DWORD dwYCountChars;
49 DWORD dwFillAttribute;
50 DWORD dwFlags;
51 WORD wShowWindow;
52 WORD cbReserved2;
53 BYTE *lpReserved2;
54 HANDLE hStdInput;
55 HANDLE hStdOutput;
56 HANDLE hStdError;
57 } STARTUPINFO, *LPSTARTUPINFO;
59 typedef struct {
60 WORD wYear;
61 WORD wMonth;
62 WORD wDayOfWeek;
63 WORD wDay;
64 WORD wHour;
65 WORD wMinute;
66 WORD wSecond;
67 WORD wMilliseconds;
68 } SYSTEMTIME, *LPSYSTEMTIME;
70 typedef struct {
71 LONG Bias;
72 WCHAR StandardName[32];
73 SYSTEMTIME StandardDate;
74 LONG StandardBias;
75 WCHAR DaylightName[32];
76 SYSTEMTIME DaylightDate;
77 LONG DaylightBias;
78 } TIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
80 #define TIME_ZONE_ID_UNKNOWN 0
81 #define TIME_ZONE_ID_STANDARD 1
82 #define TIME_ZONE_ID_DAYLIGHT 2
85 /* File object type definitions
87 #define FILE_TYPE_UNKNOWN 0
88 #define FILE_TYPE_DISK 1
89 #define FILE_TYPE_CHAR 2
90 #define FILE_TYPE_PIPE 3
91 #define FILE_TYPE_REMOTE 32768
93 /* File creation flags
95 #define GENERIC_READ 0x80000000L
96 #define GENERIC_WRITE 0x40000000L
97 #define CREATE_NEW 1
98 #define CREATE_ALWAYS 2
99 #define OPEN_EXISTING 3
100 #define OPEN_ALWAYS 4
101 #define TRUNCATE_EXISTING 5
103 /* Standard handle identifiers
105 #define STD_INPUT_HANDLE ((DWORD) -10)
106 #define STD_OUTPUT_HANDLE ((DWORD) -11)
107 #define STD_ERROR_HANDLE ((DWORD) -12)
109 /* The security attributes structure
111 typedef struct {
112 DWORD nLength;
113 void *lpSecurityDescriptor;
114 BOOL bInheritHandle;
115 } SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
117 typedef struct
119 int dwLowDateTime;
120 int dwHighDateTime;
121 } FILETIME;
123 typedef struct
125 int dwFileAttributes;
126 FILETIME ftCreationTime;
127 FILETIME ftLastAccessTime;
128 FILETIME ftLastWriteTime;
129 int dwVolumeSerialNumber;
130 int nFileSizeHigh;
131 int nFileSizeLow;
132 int nNumberOfLinks;
133 int nFileIndexHigh;
134 int nFileIndexLow;
135 } BY_HANDLE_FILE_INFORMATION ;
137 /* File attribute flags
139 #define FILE_ATTRIBUTE_ARCHIVE 0x0020
140 #define FILE_ATTRIBUTE_COMPRESSED 0x0800
141 #define FILE_ATTRIBUTE_DIRECTORY 0x0010
142 #define FILE_ATTRIBUTE_HIDDEN 0x0002
143 #define FILE_ATTRIBUTE_NORMAL 0x0080
144 #define FILE_ATTRIBUTE_READONLY 0x0001
145 #define FILE_ATTRIBUTE_SYSTEM 0x0004
146 #define FILE_ATTRIBUTE_TEMPORARY 0x0100
147 #define FILE_ATTRIBUTE_ATOMIC_WRITE 0x0200
148 #define FILE_ATTRIBUTE_XACTION_WRITE 0x0400
150 #endif /* __WINE_KERNEL32_H */