source: Include/api_system.sbp@ 137

Last change on this file since 137 was 137, checked in by イグトランス (egtra), 17 years ago

#55#73#75とりあえず完了

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