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