source: Include/api_system.sbp@ 38

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

OLE Automation関数などの追加
KERNEL関数などの追加

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