source: Include/api_system.sbp@ 68

Last change on this file since 68 was 68, checked in by dai, 17 years ago

MUTEX_ALL_ACCESS定数を追加。

File size: 55.8 KB
Line 
1' api_system.sbp - System API
2
3#ifndef _INC_SYSTEM
4#define _INC_SYSTEM
5
6
7'-------------------
8' default constants
9Const NULL = 0
10Const TRUE = 1
11Const FALSE = 0
12
13Const _System_TRUE = -1
14Const _System_FALSE = 0
15
16Const MAX_PATH = 260
17Const INVALID_HANDLE_VALUE = -1 As HANDLE
18Const INVALID_SET_FILE_POINTER = &HFFFFFFFF
19
20Const SYNCHRONIZE = &H00100000
21Const STANDARD_RIGHTS_REQUIRED = &H000F0000
22
23Const MAXIMUM_WAIT_OBJECTS = 64
24
25'-----------------
26' data structs
27Type LARGE_INTEGER
28 LowPart As DWord
29 HighPart As Long
30End Type
31Type ULARGE_INTEGER
32 LowPart As DWord
33 HighPart As DWord
34End Type
35
36
37'Globally Unique Identifier 128 bit(16 byte)
38Type GUID
39 Data1 As DWord
40 Data2 As Word
41 Data3 As Word
42 Data4[7] As Byte
43End Type
44
45' File structure
46Type SECURITY_ATTRIBUTES
47 nLength As DWord
48 lpSecurityDescriptor As VoidPtr
49 bInheritHandle As BOOL
50End Type
51
52Type OVERLAPPED
53 Internal As ULONG_PTR
54 InternalHigh As ULONG_PTR
55 Offset As DWord
56 OffsetHigh As DWord
57 hEvent As HANDLE
58End Type
59
60Type FILETIME
61 dwLowDateTime As DWord
62 dwHighDateTime As DWord
63End Type
64
65' System time
66Type SYSTEMTIME
67 wYear As Word
68 wMonth As Word
69 wDayOfWeek As Word
70 wDay As Word
71 wHour As Word
72 wMinute As Word
73 wSecond As Word
74 wMilliseconds As Word
75End Type
76
77#ifdef _WIN64
78Const CONTEXT_AMD64 = &h100000
79
80Const CONTEXT_CONTROL = (CONTEXT_AMD64 Or &h1)
81Const CONTEXT_INTEGER = (CONTEXT_AMD64 Or &h2)
82Const CONTEXT_SEGMENTS = (CONTEXT_AMD64 Or &h4)
83Const CONTEXT_FLOATING_POINT = (CONTEXT_AMD64 Or &h8)
84Const CONTEXT_DEBUG_REGISTERS = (CONTEXT_AMD64 Or &h10)
85
86Const CONTEXT_FULL = (CONTEXT_CONTROL Or CONTEXT_INTEGER Or CONTEXT_FLOATING_POINT)
87
88Const CONTEXT_ALL = (CONTEXT_CONTROL Or CONTEXT_INTEGER Or CONTEXT_SEGMENTS Or CONTEXT_FLOATING_POINT Or CONTEXT_DEBUG_REGISTERS)
89
90Type Align(16) M128
91 Low As QWord
92 High As Int64
93End Type
94
95Type LEGACY_SAVE_AREA 'Winnt.h
96 ControlWord As Word
97 Reserved0 As Word
98 StatusWord As Word
99 Reserved1 As Word
100 TagWord As Word
101 Reserved2 As Word
102 ErrorOffset As DWord
103 ErrorSelector As Word
104 ErrorOpcode As Word
105 DataOffset As DWord
106 DataSelector As Word
107 Reserved3 As Word
108 FloatRegisters[ELM(8 * 10)] As Byte
109End Type
110
111Type Align(16) CONTEXT 'Winnt.h
112 'Register parameter home addresses.
113 P1Home As QWord
114 P2Home As QWord
115 P3Home As QWord
116 P4Home As QWord
117 P5Home As QWord
118 P6Home As QWord
119 'Control flags.
120 ContextFlags As DWord
121 MxCsr As DWord
122 'Segment Registers and processor flags.
123 SegCs As Word
124 SegDs As Word
125 SegEs As Word
126 SegFs As Word
127 SegGs As Word
128 SegSs As Word
129 EFlags As DWord
130 'Debug registers
131 Dr0 As QWord
132 Dr1 As QWord
133 Dr2 As QWord
134 Dr3 As QWord
135 Dr6 As QWord
136 Dr7 As QWord
137 'Integer registers.
138 Rax As QWord
139 Rcx As QWord
140 Rdx As QWord
141 Rbx As QWord
142 Rsp As QWord
143 Rbp As QWord
144 Rsi As QWord
145 Rdi As QWord
146 R8 As QWord
147 R9 As QWord
148 R10 As QWord
149 R11 As QWord
150 R12 As QWord
151 R13 As QWord
152 R14 As QWord
153 R15 As QWord
154 'Program counter.
155 Rip As QWord
156 'MMX/floating point state.
157 Header[ELM(2)] As M128
158 Legacy[ELM(8)] As M128
159 Xmm0 As M128
160 Xmm1 As M128
161 Xmm2 As M128
162 Xmm3 As M128
163 Xmm4 As M128
164 Xmm5 As M128
165 Xmm6 As M128
166 Xmm7 As M128
167 Xmm8 As M128
168 Xmm9 As M128
169 Xmm10 As M128
170 Xmm11 As M128
171 Xmm12 As M128
172 Xmm13 As M128
173 Xmm14 As M128
174 Xmm15 As M128
175 Reserve[ELM(96)] As Byte
176 'Vector registers
177 VectorRegisters[ELM(26)] As M128
178 VectorControl As QWord
179 'Special debug control registers.
180 DebugControl As QWord
181 LastBranchToRip As QWord
182 LastBranchFromRip As QWord
183 LastExceptionToRip As QWord
184 LastExceptionFromRip As QWord
185End Type
186
187#else
188
189Const SIZE_OF_80387_REGISTERS = 80
190Const MAXIMUM_SUPPORTED_EXTENSION = 512
191
192Type FLOATING_SAVE_AREA
193 ControlWord As DWord
194 StatusWord As DWord
195 TagWord As DWord
196 ErrorOffset As DWord
197 ErrorSelector As DWord
198 DataOffset As DWord
199 DataSelector As DWord
200 RegisterArea[ELM(SIZE_OF_80387_REGISTERS)] As Byte
201 Cr0NpxState As DWord
202End Type
203
204Const CONTEXT_i386 = &h00010000
205Const CONTEXT_i486 = &h00010000
206
207Const CONTEXT_CONTROL = (CONTEXT_i386 Or &h00000001) 'SS:SP, CS:IP, FLAGS, BP
208Const CONTEXT_INTEGER = (CONTEXT_i386 Or &h00000002) 'AX, BX, CX, DX, SI, DI
209Const CONTEXT_SEGMENTS = (CONTEXT_i386 Or &h00000004) 'DS, ES, FS, GS
210Const CONTEXT_FLOATING_POINT = (CONTEXT_i386 Or &h00000008) '387 state
211Const CONTEXT_DEBUG_REGISTERS = (CONTEXT_i386 Or &h00000010) 'DB 0-3,6,7
212Const CONTEXT_EXTENDED_REGISTERS = (CONTEXT_i386 Or &h0000002) 'cpu specific extensions
213
214Const CONTEXT_FULL = (CONTEXT_CONTROL Or CONTEXT_INTEGER Or CONTEXT_SEGMENTS)
215
216Const CONTEXT_ALL = (CONTEXT_CONTROL Or CONTEXT_INTEGER Or CONTEXT_SEGMENTS Or CONTEXT_FLOATING_POINT Or CONTEXT_DEBUG_REGISTERS Or CONTEXT_EXTENDED_REGISTERS)
217
218Type CONTEXT
219 ContextFlags As DWord
220
221 Dr0 As DWord
222 Dr1 As DWord
223 Dr2 As DWord
224 Dr3 As DWord
225 Dr6 As DWord
226 Dr7 As DWord
227
228 FloatSave As FLOATING_SAVE_AREA
229
230 SegGs As DWord
231 SegFs As DWord
232 SegEs As DWord
233 SegDs As DWord
234
235 Edi As DWord
236 Esi As DWord
237 Ebx As DWord
238 Edx As DWord
239 Ecx As DWord
240 Eax As DWord
241
242 Ebp As DWord
243 Eip As DWord
244 SegCs As DWord
245 EFlags As DWord
246 Esp As DWord
247 SegSs As DWord
248
249 ExtendedRegisters[ELM(MAXIMUM_SUPPORTED_EXTENSION)] As Byte
250End Type
251
252#endif
253
254' Global Memory Flags
255Const GMEM_FIXED = &H0000
256Const GMEM_MOVEABLE = &H0002
257Const GMEM_NOCOMPACT = &H0010
258Const GMEM_NODISCARD = &H0020
259Const GMEM_ZEROINIT = &H0040
260Const GMEM_MODIFY = &H0080
261Const GMEM_DISCARDABLE = &H0100
262Const GMEM_NOT_BANKED = &H1000
263Const GMEM_SHARE = &H2000
264Const GMEM_DDESHARE = &H2000
265Const GMEM_INVALID_HANDLE = &H8000
266Const GHND = GMEM_MOVEABLE or GMEM_ZEROINIT
267Const GPTR = GMEM_FIXED or GMEM_ZEROINIT
268Const GMEM_DISCARDED = &H4000
269
270
271' Heap
272Const HEAP_NO_SERIALIZE = &H00000001
273Const HEAP_GROWABLE = &H00000002
274Const HEAP_GENERATE_EXCEPTIONS = &H00000004
275Const HEAP_ZERO_MEMORY = &H00000008
276Const HEAP_REALLOC_IN_PLACE_ONLY = &H00000010
277
278
279' Locale
280Const LOCALE_SYSTEM_DEFAULT = &H400 'Standard Systemsprache
281Const LOCALE_USER_DEFAULT = &H800 'Standard Benutzersprache
282
283
284' Locale flag
285Const LOCALE_NOUSEROVERRIDE = &H80000000
286
287
288'Critical Section
289Type CRITICAL_SECTION
290 DebugInfo As VoidPtr
291 LockCount As Long
292 RecursionCount As Long
293 OwningThread As HANDLE
294 LockSemaphore As HANDLE
295 SpinCount As ULONG_PTR
296End Type
297
298
299'DllMain
300Const DLL_PROCESS_ATTACH = 1
301Const DLL_THREAD_ATTACH = 2
302Const DLL_THREAD_DETACH = 3
303Const DLL_PROCESS_DETACH = 0
304
305'Event
306Const EVENT_MODIFY_STATE = &H0002
307Const EVENT_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &H3)
308
309'Mutex
310Const MUTANT_QUERY_STATE = &H0001
311Const MUTANT_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or MUTANT_QUERY_STATE)
312Const MUTEX_ALL_ACCESS = MUTANT_ALL_ACCESS
313
314'Semaphore
315Const SEMAPHORE_MODIFY_STATE = &H0002
316Const SEMAPHORE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &H3)
317
318'Timer
319Const TIMER_QUERY_STATE = &H0001
320Const TIMER_MODIFY_STATE = &H0002
321Const TIMER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or TIMER_QUERY_STATE Or TIMER_MODIFY_STATE)
322
323'----------------------
324' Kernel Operation API
325Declare Function InterlockedIncrement Lib "kernel32" (ByRef lpAddend As Long) As Long
326Declare Function InterlockedDecrement Lib "kernel32" (ByRef lpAddend As Long) As Long
327Declare Function InterlockedExchange Lib "kernel32" (ByRef Target As Long, Value As Long) As Long
328Declare Function InterlockedCompareExchange Lib "kernel32" (Destination As *VoidPtr, Exchange As VoidPtr, Comperand As VoidPtr) As VoidPtr
329Declare Function InterlockedExchangeAdd Lib "kernel32" (ByRef Addend As Long, Value As Long) As Long
330#ifdef _WIN64
331Declare Function InterlockedCompareExchangePointer Lib "kernel32" (Destination As *VoidPtr, Exchange As VoidPtr, Comperand As VoidPtr) As VoidPtr
332#else
333Declare Function InterlockedExchangePointer Lib "kernel32" Alias "InterlockedExchange" (ByRef Target As VoidPtr, Value As VoidPtr) As VoidPtr
334#endif
335Declare Function Beep Lib "kernel32" (dwFreq As DWord, dwDuration As DWord) As BOOL
336Declare Function CloseHandle Lib "kernel32" (hObject As HANDLE) As BOOL
337
338Declare Function CompareFileTime Lib "kernel32" (ByRef FileTime1 As FILETIME, ByRef FileTime2 As FILETIME) As Long
339
340Const NORM_IGNORECASE = &H00000001
341Const NORM_IGNORENONSPACE = &H00000002
342Const NORM_IGNORESYMBOLS = &H00000004
343Const SORT_STRINGSORT = &H00001000
344Const NORM_IGNOREKANATYPE = &H00010000
345Const NORM_IGNOREWIDTH = &H00020000
346Const CSTR_LESS_THAN = 1
347Const CSTR_EQUAL = 2
348Const CSTR_GREATER_THAN = 3
349Declare Function CompareString Lib "kernel32" Alias "CompareStringA" (Locale As LCID, dwCmpFlags As DWord, pString1 As PCSTR, cchCount1 As Long, pString2 As PCSTR, cchCount2 As Long) As Long
350
351Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (lpExistingFileName As LPCSTR, lpNewFileName As LPCSTR, bFailIfExists As BOOL) As BOOL
352Declare Function CreateDirectory Lib "kernel32" Alias "CreateDirectoryA" (lpPathName As LPCSTR, lpSecurityAttributes As *SECURITY_ATTRIBUTES) As BOOL
353Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (pEventAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, bInitialState As BOOL, pName As PCSTR) As HANDLE
354Declare Function CreateMutex Lib "kernel32" Alias "CreateMutexA" (lpMutexAttributes As *SECURITY_ATTRIBUTES, bInitialOwner As BOOL, lpName As PCSTR) As HANDLE
355Declare Function CreateSemaphore Lib "kernel32" Alias "CreateSemaphoreA" (lpSemaphoreAttributes As *SECURITY_ATTRIBUTES, lInitialCount As Long, lMaximumCount As Long, lpName As LPSTR) As HANDLE
356
357TypeDef PTIMERAPCROUTINE = *Sub(lpArgToCompletionRoutine As VoidPtr, dwTimerLowValue As DWord, dwTimerHighValue As DWord)
358Declare Function CreateWaitableTimer Lib "kernel32" Alias "CreateWaitableTimerA" (lpTimerAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, lpTimerName As LPSTR) As HANDLE
359Declare Function OpenWaitableTimer Lib "kernel32" Alias "OpenWaitableTimerA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpTimerName As LPSTR) As HANDLE
360Declare Function SetWaitableTimer Lib "kernel32" (hTimer As HANDLE, lpDueTime As *LARGE_INTEGER, lPeriod As Long, pfnCompletionRoutine As PTIMERAPCROUTINE, lpArgToCompletionRoutine As VoidPtr, fResume As BOOL) As BOOL
361Declare Function CancelWaitableTimer Lib "kernel32" (hTimer As HANDLE) As BOOL
362
363Const GENERIC_READ = &H80000000
364Const GENERIC_WRITE = &H40000000
365Const FILE_SHARE_READ = &H00000001
366Const FILE_SHARE_WRITE = &H00000002
367Const FILE_SHARE_DELETE = &H00000004
368Const CREATE_NEW = 1
369Const CREATE_ALWAYS = 2
370Const OPEN_EXISTING = 3
371Const OPEN_ALWAYS = 4
372Const TRUNCATE_EXISTING = 5
373Const FILE_ATTRIBUTE_READONLY = &H00000001
374Const FILE_ATTRIBUTE_HIDDEN = &H00000002
375Const FILE_ATTRIBUTE_SYSTEM = &H00000004
376Const FILE_ATTRIBUTE_DIRECTORY = &H00000010
377Const FILE_ATTRIBUTE_ARCHIVE = &H00000020
378Const FILE_ATTRIBUTE_ENCRYPTED = &H00000040
379Const FILE_ATTRIBUTE_NORMAL = &H00000080
380Const FILE_ATTRIBUTE_TEMPORARY = &H00000100
381Const FILE_ATTRIBUTE_SPARSE_FILE = &H00000200
382Const FILE_ATTRIBUTE_REPARSE_POINT = &H00000400
383Const FILE_ATTRIBUTE_COMPRESSED = &H00000800
384Const FILE_ATTRIBUTE_OFFLINE = &H00001000
385Const FILE_FLAG_WRITE_THROUGH = &H80000000
386Const FILE_FLAG_OVERLAPPED = &H40000000
387Const FILE_FLAG_NO_BUFFERING = &H20000000
388Const FILE_FLAG_RANDOM_ACCESS = &H10000000
389Const FILE_FLAG_SEQUENTIAL_SCAN = &H08000000
390Const FILE_FLAG_DELETE_ON_CLOSE = &H04000000
391Const FILE_FLAG_BACKUP_SEMANTICS = &H02000000
392Const FILE_FLAG_POSIX_SEMANTICS = &H01000000
393Const FILE_FLAG_OPEN_REPARSE_POINT = &H00200000
394Const FILE_FLAG_OPEN_NO_RECALL = &H00100000
395Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (lpFileName As *Byte, dwDesiredAccess As DWord, dwShareMode As DWord, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, dwCreationDisposition As DWord, dwFlagsAndAttributes As DWord, hTemplateFile As HANDLE) As HANDLE
396
397Const SECTION_QUERY = &H0001
398Const SECTION_MAP_WRITE = &H0002
399Const SECTION_MAP_READ = &H0004
400Const SECTION_MAP_EXECUTE = &H0008
401Const SECTION_EXTEND_SIZE = &H0010
402Const SECTION_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SECTION_QUERY Or SECTION_MAP_WRITE Or SECTION_MAP_READ Or SECTION_MAP_EXECUTE Or SECTION_EXTEND_SIZE)
403
404Const FILE_MAP_COPY = SECTION_QUERY
405Const FILE_MAP_WRITE = SECTION_MAP_WRITE
406Const FILE_MAP_READ = SECTION_MAP_READ
407Const FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS
408Declare Function CreateFileMapping Lib "kernel32" Alias "CreateFileMappingA" (hFile As HANDLE, lpFileMappingAttributes As *SECURITY_ATTRIBUTES, flProtect As DWord, dwMaximumSizeHigh As DWord, dwMaximumSizeLow As DWord, lpName As LPSTR) As HANDLE
409Declare Function OpenFileMapping Lib "kernel32" Alias "OpenFileMappingA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPSTR) As HANDLE
410Declare Function MapViewOfFile Lib "kernel32" (hFileMappingObject As HANDLE, dwDesiredAccess As DWord, dwFileOffsetHigh As DWord, dwFileOffsetLow As DWord, dwNumberOfBytesToMap As DWord) As VoidPtr
411Declare Function MapViewOfFileEx Lib "kernel32" (hFileMappingObject As HANDLE, dwDesiredAccess As DWord, dwFileOffsetHigh As DWord, dwFileOffsetLow As DWord, dwNumberOfBytesToMap As DWord, lpBaseAddress As VoidPtr) As VoidPtr
412Declare Function FlushViewOfFile Lib "kernel32" (lpBaseAddress As VoidPtr, dwNumberOfBytesToFlush As DWord) As BOOL
413Declare Function UnmapViewOfFile Lib "kernel32" (lpBaseAddress As VoidPtr) As BOOL
414
415Const MAILSLOT_WAIT_FOREVER = &HFFFFFFFF
416Declare Function CreateMailslot Lib "kernel32" Alias "CreateMailslotA" (lpName As *Byte, nMaxMessageSize As DWord, lReadTimeout As DWord, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES) As HANDLE
417
418Const DEBUG_PROCESS = &H00000001
419Const DEBUG_ONLY_THIS_PROCESS = &H00000002
420Const CREATE_SUSPENDED = &H00000004
421Const DETACHED_PROCESS = &H00000008
422Const CREATE_NEW_CONSOLE = &H00000010
423Const NORMAL_PRIORITY_CLASS = &H00000020
424Const IDLE_PRIORITY_CLASS = &H00000040
425Const HIGH_PRIORITY_CLASS = &H00000080
426Const REALTIME_PRIORITY_CLASS = &H00000100
427Const CREATE_NEW_PROCESS_GROUP = &H00000200
428Const CREATE_UNICODE_ENVIRONMENT = &H00000400
429Const CREATE_SEPARATE_WOW_VDM = &H00000800
430Const CREATE_SHARED_WOW_VDM = &H00001000
431Const CREATE_FORCEDOS = &H00002000
432Const CREATE_DEFAULT_ERROR_MODE = &H04000000
433Const CREATE_NO_WINDOW = &H08000000
434Const PROFILE_USER = &H10000000
435Const PROFILE_KERNEL = &H20000000
436Const PROFILE_SERVER = &H40000000
437
438Const STARTF_USESHOWWINDOW = &H00000001
439Const STARTF_USESIZE = &H00000002
440Const STARTF_USEPOSITION = &H00000004
441Const STARTF_USECOUNTCHARS = &H00000008
442Const STARTF_USEFILLATTRIBUTE = &H00000010
443Const STARTF_RUNFULLSCREEN = &H00000020
444Const STARTF_FORCEONFEEDBACK = &H00000040
445Const STARTF_FORCEOFFFEEDBACK = &H00000080
446Const STARTF_USESTDHANDLES = &H00000100
447Const STARTF_USEHOTKEY = &H00000200
448Type STARTUPINFO
449 cb As DWord
450 lpReserved As *Byte
451 lpDesktop As *Byte
452 lpTitle As *Byte
453 dwX As DWord
454 dwY As DWord
455 dwXSize As DWord
456 dwYSize As DWord
457 dwXCountChars As DWord
458 dwYCountChars As DWord
459 dwFillAttribute As DWord
460 dwFlags As DWord
461 wShowWindow As Word
462 cbReserved2 As Word
463 lpReserved2 As *Byte
464 hStdInput As HANDLE
465 hStdOutput As HANDLE
466 hStdError As HANDLE
467End Type
468Type PROCESS_INFORMATION
469 hProcess As HANDLE
470 hThread As HANDLE
471 dwProcessId As DWord
472 dwThreadId As DWord
473End Type
474Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (lpApplicationName As BytePtr, lpCommandLine As BytePtr, ByRef lpProcessAttributes As SECURITY_ATTRIBUTES, ByRef lpThreadAttributes As SECURITY_ATTRIBUTES, bInheritHandles As BOOL, dwCreationFlags As DWord, lpEnvironment As VoidPtr, lpCurrentDirectory As BytePtr, ByRef lpStartupInfo As STARTUPINFO, ByRef lpProcessInformation As PROCESS_INFORMATION) As BOOL
475
476TypeDef LPTHREAD_START_ROUTINE = *Function(lpThreadParameter As VoidPtr) As DWord
477Declare Function CreateThread Lib "kernel32" Alias "CreateThread" (lpThreadAttributes As *SECURITY_ATTRIBUTES, dwStackSize As DWord, lpStartAddress As LPTHREAD_START_ROUTINE, lpParameter As VoidPtr, dwCreationFlags As DWord, ByRef lpThreadId As DWord) As HANDLE
478
479Declare Sub DebugBreak Lib "kernel32" ()
480Declare Sub DeleteCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
481Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (pFileName As PCSTR) As BOOL
482Declare Function DeviceIoControl Lib "Kernel32" (
483 hDevice As HANDLE,
484 dwIoControlCode As DWord,
485 pInBuffer As VoidPtr,
486 nInBufferSize As DWord,
487 pOutBuffer As VoidPtr,
488 nOutBufferSize As DWord,
489 pBytesReturned As DWordPtr,
490 pOverlapped As *OVERLAPPED
491) As Long
492Declare Function DisableThreadLibraryCalls Lib "kernel32" (hLibModule As HINSTANCE) As BOOL
493Declare Function DosDateTimeToFileTime Lib "kernel32" (wFatDate As Word, wFatTime As Word, ByRef lpFileTime As FILETIME) As BOOL
494
495Const DUPLICATE_CLOSE_SOURCE = 1
496Const DUPLICATE_SAME_ACCESS = 2
497Declare Function DuplicateHandle Lib "kernel32" (hSourceProcessHandle As HANDLE, hSourceHandle As HANDLE, hTargetProcessHandle As HANDLE, ByRef TargetHandle As HANDLE, dwDesiredAccess As DWord, bInheritHandle As BOOL, dwOptions As DWord) As BOOL
498
499Declare Sub EnterCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
500Declare Sub ExitProcess Lib "kernel32" (dwExitCode As DWord)
501Declare Sub ExitThread Lib "kernel32" (dwExitCode As DWord)
502Declare Sub FatalAppExit Lib "kernel32" Alias "FatalAppExitA" (Action As DWord, pMessageText As PCSTR)
503Declare Function FileTimeToDosDateTime Lib "kernel32" (ByRef lpFileTime As FILETIME, ByRef lpFatDate As Word, ByRef lpFatTime As Word) As BOOL
504Declare Function FileTimeToLocalFileTime Lib "kernel32" (ByRef lpFileTime As FILETIME, ByRef lpLocalFileTime As FILETIME) As BOOL
505Declare Function FileTimeToSystemTime Lib "kernel32" (ByRef lpFileTime As FILETIME, ByRef lpSystemTime As SYSTEMTIME) As BOOL
506Declare Sub FillMemory Lib "kernel32" Alias "RtlFillMemory" (pDest As VoidPtr, stLength As SIZE_T, c As Byte)
507Declare Function FindClose Lib "kernel32" (hFindFile As HANDLE) As BOOL
508Declare Function FindCloseChangeNotification Lib "kernel32" (hChangeHandle As HANDLE) As BOOL
509Declare Function FindFirstChangeNotification Lib "kernel32" Alias "FindFirstChangeNotificationA" (
510 pPathName As PCSTR,
511 bWatchSubtree As BOOL,
512 dwNotifyFilter As DWord
513) As HANDLE
514
515Type WIN32_FIND_DATA
516 dwFileAttributes As DWord
517 ftCreationTime As FILETIME
518 ftLastAccessTime As FILETIME
519 ftLastWriteTime As FILETIME
520 nFileSizeHigh As DWord
521 nFileSizeLow As DWord
522 dwReserved0 As DWord
523 dwReserved1 As DWord
524 cFileName[ELM(MAX_PATH)] As Byte
525 cAlternateFileName[13] As Byte
526End Type
527TypeDef LPWIN32_FIND_DATA = *WIN32_FIND_DATA
528Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (lpFileName As BytePtr, ByRef lpFindFildData As WIN32_FIND_DATA) As HANDLE
529Declare Function FindNextChangeNotification Lib "kernel32" (hChangeHandle As HANDLE) As BOOL
530Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" (hFindFile As HANDLE, ByRef lpFindFildData As WIN32_FIND_DATA) As BOOL
531Declare Function FlushFileBuffers Lib "kernel32" (hFile As HANDLE) As BOOL
532Declare Function FlushInstructionCache Lib "kernel32"(hProcess As HANDLE, pBaseAddress As VoidPtr, Size As SIZE_T) As BOOL
533
534Const FORMAT_MESSAGE_ALLOCATE_BUFFER = &H00000100
535Const FORMAT_MESSAGE_IGNORE_INSERTS = &H00000200
536Const FORMAT_MESSAGE_FROM_STRING = &H00000400
537Const FORMAT_MESSAGE_FROM_HMODULE = &H00000800
538Const FORMAT_MESSAGE_FROM_SYSTEM = &H00001000
539Const FORMAT_MESSAGE_ARGUMENT_ARRAY = &H00002000
540Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (dwFlags As DWord, lpSource As VoidPtr, dwMessageId As DWord, dwLanguageId As DWord, lpBuffer As BytePtr, nSize As DWord, Arguments As DWordPtr) As DWord
541Declare Function FreeEnvironmentStrings Lib "kernel32" Alias "FreeEnvironmentStringsA" (pszEnvironmentBlock As PCSTR) As BOOL
542Declare Function FreeLibrary Lib "kernel32" (hLibModule As HINSTANCE) As BOOL
543Declare Sub FreeLibraryAndExitThread Lib "kernel32" (hModule As HANDLE, dwExitCode As DWord)
544Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As BytePtr
545Declare Function GetCompressedFileSize Lib "kernel32" Alias "GetCompressedFileSizeA" (lpFileName As BytePtr, ByRef lpFileSizeHigh As DWord) As DWord
546
547Const MAX_COMPUTERNAME_LENGTH=15
548Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (lpBuffer As BytePtr, ByRef nSize As Long) As Long
549
550Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA" (nBufferLength As DWord, lpBuffer As BytePtr) As DWord
551Declare Function GetCurrentProcess Lib "kernel32" () As HANDLE
552Declare Function GetCurrentProcessId Lib "kernel32" () As DWord
553Declare Function GetCurrentThread Lib "kernel32" () As HANDLE
554Declare Function GetCurrentThreadId Lib "kernel32" () As DWord
555
556Const DATE_SHORTDATE = &H00000001
557Const DATE_LONGDATE = &H00000002
558Const DATE_USE_ALT_CALENDAR = &H00000004
559Declare Function GetDateFormat Lib "kernel32" Alias "GetDateFormatA" (Locale As LCID, dwFlags As DWord, ByRef lpDate As SYSTEMTIME, lpFormat As BytePtr, lpDateStr As BytePtr, cchDate As Long) As Long
560
561Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (lpRootPathName As BytePtr, lpSectorsPerCluster As *DWord, lpBytesPerSector As *DWord, lpNumberOfFreeClusters As *DWord, lpTotalNumberOfClusters As *DWord) As BOOL
562Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias "GetDiskFreeSpaceExA" (lpDirectoryName As BytePtr, ByRef lpFreeBytesAvailableToCaller As ULARGE_INTEGER, ByRef lpTotalNumberOfBytes As ULARGE_INTEGER, ByRef lpTotalNumberOfFreeBytes As ULARGE_INTEGER) As BOOL
563
564Const DRIVE_UNKNOWN = 0
565Const DRIVE_NO_ROOT_DIR = 1
566Const DRIVE_REMOVABLE = 2
567Const DRIVE_FIXED = 3
568Const DRIVE_REMOTE = 4
569Const DRIVE_CDROM = 5
570Const DRIVE_RAMDISK = 6
571Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" (lpRootPathName As LPCSTR, lpVolumeNameBuffer As LPSTR, nVolumeNameSize As DWord, lpVolumeSerialNumber As *Word, lpMaximumComponentLength As *Word, lpFileSystemFlags As *Word, lpFileSystemNameBuffer As LPSTR, nFileSystemNameSize As DWord) As BOOL
572Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (lpRootPathName As BytePtr) As DWord
573
574Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" (lpName As BytePtr, lpBuffer As BytePtr, nSize As DWord) As DWord
575Declare Function GetEnvironmentStrings Lib "kernel32" Alias "GetEnvironmentStringsA" () As VoidPtr
576Const STILL_ACTIVE = &H00000103
577Declare Function GetExitCodeProcess Lib "kernel32" (hProcess As HANDLE, ByRef lpExitCode As DWord) As BOOL
578Declare Function GetExitCodeThread Lib "kernel32" (hThread As HANDLE, ByRef lpExitCode As DWord) As BOOL
579
580Declare Function GetFileAttributes Lib "kernel32" Alias "GetFileAttributesA" (lpFileName As BytePtr) As DWord
581Type BY_HANDLE_FILE_INFORMATION
582 dwFileAttributes As DWord
583 ftCreationTime As FILETIME
584 ftLastAccessTime As FILETIME
585 ftLastWriteTime As FILETIME
586 dwVolumeSerialNumber As DWord
587 nFileSizeHigh As DWord
588 nFileSizeLow As DWord
589 nNumberOfLinks As DWord
590 nFileIndexHigh As DWord
591 nFileIndexLow As DWord
592End Type
593Declare Function GetFileInformationByHandle Lib "kernel32" (
594 ByVal hFile As HANDLE,
595 ByRef FileInformation As BY_HANDLE_FILE_INFORMATION
596) As BOOL
597Declare Function GetFileSize Lib "kernel32" (hFile As HANDLE, lpFileSizeHigh As DWordPtr) As DWord
598Declare Function GetFileTime Lib "kernel32" (hFile As HANDLE, ByRef lpCreationTime As FILETIME, ByRef lpLastAccessTime As FILETIME, ByRef lpLastWriteTime As FILETIME) As BOOL
599
600Const FILE_TYPE_UNKNOWN = &H0000
601Const FILE_TYPE_DISK = &H0001
602Const FILE_TYPE_CHAR = &H0002
603Const FILE_TYPE_PIPE = &H0003
604Const FILE_TYPE_REMOTE = &H8000
605Declare Function GetFileType Lib "kernel32" (hFile As HANDLE) As DWord
606
607Declare Function GetFullPathName Lib "kernel32" Alias "GetFullPathNameA" (lpFileName As PCSTR, nBufferLength As DWord, pBuffer As PSTR, lpFilePart As *DWord) As DWord
608Declare Function GetLastError Lib "kernel32" () As DWord
609Declare Sub GetLocalTime Lib "kernel32" (ByRef lpSystemTime As SYSTEMTIME)
610Declare Function GetLogicalDrives Lib "kernel32" () As DWord
611Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA" (nBufferLength As DWord, pBuffer As PSTR) As DWord
612Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (hModule As HINSTANCE, lpFileName As BytePtr, nSize As DWord) As DWord
613Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (lpModuleName As BytePtr) As HINSTANCE
614Declare Function GetOverlappedResult Lib "kernel32" (
615 hFile As HANDLE,
616 pOverlapped As *OVERLAPPED,
617 pNumberOfBytesTransferred AS *DWord,
618 bWait As BOOL
619) As BOOL
620Declare Function GetPriorityClass Lib "kernel32" (hProcess As HANDLE) As DWord
621Declare Function GetProcAddress Lib "kernel32" (hModule As HINSTANCE, lpProcName As BytePtr) As DWord
622Declare Function GetProcessAffinityMask Lib "kernel32" (
623 hProcess As HANDLE,
624 ByRef ProcessAffinityMask As ULONG_PTR,
625 ByRef SystemAffinityMask As ULONG_PTR
626) As BOOL
627Declare Function GetProcessHeap Lib "kernel32" () As HANDLE
628Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (
629 pszLongPath As PCSTR,
630 pszShortPath As PSTR,
631 cchBuffer As DWord
632) As DWord
633
634Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (ByRef lpStartupInfo As STARTUPINFO)
635
636Const STD_INPUT_HANDLE = -10
637Const STD_OUTPUT_HANDLE = -11
638Const STD_ERROR_HANDLE = -12
639Declare Function GetStdHandle Lib "kernel32" (nStdHandle As DWord) As HANDLE
640
641Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (pBuffer As PSTR, uSize As DWord) As DWord
642
643Type SYSTEM_INFO
644 dwOemId As DWord
645 dwPageSize As DWord
646 lpMinimumApplicationAddress As VoidPtr
647 lpMaximumApplicationAddress As VoidPtr
648 dwActiveProcessorMask As ULONG_PTR
649 dwNumberOfProcessors As DWord
650 dwProcessorType As DWord
651 dwAllocationGranularity As DWord
652 wProcessorLevel As Word
653 wProcessorRevision As Word
654End Type
655Declare Sub GetSystemInfo Lib "kernel32" (ByRef lpSystemInfo As SYSTEM_INFO)
656
657Declare Sub GetSystemTime Lib "kernel32" (ByRef SystemTime As SYSTEMTIME)
658Declare Sub GetSystemTimeAsFileTime Lib "kernel32" (ByRef SystemTimeAsFileTime As FILETIME)
659
660Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (
661 pPathName As PCSTR,
662 pPrefixString As PCSTR,
663 uUnique As DWord,
664 pTempFileName As PSTR
665) As DWord
666Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (nBufferLength As DWord, lpBuffer As BytePtr) As DWord
667Declare Function GetThreadContext Lib "kernel32" (hThread As HANDLE, ByRef Context As CONTEXT) As BOOL
668
669Const THREAD_BASE_PRIORITY_LOWRT = 15
670Const THREAD_BASE_PRIORITY_MAX = 2
671Const THREAD_BASE_PRIORITY_MIN = -2
672Const THREAD_BASE_PRIORITY_IDLE = -15
673Const THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN
674Const THREAD_PRIORITY_BELOW_NORMAL = THREAD_PRIORITY_LOWEST+1
675Const THREAD_PRIORITY_NORMAL = 0
676Const THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX
677Const THREAD_PRIORITY_ABOVE_NORMAL = THREAD_PRIORITY_HIGHEST-1
678Const THREAD_PRIORITY_ERROR_RETURN = LONG_MAX
679Const THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT
680Const THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE
681Declare Function GetThreadPriority Lib "kernel32" (hThread As HANDLE) As Long
682Declare Function GetThreadPriorityBoost Lib "kernel32" (
683 hThread As HANDLE,
684 ByRef pDisablePriorityBoost As BOOL) As BOOL
685Declare Function GetTickCount Lib "kernel32" () As DWord
686
687Const TIME_NOMINUTESORSECONDS = &H00000001
688Const TIME_NOSECONDS = &H00000002
689Const TIME_NOTIMEMARKER = &H00000004
690Const TIME_FORCE24HOURFORMAT = &H00000008
691Declare Function GetTimeFormat Lib "kernel32" Alias "GetTimeFormatA" (Locale As LCID, dwFlags As DWord, ByRef lpTime As SYSTEMTIME, lpFormat As BytePtr, lpTimeStr As BytePtr, cchTime As DWord) As BOOL
692
693Declare Function GetUserDefaultLCID Lib "kernel32" () As LCID
694Declare Function GetUserName Lib "advapi32" Alias "GetUserNameA" (pBuffer As PSTR, ByRef nSize As DWord) As BOOL
695
696Const VER_PLATFORM_WIN32s = 0
697Const VER_PLATFORM_WIN32_WINDOWS = 1
698Const VER_PLATFORM_WIN32_NT = 2
699Type OSVERSIONINFO
700 dwOSVersionInfoSize As DWord
701 dwMajorVersion As DWord
702 dwMinorVersion As DWord
703 dwBuildNumber As DWord
704 dwPlatformId As DWord
705 szCSDVersion[127] As Byte
706End Type
707Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (ByRef lpVersionInformation As OSVERSIONINFO) As BOOL
708
709Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (pBuffer As PSTR, uSize As DWord) As DWord
710Declare Function GlobalAlloc Lib "kernel32" (uFlags As DWord, dwBytes As SIZE_T) As HGLOBAL
711Declare Function GlobalFrags Lib "kernel32" (hMem As HGLOBAL) As DWord
712Declare Function GlobalFree Lib "kernel32" (hMem As HGLOBAL) As HGLOBAL
713Declare Function GlobalHandle Lib "kernel32" (pMem As VoidPtr) As HGLOBAL
714Declare Function GlobalLock Lib "kernel32" (hMem As HGLOBAL) As VoidPtr
715
716Type MEMORYSTATUS
717 dwLength As DWord
718 dwMemoryLoad As DWord
719 dwTotalPhys As SIZE_T
720 dwAvailPhys As SIZE_T
721 dwTotalPageFile As SIZE_T
722 dwAvailPageFile As SIZE_T
723 dwTotalVirtual As SIZE_T
724 dwAvailVirtual As SIZE_T
725End Type
726Declare Sub GlobalMemoryStatus Lib "kernel32" (ByRef lpMemStatus As MEMORYSTATUS)
727
728Declare Function GlobalReAlloc Lib "kernel32" (hMem As HGLOBAL, dwBytes As SIZE_T, uFlags As DWord) As HGLOBAL
729Declare Function GlobalSize Lib "kernel32" (hMem As HGLOBAL) As SIZE_T
730Declare Function GlobalUnlock Lib "kernel32" (hMem As HGLOBAL) As BOOL
731Declare Function HeapAlloc Lib "kernel32" (hHeap As HANDLE, dwFlags As DWord, dwBytes As SIZE_T) As VoidPtr
732Declare Function HeapCreate Lib "kernel32" (flOptions As DWord, dwInitialSize As SIZE_T, dwMaximumSize As SIZE_T) As HANDLE
733Declare Function HeapDestroy Lib "kernel32" (hHeap As HANDLE) As Long
734Declare Function HeapFree Lib "kernel32" (hHeap As HANDLE, dwFlags As DWord, lpMem As VoidPtr) As Long
735Declare Function HeapReAlloc Lib "kernel32" (hHeap As HANDLE, dwFlags As DWord, lpMem As VoidPtr, dwBytes As SIZE_T) As VoidPtr
736Declare Function HeapSize Lib "kernel32" (hHeap As HANDLE, dwFlags As DWord, lpMem As VoidPtr) As SIZE_T
737Declare Sub InitializeCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
738Declare Function IsBadReadPtr Lib "kernel32" (lp As VoidPtr, ucb As ULONG_PTR) As BOOL
739Declare Function IsBadWritePtr Lib "kernel32" (lp As VoidPtr, ucb As DWord) As BOOL
740Declare Function IsDBCSLeadByte Lib "kernel32" (TestChar As Byte) As BOOL
741
742#ifdef _WIN64
743Declare Function IsWow64Process Lib "kernel32" (hProcess As HANDLE, ByRef bWow64Process As BOOL) As BOOL
744#endif
745
746Const LCMAP_LOWERCASE = &H00000100 ' lower case letters
747Const LCMAP_UPPERCASE = &H00000200 ' upper case letters
748Const LCMAP_SORTKEY = &H00000400 ' WC sort key (normalize)
749Const LCMAP_BYTEREV = &H00000800 ' byte reversal
750Const LCMAP_HIRAGANA = &H00100000 ' map katakana to hiragana
751Const LCMAP_KATAKANA = &H00200000 ' map hiragana to katakana
752Const LCMAP_HALFWIDTH = &H00400000 ' map double byte to single byte
753Const LCMAP_FULLWIDTH = &H00800000 ' map single byte to double byte
754Const LCMAP_LINGUISTIC_CASING = &H01000000 ' use linguistic rules for casing
755Const LCMAP_SIMPLIFIED_CHINESE = &H02000000 ' map traditional chinese to simplified chinese
756Const LCMAP_TRADITIONAL_CHINESE = &H04000000 ' map simplified chinese to traditional chinese
757Declare Function LCMapString Lib "kernel32" Alias "LCMapStringA" (Locale As LCID, dwMapFlags As DWord, lpSrcStr As LPCSTR, cchSrc As Long, lpDestStr As LPSTR, cchDest As Long) As Long
758
759Declare Sub LeaveCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
760Declare Function LocalAlloc Lib "kernel32" (uFlags As DWord, uBytes As SIZE_T) As HLOCAL
761Declare Function LocalFileTimeToFileTime Lib "kernel32" (ByRef lpLocalFileTime As FILETIME, ByRef lpFileTime As FILETIME) As BOOL
762Declare Function LocalFree Lib "kernel32" (hMem As HLOCAL) As HLOCAL
763Declare Function LocalHandle Lib "kernel32" (pMem As VoidPtr) As HLOCAL
764Declare Function LocalLock Lib "kernel32" (hMem As HLOCAL) As VoidPtr
765Declare Function LocalReAlloc Lib "kernel32" (hMem As HLOCAL, dwBytes As SIZE_T, uFlags As DWord) As HLOCAL
766Declare Function LocalSize Lib "kernel32" (hMem As HLOCAL) As SIZE_T
767Declare Function LocalUnlock Lib "kernel32" (hMem As HLOCAL) As BOOL
768Declare Function LockFile Lib "kernel32" (hFile As DWord, dwFileOffsetLow As DWord, dwFileOffsetHigh As DWord, nNumberOfBytesToLockLow As DWord, nNumberOfBytesToLockHigh As DWord) As BOOL
769Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (pLibFileName As PCSTR) As HINSTANCE
770
771Const DONT_RESOLVE_DLL_REFERENCES = &h00000001
772Const LOAD_LIBRARY_AS_DATAFILE = &h00000002
773Const LOAD_WITH_ALTERED_SEARCH_PATH = &h00000008
774Const LOAD_IGNORE_CODE_AUTHZ_LEVEL = &h00000010
775Declare Function LoadLibraryEx Lib "kernel32" Alias "LoadLibraryExA" (pLibFileName As PCSTR, hFile As HANDLE, dwFlags As DWord) As HINSTANCE
776
777Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (lpString1 As BytePtr, lpString2 As BytePtr) As BytePtr
778Declare Function lstrcmp Lib "kernel32" Alias "lstrcmpA" (lpString1 As BytePtr, lpString2 As BytePtr) As Long
779Declare Function lstrcmpi Lib "kernel32" Alias "lstrcmpiA" (lpString1 As BytePtr, lpString2 As BytePtr) As Long
780Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (lpString1 As BytePtr, lpString2 As BytePtr) As BytePtr
781Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (lpString As BytePtr) As Long
782Declare Sub memcpy Lib "kernel32" Alias "RtlMoveMemory" (pDest As VoidPtr, pSrc As VoidPtr, length As SIZE_T)
783Declare Function MoveFile Lib "kernel32" Alias "MoveFileA" (lpExistingFileName As BytePtr, lpNewFileName As BytePtr) As BOOL
784Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As VoidPtr, pSrc As VoidPtr, length As SIZE_T)
785
786Declare Function MulDiv Lib "kernel32" (
787 nNumber As Long,
788 nNumerator As Long,
789 nDenominator As Long
790) As Long
791
792Const CP_ACP = 0 'default to ANSI code page
793Const CP_OEMCP = 1 'default to OEM code page
794Const CP_MACCP = 2 'default to MAC code page
795Const CP_THREAD_ACP = 3 'current thread's ANSI code page
796Const CP_SYMBOL = 42 'SYMBOL translations
797Const CP_UTF7 = 65000 'UTF-7 translation
798Const CP_UTF8 = 65001 'UTF-8 translation
799
800Declare Function MultiByteToWideChar Lib "kernel32" (CodePage As DWord, dwFlags As DWord, lpMultiByteStr As BytePtr, cchMultiByte As Long, lpWideCharStr As WordPtr, cchWideChar As Long) As Long
801
802Declare Function OpenEvent Lib "kernel32" Alias "OpenEventA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, pName As PCSTR) As HANDLE
803Declare Function OpenMutex Lib "kernel32" Alias "OpenMutexA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPSTR) As HANDLE
804Declare Function OpenSemaphore Lib "kernel32" Alias "OpenSemaphoreA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPSTR) As HANDLE
805
806Const PROCESS_TERMINATE = &H0001
807Const PROCESS_CREATE_THREAD = &H0002
808Const PROCESS_SET_SESSIONID = &H0004
809Const PROCESS_VM_OPERATION = &H0008
810Const PROCESS_VM_READ = &H0010
811Const PROCESS_VM_WRITE = &H0020
812Const PROCESS_DUP_HANDLE = &H0040
813Const PROCESS_CREATE_PROCESS = &H0080
814Const PROCESS_SET_QUOTA = &H0100
815Const PROCESS_SET_INFORMATION = &H0200
816Const PROCESS_QUERY_INFORMATION = &H0400
817Const PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or &HFFF
818Declare Function OpenProcess Lib "kernel32" (dwDesiredAccess As DWord, bInheritHandle As Long, dwProcessId As DWord) As HANDLE
819
820Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (lpOutputString As BytePtr)
821Declare Function PulseEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
822Declare Sub RaiseException Lib "kernel32" (
823 dwExceptionCode As DWord,
824 dwExceptionFlags As DWord,
825 NumberOfArguments As DWord,
826 pArguments As *ULONG_PTR)
827Declare Function ReadFile Lib "kernel32" (hFile As HANDLE, lpBuffer As VoidPtr, nNumberOfBytesToRead As DWord, lpNumberOfBytesRead As DWordPtr, ByRef lpOverlapped As OVERLAPPED) As BOOL
828Declare Function ReleaseMutex Lib "kernel32" (hMutex As HANDLE) As BOOL
829Declare Function ReleaseSemaphore Lib "kernel32" (hSemaphore As HANDLE, lReleaseCount As Long, ByRef lpPreviousCount As Long) As BOOL
830Declare Function RemoveDirectory Lib "kernel32" Alias "RemoveDirectoryA" (lpPathName As BytePtr) As BOOL
831Declare Function ResetEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
832Declare Function ResumeThread Lib "kernel32" (hThread As HANDLE) As DWord
833Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (lpComputerName As BytePtr) As BOOL
834Declare Function SetCurrentDirectory Lib "kernel32" Alias "SetCurrentDirectoryA" (lpPathName As BytePtr) As BOOL
835Declare Function SetEndOfFile Lib "kernel32" (hFile As HANDLE) As BOOL
836Declare Function SetEnvironmentVariable Lib "kernel32" Alias "SetEnvironmentVariableA" (lpName As BytePtr, lpValue As BytePtr) As BOOL
837
838Const SEM_FAILCRITICALERRORS = &h0001
839Const SEM_NOGPFAULTERRORBOX = &h0002
840Const SEM_NOALIGNMENTFAULTEXCEPT = &h0004
841Const SEM_NOOPENFILEERRORBOX = &h8000
842Declare Function SetErrorMode Lib "kernel32" (uMode As DWord) As DWord
843Declare Function SetEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
844Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" (lpFileName As BytePtr, dwFileAttributes As DWord) As BOOL
845
846Const FILE_BEGIN = 0
847Const FILE_CURRENT = 1
848Const FILE_END = 2
849Declare Function SetFilePointer Lib "kernel32" (hFile As HANDLE, lDistanceToMove As Long, lpDistanceToMoveHigh As DWordPtr, dwMoveMethod As DWord) As DWord
850
851Declare Function SetFileTime Lib "kernel32" (hFile As HANDLE, ByRef lpCreationTime As FILETIME, ByRef lpLastAccessTime As FILETIME, ByRef lpLastWriteTime As FILETIME) As BOOL
852Declare Function SetLastError Lib "kernel32" (dwErrCode As DWord)
853Declare Function SetLastErrorEx Lib "kernel32" (dwErrCode As DWord, dwType As DWord)
854Declare Function SetLocalTime Lib "kernel32" (ByRef lpSystemTime As SYSTEMTIME) As BOOL
855Declare Function SetPriorityClass Lib "kernel32" (hProcess As HANDLE, dwPriorityClass As DWord) As BOOL
856Declare Function SetThreadContext Lib "kernel32" (hThread As HANDLE, ByRef Context As CONTEXT) As BOOL
857Declare Function SetThreadPriority Lib "kernel32" (hThread As HANDLE, nPriority As Long) As BOOL
858Declare Function SetThreadPriorityBoost Lib "kernel32" (
859 hThread As HANDLE,
860 DisablePriorityBoost As BOOL
861) As BOOL
862
863Const EXCEPTION_MAXIMUM_PARAMETERS = ELM(15)
864
865Type EXCEPTION_RECORD
866 ExceptionCode As DWord
867 ExceptionFlags As DWord
868 ExceptionRecord As *EXCEPTION_RECORD
869 ExceptionAddress As VoidPtr
870 NumberParameters As DWord
871 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS] As ULONG_PTR
872End Type
873
874Type EXCEPTION_POINTERS
875 ExceptionRecord As *EXCEPTION_RECORD
876 ContextRecord As *CONTEXT
877End Type
878
879TypeDef PTOP_LEVEL_EXCEPTION_FILTER = *Function(ByRef ExceptionInfo As EXCEPTION_POINTERS) As Long
880
881Declare Function SetUnhandledExceptionFilter Lib "kernel32" (pTopLevelExceptionFilter As PTOP_LEVEL_EXCEPTION_FILTER) As PTOP_LEVEL_EXCEPTION_FILTER
882
883Const INFINITE = &HFFFFFFFF
884Declare Sub Sleep Lib "kernel32" (dwMilliseconds As DWord)
885Declare Function SleepEx Lib "kernel32" (dwMilliseconds As DWord, bAlertable As BOOL) As DWord
886
887Declare Function SuspendThread Lib "kernel32" (hThread As HANDLE) As DWord
888Declare Function SystemTimeToFileTime Lib "kernel32" (ByRef lpSystemTime As SYSTEMTIME, ByRef lpFileTime As FILETIME) As BOOL
889Declare Function TerminateProcess Lib "kernel32" (hProcess As HANDLE, dwExitCode As DWord) As BOOL
890Declare Function TerminateThread Lib "kernel32" (hThread As HANDLE, dwExitCode As DWord) As BOOL
891Declare Function TlsAlloc Lib "kernel32" () As DWord
892Declare Function TlsFree Lib "kernel32" (dwTlsIndex As DWord) As BOOL
893Declare Function TlsGetValue Lib "kernel32" (dwTlsIndex As DWord) As VoidPtr
894Declare Function TlsSetValue Lib "kernel32" (dwTlsIndex As DWord, pTlsValue As VoidPtr) As BOOL
895Declare Function UnlockFile Lib "kernel32" (hFile As HANDLE, dwFileOffsetLow As DWord, dwFileOffsetHigh As DWord, nNumberOfBytesToUnlockLow As DWord, nNumberOfBytesToUnlockHigh As DWord) As BOOL
896Declare Function UnhandledExceptionFilter Lib "kernel32" (ByRef ExceptionInfo As EXCEPTION_POINTERS) As Long
897
898Const PAGE_NOACCESS = &H01
899Const PAGE_READONLY = &H02
900Const PAGE_READWRITE = &H04
901Const PAGE_WRITECOPY = &H08
902Const PAGE_EXECUTE = &H10
903Const PAGE_EXECUTE_READ = &H20
904Const PAGE_EXECUTE_READWRITE = &H40
905Const PAGE_EXECUTE_WRITECOPY = &H80
906Const PAGE_GUARD = &H100
907Const PAGE_NOCACHE = &H200
908Const PAGE_WRITECOMBINE = &H400
909Const MEM_COMMIT = &H1000
910Const MEM_RESERVE = &H2000
911Const MEM_DECOMMIT = &H4000
912Const MEM_RELEASE = &H8000
913Const MEM_FREE = &H10000
914Const MEM_PRIVATE = &H20000
915Const MEM_MAPPED = &H40000
916Const MEM_RESET = &H80000
917Const MEM_TOP_DOWN = &H100000
918Const MEM_4MB_PAGES = &H80000000
919Declare Function VirtualAlloc Lib "kernel32" (lpAddress As VoidPtr, dwSize As SIZE_T, flAllocationType As DWord, flProtect As DWord) As VoidPtr
920Declare Function VirtualFree Lib "kernel32" (lpAddress As VoidPtr, dwSize As SIZE_T, dwFreeType As DWord) As BOOL
921Declare Function VirtualLock Lib "kernel32" (lpAddress As VoidPtr, dwSize As SIZE_T) As BOOL
922Declare Function VirtualProtect Lib "kernel32" (
923 pAddress As VoidPtr,
924 Size As SIZE_T,
925 flNewProtect As DWord,
926 ByRef flOldProtect As DWord
927) As BOOL
928Declare Function VirtualProtectEx Lib "kernel32" (
929 hProcess As HANDLE,
930 pAddress As VoidPtr,
931 Size As SIZE_T,
932 flNewProtect As DWord,
933 ByRef flOldProtect As DWord
934) As BOOL
935Type MEMORY_BASIC_INFORMATION
936 BaseAddress As VoidPtr
937 AllocationBase As VoidPtr
938 AllocationProtect As DWord
939 RegionSize As SIZE_T
940 State As DWord
941 Protect As DWord
942 MBIType As DWord
943End Type
944Declare Function VirtualQuery Lib "kernel32" (
945 pAddress As VoidPtr,
946 ByRef mbi As MEMORY_BASIC_INFORMATION,
947 Length As SIZE_T
948) As SIZE_T
949Declare Function VirtualQueryEx Lib "kernel32" (
950 hProcess As HANDLE,
951 pAddress As VoidPtr,
952 ByRef mbi As MEMORY_BASIC_INFORMATION,
953 Length As SIZE_T
954) As SIZE_T
955Declare Function VirtualUnlock Lib "kernel32" (lpAddress As VoidPtr, dwSize As SIZE_T) As BOOL
956Declare Function WaitForMultipleObjects Lib "kernel32" (nCount As DWord, pHandles As *HANDLE, fWaitAll As BOOL, dwMilliseconds As DWord) As DWord
957Declare Function WaitForMultipleObjectsEx Lib "kernel32" (nCount As DWord, pHandles As *HANDLE, fWaitAll As BOOL, dwMilliseconds As DWord, bAlertable As BOOL) As DWord
958Declare Function WaitForSingleObject Lib "kernel32" (hHandle As HANDLE, dwMilliseconds As DWord) As DWord
959Declare Function WaitForSingleObjectEx Lib "kernel32" (hHandle As HANDLE, dwMilliseconds As DWord, bAlertable As BOOL) As DWord
960
961Const WC_COMPOSITECHECK = &H00000200
962Const WC_DISCARDNS = &H00000010
963Const WC_SEPCHARS = &H00000020
964Const WC_DEFAULTCHAR = &H00000040
965Const WC_NO_BEST_FIT_CHARS = &H00000400
966Declare Function WideCharToMultiByte Lib "Kernel32" (
967 CodePage As DWord,
968 dwFlags As DWord,
969 pWideCharStr As PCWSTR,
970 cchWideChar As Long,
971 pMultiByteStr As PSTR,
972 cbMultiByte As Long,
973 pDefaultChar As PCSTR,
974 pUsedDefaultChar As *BOOL
975) As Long
976
977Declare Function WriteFile Lib "kernel32" (hFile As HANDLE, lpBuffer As VoidPtr, nNumberOfBytesToWrite As DWord, lpNumberOfBytesWritten As DWordPtr, ByRef lpOverlapped As OVERLAPPED) As BOOL
978Declare Sub ZeroMemory Lib "kernel32" Alias "RtlZeroMemory" (Destination As VoidPtr, dwLength As DWord)
979
980Const MAKELCID(lgid, srtid) = ((((srtid As Word) As DWord)<<16) or ((lgid As Word) As DWord))
981Const MAKELANGID(p, s) = (((s As Word) << 10) or (p As Word))
982Const PRIMARYLANGID(lgid) = ((lgid As Word) and &H3ff)
983Const SUBLANGID(lgid) = ((lgid As Word) >> 10)
984
985
986'
987' Primary language IDs.
988'
989
990Const LANG_NEUTRAL = &H00
991Const LANG_INVARIANT = &H7f
992
993Const LANG_AFRIKAANS = &H36
994Const LANG_ALBANIAN = &H1c
995Const LANG_ARABIC = &H01
996Const LANG_ARMENIAN = &H2b
997Const LANG_ASSAMESE = &H4d
998Const LANG_AZERI = &H2c
999Const LANG_BASQUE = &H2d
1000Const LANG_BELARUSIAN = &H23
1001Const LANG_BENGALI = &H45
1002Const LANG_BULGARIAN = &H02
1003Const LANG_CATALAN = &H03
1004Const LANG_CHINESE = &H04
1005Const LANG_CROATIAN = &H1a
1006Const LANG_CZECH = &H05
1007Const LANG_DANISH = &H06
1008Const LANG_DIVEHI = &H65
1009Const LANG_DUTCH = &H13
1010Const LANG_ENGLISH = &H09
1011Const LANG_ESTONIAN = &H25
1012Const LANG_FAEROESE = &H38
1013Const LANG_FARSI = &H29
1014Const LANG_FINNISH = &H0b
1015Const LANG_FRENCH = &H0c
1016Const LANG_GALICIAN = &H56
1017Const LANG_GEORGIAN = &H37
1018Const LANG_GERMAN = &H07
1019Const LANG_GREEK = &H08
1020Const LANG_GUJARATI = &H47
1021Const LANG_HEBREW = &H0d
1022Const LANG_HINDI = &H39
1023Const LANG_HUNGARIAN = &H0e
1024Const LANG_ICELANDIC = &H0f
1025Const LANG_INDONESIAN = &H21
1026Const LANG_ITALIAN = &H10
1027Const LANG_JAPANESE = &H11
1028Const LANG_KANNADA = &H4b
1029Const LANG_KASHMIRI = &H60
1030Const LANG_KAZAK = &H3f
1031Const LANG_KONKANI = &H57
1032Const LANG_KOREAN = &H12
1033Const LANG_KYRGYZ = &H40
1034Const LANG_LATVIAN = &H26
1035Const LANG_LITHUANIAN = &H27
1036Const LANG_MACEDONIAN = &H2f ' the Former Yugoslav Republic of Macedonia
1037Const LANG_MALAY = &H3e
1038Const LANG_MALAYALAM = &H4c
1039Const LANG_MANIPURI = &H58
1040Const LANG_MARATHI = &H4e
1041Const LANG_MONGOLIAN = &H50
1042Const LANG_NEPALI = &H61
1043Const LANG_NORWEGIAN = &H14
1044Const LANG_ORIYA = &H48
1045Const LANG_POLISH = &H15
1046Const LANG_PORTUGUESE = &H16
1047Const LANG_PUNJABI = &H46
1048Const LANG_ROMANIAN = &H18
1049Const LANG_RUSSIAN = &H19
1050Const LANG_SANSKRIT = &H4f
1051Const LANG_SERBIAN = &H1a
1052Const LANG_SINDHI = &H59
1053Const LANG_SLOVAK = &H1b
1054Const LANG_SLOVENIAN = &H24
1055Const LANG_SPANISH = &H0a
1056Const LANG_SWAHILI = &H41
1057Const LANG_SWEDISH = &H1d
1058Const LANG_SYRIAC = &H5a
1059Const LANG_TAMIL = &H49
1060Const LANG_TATAR = &H44
1061Const LANG_TELUGU = &H4a
1062Const LANG_THAI = &H1e
1063Const LANG_TURKISH = &H1f
1064Const LANG_UKRAINIAN = &H22
1065Const LANG_URDU = &H20
1066Const LANG_UZBEK = &H43
1067Const LANG_VIETNAMESE = &H2a
1068
1069'
1070' Sublanguage IDs.
1071'
1072' The name immediately following SUBLANG_ dictates which primary
1073' language ID that sublanguage ID can be combined with to form a
1074' valid language ID.
1075'
1076
1077Const SUBLANG_NEUTRAL = &H00 ' language neutral
1078Const SUBLANG_DEFAULT = &H01 ' user default
1079Const SUBLANG_SYS_DEFAULT = &H02 ' system default
1080
1081Const SUBLANG_ARABIC_SAUDI_ARABIA = &H01 ' Arabic (Saudi Arabia)
1082Const SUBLANG_ARABIC_IRAQ = &H02 ' Arabic (Iraq)
1083Const SUBLANG_ARABIC_EGYPT = &H03 ' Arabic (Egypt)
1084Const SUBLANG_ARABIC_LIBYA = &H04 ' Arabic (Libya)
1085Const SUBLANG_ARABIC_ALGERIA = &H05 ' Arabic (Algeria)
1086Const SUBLANG_ARABIC_MOROCCO = &H06 ' Arabic (Morocco)
1087Const SUBLANG_ARABIC_TUNISIA = &H07 ' Arabic (Tunisia)
1088Const SUBLANG_ARABIC_OMAN = &H08 ' Arabic (Oman)
1089Const SUBLANG_ARABIC_YEMEN = &H09 ' Arabic (Yemen)
1090Const SUBLANG_ARABIC_SYRIA = &H0a ' Arabic (Syria)
1091Const SUBLANG_ARABIC_JORDAN = &H0b ' Arabic (Jordan)
1092Const SUBLANG_ARABIC_LEBANON = &H0c ' Arabic (Lebanon)
1093Const SUBLANG_ARABIC_KUWAIT = &H0d ' Arabic (Kuwait)
1094Const SUBLANG_ARABIC_UAE = &H0e ' Arabic (U.A.E)
1095Const SUBLANG_ARABIC_BAHRAIN = &H0f ' Arabic (Bahrain)
1096Const SUBLANG_ARABIC_QATAR = &H10 ' Arabic (Qatar)
1097Const SUBLANG_AZERI_LATIN = &H01 ' Azeri (Latin)
1098Const SUBLANG_AZERI_CYRILLIC = &H02 ' Azeri (Cyrillic)
1099Const SUBLANG_CHINESE_TRADITIONAL = &H01 ' Chinese (Taiwan)
1100Const SUBLANG_CHINESE_SIMPLIFIED = &H02 ' Chinese (PR China)
1101Const SUBLANG_CHINESE_HONGKONG = &H03 ' Chinese (Hong Kong S.A.R., P.R.C.)
1102Const SUBLANG_CHINESE_SINGAPORE = &H04 ' Chinese (Singapore)
1103Const SUBLANG_CHINESE_MACAU = &H05 ' Chinese (Macau S.A.R.)
1104Const SUBLANG_DUTCH = &H01 ' Dutch
1105Const SUBLANG_DUTCH_BELGIAN = &H02 ' Dutch (Belgian)
1106Const SUBLANG_ENGLISH_US = &H01 ' English (USA)
1107Const SUBLANG_ENGLISH_UK = &H02 ' English (UK)
1108Const SUBLANG_ENGLISH_AUS = &H03 ' English (Australian)
1109Const SUBLANG_ENGLISH_CAN = &H04 ' English (Canadian)
1110Const SUBLANG_ENGLISH_NZ = &H05 ' English (New Zealand)
1111Const SUBLANG_ENGLISH_EIRE = &H06 ' English (Irish)
1112Const SUBLANG_ENGLISH_SOUTH_AFRICA = &H07 ' English (South Africa)
1113Const SUBLANG_ENGLISH_JAMAICA = &H08 ' English (Jamaica)
1114Const SUBLANG_ENGLISH_CARIBBEAN = &H09 ' English (Caribbean)
1115Const SUBLANG_ENGLISH_BELIZE = &H0a ' English (Belize)
1116Const SUBLANG_ENGLISH_TRINIDAD = &H0b ' English (Trinidad)
1117Const SUBLANG_ENGLISH_ZIMBABWE = &H0c ' English (Zimbabwe)
1118Const SUBLANG_ENGLISH_PHILIPPINES = &H0d ' English (Philippines)
1119Const SUBLANG_FRENCH = &H01 ' French
1120Const SUBLANG_FRENCH_BELGIAN = &H02 ' French (Belgian)
1121Const SUBLANG_FRENCH_CANADIAN = &H03 ' French (Canadian)
1122Const SUBLANG_FRENCH_SWISS = &H04 ' French (Swiss)
1123Const SUBLANG_FRENCH_LUXEMBOURG = &H05 ' French (Luxembourg)
1124Const SUBLANG_FRENCH_MONACO = &H06 ' French (Monaco)
1125Const SUBLANG_GERMAN = &H01 ' German
1126Const SUBLANG_GERMAN_SWISS = &H02 ' German (Swiss)
1127Const SUBLANG_GERMAN_AUSTRIAN = &H03 ' German (Austrian)
1128Const SUBLANG_GERMAN_LUXEMBOURG = &H04 ' German (Luxembourg)
1129Const SUBLANG_GERMAN_LIECHTENSTEIN = &H05 ' German (Liechtenstein)
1130Const SUBLANG_ITALIAN = &H01 ' Italian
1131Const SUBLANG_ITALIAN_SWISS = &H02 ' Italian (Swiss)
1132Const SUBLANG_KASHMIRI_SASIA = &H02 ' Kashmiri (South Asia)
1133Const SUBLANG_KOREAN = &H01 ' Korean (Extended Wansung)
1134Const SUBLANG_LITHUANIAN = &H01 ' Lithuanian
1135Const SUBLANG_MALAY_MALAYSIA = &H01 ' Malay (Malaysia)
1136Const SUBLANG_MALAY_BRUNEI_DARUSSALAM = &H02 ' Malay (Brunei Darussalam)
1137Const SUBLANG_NEPALI_INDIA = &H02 ' Nepali (India)
1138Const SUBLANG_NORWEGIAN_BOKMAL = &H01 ' Norwegian (Bokmal)
1139Const SUBLANG_NORWEGIAN_NYNORSK = &H02 ' Norwegian (Nynorsk)
1140Const SUBLANG_PORTUGUESE = &H02 ' Portuguese
1141Const SUBLANG_PORTUGUESE_BRAZILIAN = &H01 ' Portuguese (Brazilian)
1142Const SUBLANG_SERBIAN_LATIN = &H02 ' Serbian (Latin)
1143Const SUBLANG_SERBIAN_CYRILLIC = &H03 ' Serbian (Cyrillic)
1144Const SUBLANG_SPANISH = &H01 ' Spanish (Castilian)
1145Const SUBLANG_SPANISH_MEXICAN = &H02 ' Spanish (Mexican)
1146Const SUBLANG_SPANISH_MODERN = &H03 ' Spanish (Spain)
1147Const SUBLANG_SPANISH_GUATEMALA = &H04 ' Spanish (Guatemala)
1148Const SUBLANG_SPANISH_COSTA_RICA = &H05 ' Spanish (Costa Rica)
1149Const SUBLANG_SPANISH_PANAMA = &H06 ' Spanish (Panama)
1150Const SUBLANG_SPANISH_DOMINICAN_REPUBLIC = &H07 ' Spanish (Dominican Republic)
1151Const SUBLANG_SPANISH_VENEZUELA = &H08 ' Spanish (Venezuela)
1152Const SUBLANG_SPANISH_COLOMBIA = &H09 ' Spanish (Colombia)
1153Const SUBLANG_SPANISH_PERU = &H0a ' Spanish (Peru)
1154Const SUBLANG_SPANISH_ARGENTINA = &H0b ' Spanish (Argentina)
1155Const SUBLANG_SPANISH_ECUADOR = &H0c ' Spanish (Ecuador)
1156Const SUBLANG_SPANISH_CHILE = &H0d ' Spanish (Chile)
1157Const SUBLANG_SPANISH_URUGUAY = &H0e ' Spanish (Uruguay)
1158Const SUBLANG_SPANISH_PARAGUAY = &H0f ' Spanish (Paraguay)
1159Const SUBLANG_SPANISH_BOLIVIA = &H10 ' Spanish (Bolivia)
1160Const SUBLANG_SPANISH_EL_SALVADOR = &H11 ' Spanish (El Salvador)
1161Const SUBLANG_SPANISH_HONDURAS = &H12 ' Spanish (Honduras)
1162Const SUBLANG_SPANISH_NICARAGUA = &H13 ' Spanish (Nicaragua)
1163Const SUBLANG_SPANISH_PUERTO_RICO = &H14 ' Spanish (Puerto Rico)
1164Const SUBLANG_SWEDISH = &H01 ' Swedish
1165Const SUBLANG_SWEDISH_FINLAND = &H02 ' Swedish (Finland)
1166Const SUBLANG_URDU_PAKISTAN = &H01 ' Urdu (Pakistan)
1167Const SUBLANG_URDU_INDIA = &H02 ' Urdu (India)
1168Const SUBLANG_UZBEK_LATIN = &H01 ' Uzbek (Latin)
1169Const SUBLANG_UZBEK_CYRILLIC = &H02 ' Uzbek (Cyrillic)
1170
1171
1172Const LANG_SYSTEM_DEFAULT = (MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT))
1173Const LANG_USER_DEFAULT = (MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT))
1174
1175
1176'
1177' Sorting IDs.
1178'
1179
1180Const SORT_DEFAULT = &H0 ' sorting default
1181
1182Const SORT_JAPANESE_XJIS = &H0 ' Japanese XJIS order
1183Const SORT_JAPANESE_UNICODE = &H1 ' Japanese Unicode order
1184
1185Const SORT_CHINESE_BIG5 = &H0 ' Chinese BIG5 order
1186Const SORT_CHINESE_PRCP = &H0 ' PRC Chinese Phonetic order
1187Const SORT_CHINESE_UNICODE = &H1 ' Chinese Unicode order
1188Const SORT_CHINESE_PRC = &H2 ' PRC Chinese Stroke Count order
1189Const SORT_CHINESE_BOPOMOFO = &H3 ' Traditional Chinese Bopomofo order
1190
1191Const SORT_KOREAN_KSC = &H0 ' Korean KSC order
1192Const SORT_KOREAN_UNICODE = &H1 ' Korean Unicode order
1193
1194Const SORT_GERMAN_PHONE_BOOK = &H1 ' German Phone Book order
1195
1196Const SORT_HUNGARIAN_DEFAULT = &H0 ' Hungarian Default order
1197Const SORT_HUNGARIAN_TECHNICAL = &H1 ' Hungarian Technical order
1198
1199Const SORT_GEORGIAN_TRADITIONAL = &H0 ' Georgian Traditional order
1200Const SORT_GEORGIAN_MODERN = &H1 ' Georgian Modern order
1201
1202'
1203' Wait functions' results.
1204'
1205Const WAIT_FAILED = (&hFFFFFFFF As DWord)
1206Const WAIT_OBJECT_0 = 0 '((STATUS_WAIT_0 ) + 0)
1207
1208Const WAIT_ABANDONED = &h00000080 As DWord '((STATUS_ABANDONED_WAIT_0 ) + 0)
1209Const WAIT_ABANDONED_0 = WAIT_ABANDONED '((STATUS_ABANDONED_WAIT_0 ) + 0)
1210
1211Const WAIT_IO_COMPLETION = &h000000C0 'STATUS_USER_APC
1212
1213#endif '_INC_SYSTEM
Note: See TracBrowser for help on using the repository browser.