1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _WINBASE_ 7 #define _WINBASE_ 8 9 #include <_mingw_unicode.h> 10 11 #ifndef WINADVAPI 12 #ifndef _ADVAPI32_ 13 #define WINADVAPI DECLSPEC_IMPORT 14 #else 15 #define WINADVAPI 16 #endif 17 #endif 18 19 #ifndef WINBASEAPI 20 #ifndef _KERNEL32_ 21 #define WINBASEAPI DECLSPEC_IMPORT 22 #else 23 #define WINBASEAPI 24 #endif 25 #endif 26 27 #ifndef _ZAWPROXY_ 28 #define ZAWPROXYAPI DECLSPEC_IMPORT 29 #else 30 #define ZAWPROXYAPI 31 #endif 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 /* #define DefineHandleTable(w) ((w),TRUE) */ 38 #define DefineHandleTable(w) ( { (VOID)(w); TRUE; } ) 39 #define LimitEmsPages(dw) 40 #define SetSwapAreaSize(w) (w) 41 #define LockSegment(w) GlobalFix((HANDLE)(w)) 42 #define UnlockSegment(w) GlobalUnfix((HANDLE)(w)) 43 44 #define Yield() 45 46 #define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1) 47 #define INVALID_FILE_SIZE ((DWORD)0xffffffff) 48 #define INVALID_SET_FILE_POINTER ((DWORD)-1) 49 #define INVALID_FILE_ATTRIBUTES ((DWORD)-1) 50 51 #define FILE_BEGIN 0 52 #define FILE_CURRENT 1 53 #define FILE_END 2 54 55 #define TIME_ZONE_ID_INVALID ((DWORD)0xffffffff) 56 57 #define WAIT_FAILED ((DWORD)0xffffffff) 58 #define WAIT_OBJECT_0 ((STATUS_WAIT_0) + 0) 59 #define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0) + 0) 60 #define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0) + 0) 61 #define WAIT_IO_COMPLETION STATUS_USER_APC 62 #define STILL_ACTIVE STATUS_PENDING 63 #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION 64 #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT 65 #define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT 66 #define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP 67 #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED 68 #define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND 69 #define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO 70 #define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT 71 #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION 72 #define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW 73 #define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK 74 #define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW 75 #define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO 76 #define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW 77 #define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION 78 #define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR 79 #define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION 80 #define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION 81 #define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW 82 #define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION 83 #define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION 84 #define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE 85 #define EXCEPTION_POSSIBLE_DEADLOCK STATUS_POSSIBLE_DEADLOCK 86 #define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT 87 #define MoveMemory RtlMoveMemory 88 #define CopyMemory RtlCopyMemory 89 #define FillMemory RtlFillMemory 90 #define ZeroMemory RtlZeroMemory 91 #define SecureZeroMemory RtlSecureZeroMemory 92 #define CaptureStackBackTrace RtlCaptureStackBackTrace 93 94 #define FILE_FLAG_WRITE_THROUGH 0x80000000 95 #define FILE_FLAG_OVERLAPPED 0x40000000 96 #define FILE_FLAG_NO_BUFFERING 0x20000000 97 #define FILE_FLAG_RANDOM_ACCESS 0x10000000 98 #define FILE_FLAG_SEQUENTIAL_SCAN 0x8000000 99 #define FILE_FLAG_DELETE_ON_CLOSE 0x4000000 100 #define FILE_FLAG_BACKUP_SEMANTICS 0x2000000 101 #define FILE_FLAG_POSIX_SEMANTICS 0x1000000 102 #define FILE_FLAG_OPEN_REPARSE_POINT 0x200000 103 #define FILE_FLAG_OPEN_NO_RECALL 0x100000 104 #define FILE_FLAG_FIRST_PIPE_INSTANCE 0x80000 105 106 #define CREATE_NEW 1 107 #define CREATE_ALWAYS 2 108 #define OPEN_EXISTING 3 109 #define OPEN_ALWAYS 4 110 #define TRUNCATE_EXISTING 5 111 112 #define PROGRESS_CONTINUE 0 113 #define PROGRESS_CANCEL 1 114 #define PROGRESS_STOP 2 115 #define PROGRESS_QUIET 3 116 117 #define CALLBACK_CHUNK_FINISHED 0x0 118 #define CALLBACK_STREAM_SWITCH 0x1 119 120 #define COPY_FILE_FAIL_IF_EXISTS 0x1 121 #define COPY_FILE_RESTARTABLE 0x2 122 #define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x4 123 #define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x8 124 #define COPY_FILE_COPY_SYMLINK 0x0800 125 #define COPY_FILE_NO_BUFFERING 0x1000 126 127 #define REPLACEFILE_WRITE_THROUGH 0x1 128 #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x2 129 130 #define PIPE_ACCESS_INBOUND 0x1 131 #define PIPE_ACCESS_OUTBOUND 0x2 132 #define PIPE_ACCESS_DUPLEX 0x3 133 134 #define PIPE_CLIENT_END 0x0 135 #define PIPE_SERVER_END 0x1 136 137 #define PIPE_WAIT 0x0 138 #define PIPE_NOWAIT 0x1 139 #define PIPE_READMODE_BYTE 0x0 140 #define PIPE_READMODE_MESSAGE 0x2 141 #define PIPE_TYPE_BYTE 0x0 142 #define PIPE_TYPE_MESSAGE 0x4 143 #if (_WIN32_WINNT >= 0x0600) 144 #define PIPE_ACCEPT_REMOTE_CLIENTS 0x0 145 #define PIPE_REJECT_REMOTE_CLIENTS 0x8 146 #endif 147 148 #define PIPE_UNLIMITED_INSTANCES 255 149 150 #define SECURITY_ANONYMOUS (SecurityAnonymous << 16) 151 #define SECURITY_IDENTIFICATION (SecurityIdentification << 16) 152 #define SECURITY_IMPERSONATION (SecurityImpersonation << 16) 153 #define SECURITY_DELEGATION (SecurityDelegation << 16) 154 155 #define SECURITY_CONTEXT_TRACKING 0x40000 156 #define SECURITY_EFFECTIVE_ONLY 0x80000 157 158 #define SECURITY_SQOS_PRESENT 0x100000 159 #define SECURITY_VALID_SQOS_FLAGS 0x1f0000 160 161 #if (_WIN32_WINNT >= 0x0600) 162 /* available in Vista SP1 and higher */ 163 #define PROCESS_DEP_ENABLE 0x1 164 #define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x2 165 #endif 166 167 typedef struct _OVERLAPPED { 168 ULONG_PTR Internal; 169 ULONG_PTR InternalHigh; 170 __C89_NAMELESS union { 171 __C89_NAMELESS struct { 172 DWORD Offset; 173 DWORD OffsetHigh; 174 }; 175 PVOID Pointer; 176 }; 177 HANDLE hEvent; 178 } OVERLAPPED,*LPOVERLAPPED; 179 180 typedef struct _SECURITY_ATTRIBUTES { 181 DWORD nLength; 182 LPVOID lpSecurityDescriptor; 183 WINBOOL bInheritHandle; 184 } SECURITY_ATTRIBUTES,*PSECURITY_ATTRIBUTES,*LPSECURITY_ATTRIBUTES; 185 186 typedef struct _PROCESS_INFORMATION { 187 HANDLE hProcess; 188 HANDLE hThread; 189 DWORD dwProcessId; 190 DWORD dwThreadId; 191 } PROCESS_INFORMATION,*PPROCESS_INFORMATION,*LPPROCESS_INFORMATION; 192 193 #ifndef _FILETIME_ 194 #define _FILETIME_ 195 typedef struct _FILETIME { 196 DWORD dwLowDateTime; 197 DWORD dwHighDateTime; 198 } FILETIME,*PFILETIME,*LPFILETIME; 199 #endif 200 201 #ifndef _SYSTEMTIME_ 202 #define _SYSTEMTIME_ 203 typedef struct _SYSTEMTIME { 204 WORD wYear; 205 WORD wMonth; 206 WORD wDayOfWeek; 207 WORD wDay; 208 WORD wHour; 209 WORD wMinute; 210 WORD wSecond; 211 WORD wMilliseconds; 212 } SYSTEMTIME,*PSYSTEMTIME,*LPSYSTEMTIME; 213 #endif /* _SYSTEMTIME_ */ 214 215 typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter); 216 typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE; 217 typedef VOID (WINAPI *PFIBER_START_ROUTINE)(LPVOID lpFiberParameter); 218 typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE; 219 220 typedef RTL_CRITICAL_SECTION CRITICAL_SECTION; 221 typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION; 222 typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION; 223 typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG; 224 typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG; 225 typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG; 226 227 WINBASEAPI PVOID WINAPI EncodePointer(PVOID Ptr); 228 WINBASEAPI PVOID WINAPI DecodePointer(PVOID Ptr); 229 WINBASEAPI PVOID WINAPI EncodeSystemPointer(PVOID Ptr); 230 WINBASEAPI PVOID WINAPI DecodeSystemPointer(PVOID Ptr); 231 232 #ifdef _X86_ 233 typedef PLDT_ENTRY LPLDT_ENTRY; 234 #else 235 typedef LPVOID LPLDT_ENTRY; 236 #endif 237 238 #define CRITICAL_SECTION_NO_DEBUG_INFO RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO 239 240 #define MUTEX_MODIFY_STATE MUTANT_QUERY_STATE 241 #define MUTEX_ALL_ACCESS MUTANT_ALL_ACCESS 242 243 #define SP_SERIALCOMM ((DWORD)0x1) 244 245 #define PST_UNSPECIFIED ((DWORD)0x0) 246 #define PST_RS232 ((DWORD)0x1) 247 #define PST_PARALLELPORT ((DWORD)0x2) 248 #define PST_RS422 ((DWORD)0x3) 249 #define PST_RS423 ((DWORD)0x4) 250 #define PST_RS449 ((DWORD)0x5) 251 #define PST_MODEM ((DWORD)0x6) 252 #define PST_FAX ((DWORD)0x21) 253 #define PST_SCANNER ((DWORD)0x22) 254 #define PST_NETWORK_BRIDGE ((DWORD)0x100) 255 #define PST_LAT ((DWORD)0x101) 256 #define PST_TCPIP_TELNET ((DWORD)0x102) 257 #define PST_X25 ((DWORD)0x103) 258 259 #define PCF_DTRDSR ((DWORD)0x1) 260 #define PCF_RTSCTS ((DWORD)0x2) 261 #define PCF_RLSD ((DWORD)0x4) 262 #define PCF_PARITY_CHECK ((DWORD)0x8) 263 #define PCF_XONXOFF ((DWORD)0x10) 264 #define PCF_SETXCHAR ((DWORD)0x20) 265 #define PCF_TOTALTIMEOUTS ((DWORD)0x40) 266 #define PCF_INTTIMEOUTS ((DWORD)0x80) 267 #define PCF_SPECIALCHARS ((DWORD)0x100) 268 #define PCF_16BITMODE ((DWORD)0x200) 269 270 #define SP_PARITY ((DWORD)0x1) 271 #define SP_BAUD ((DWORD)0x2) 272 #define SP_DATABITS ((DWORD)0x4) 273 #define SP_STOPBITS ((DWORD)0x8) 274 #define SP_HANDSHAKING ((DWORD)0x10) 275 #define SP_PARITY_CHECK ((DWORD)0x20) 276 #define SP_RLSD ((DWORD)0x40) 277 278 #define BAUD_075 ((DWORD)0x1) 279 #define BAUD_110 ((DWORD)0x2) 280 #define BAUD_134_5 ((DWORD)0x4) 281 #define BAUD_150 ((DWORD)0x8) 282 #define BAUD_300 ((DWORD)0x10) 283 #define BAUD_600 ((DWORD)0x20) 284 #define BAUD_1200 ((DWORD)0x40) 285 #define BAUD_1800 ((DWORD)0x80) 286 #define BAUD_2400 ((DWORD)0x100) 287 #define BAUD_4800 ((DWORD)0x200) 288 #define BAUD_7200 ((DWORD)0x400) 289 #define BAUD_9600 ((DWORD)0x800) 290 #define BAUD_14400 ((DWORD)0x1000) 291 #define BAUD_19200 ((DWORD)0x2000) 292 #define BAUD_38400 ((DWORD)0x4000) 293 #define BAUD_56K ((DWORD)0x8000) 294 #define BAUD_128K ((DWORD)0x10000) 295 #define BAUD_115200 ((DWORD)0x20000) 296 #define BAUD_57600 ((DWORD)0x40000) 297 #define BAUD_USER ((DWORD)0x10000000) 298 299 #define DATABITS_5 ((WORD)0x1) 300 #define DATABITS_6 ((WORD)0x2) 301 #define DATABITS_7 ((WORD)0x4) 302 #define DATABITS_8 ((WORD)0x8) 303 #define DATABITS_16 ((WORD)0x10) 304 #define DATABITS_16X ((WORD)0x20) 305 306 #define STOPBITS_10 ((WORD)0x1) 307 #define STOPBITS_15 ((WORD)0x2) 308 #define STOPBITS_20 ((WORD)0x4) 309 #define PARITY_NONE ((WORD)0x100) 310 #define PARITY_ODD ((WORD)0x200) 311 #define PARITY_EVEN ((WORD)0x400) 312 #define PARITY_MARK ((WORD)0x800) 313 #define PARITY_SPACE ((WORD)0x1000) 314 315 typedef struct _COMMPROP { 316 WORD wPacketLength; 317 WORD wPacketVersion; 318 DWORD dwServiceMask; 319 DWORD dwReserved1; 320 DWORD dwMaxTxQueue; 321 DWORD dwMaxRxQueue; 322 DWORD dwMaxBaud; 323 DWORD dwProvSubType; 324 DWORD dwProvCapabilities; 325 DWORD dwSettableParams; 326 DWORD dwSettableBaud; 327 WORD wSettableData; 328 WORD wSettableStopParity; 329 DWORD dwCurrentTxQueue; 330 DWORD dwCurrentRxQueue; 331 DWORD dwProvSpec1; 332 DWORD dwProvSpec2; 333 WCHAR wcProvChar[1]; 334 } COMMPROP,*LPCOMMPROP; 335 336 #define COMMPROP_INITIALIZED ((DWORD)0xE73CF52E) 337 338 typedef struct _COMSTAT { 339 DWORD fCtsHold : 1; 340 DWORD fDsrHold : 1; 341 DWORD fRlsdHold : 1; 342 DWORD fXoffHold : 1; 343 DWORD fXoffSent : 1; 344 DWORD fEof : 1; 345 DWORD fTxim : 1; 346 DWORD fReserved : 25; 347 DWORD cbInQue; 348 DWORD cbOutQue; 349 } COMSTAT,*LPCOMSTAT; 350 351 #define DTR_CONTROL_DISABLE 0x0 352 #define DTR_CONTROL_ENABLE 0x1 353 #define DTR_CONTROL_HANDSHAKE 0x2 354 355 #define RTS_CONTROL_DISABLE 0x0 356 #define RTS_CONTROL_ENABLE 0x1 357 #define RTS_CONTROL_HANDSHAKE 0x2 358 #define RTS_CONTROL_TOGGLE 0x3 359 360 typedef struct _DCB { 361 DWORD DCBlength; 362 DWORD BaudRate; 363 DWORD fBinary: 1; 364 DWORD fParity: 1; 365 DWORD fOutxCtsFlow:1; 366 DWORD fOutxDsrFlow:1; 367 DWORD fDtrControl:2; 368 DWORD fDsrSensitivity:1; 369 DWORD fTXContinueOnXoff: 1; 370 DWORD fOutX: 1; 371 DWORD fInX: 1; 372 DWORD fErrorChar: 1; 373 DWORD fNull: 1; 374 DWORD fRtsControl:2; 375 DWORD fAbortOnError:1; 376 DWORD fDummy2:17; 377 WORD wReserved; 378 WORD XonLim; 379 WORD XoffLim; 380 BYTE ByteSize; 381 BYTE Parity; 382 BYTE StopBits; 383 char XonChar; 384 char XoffChar; 385 char ErrorChar; 386 char EofChar; 387 char EvtChar; 388 WORD wReserved1; 389 } DCB,*LPDCB; 390 391 typedef struct _COMMTIMEOUTS { 392 DWORD ReadIntervalTimeout; 393 DWORD ReadTotalTimeoutMultiplier; 394 DWORD ReadTotalTimeoutConstant; 395 DWORD WriteTotalTimeoutMultiplier; 396 DWORD WriteTotalTimeoutConstant; 397 } COMMTIMEOUTS,*LPCOMMTIMEOUTS; 398 399 typedef struct _COMMCONFIG { 400 DWORD dwSize; 401 WORD wVersion; 402 WORD wReserved; 403 DCB dcb; 404 DWORD dwProviderSubType; 405 DWORD dwProviderOffset; 406 DWORD dwProviderSize; 407 WCHAR wcProviderData[1]; 408 } COMMCONFIG,*LPCOMMCONFIG; 409 410 typedef struct _SYSTEM_INFO { 411 __C89_NAMELESS union { 412 DWORD dwOemId; 413 __C89_NAMELESS struct { 414 WORD wProcessorArchitecture; 415 WORD wReserved; 416 } DUMMYSTRUCTNAME; 417 } DUMMYUNIONNAME; 418 DWORD dwPageSize; 419 LPVOID lpMinimumApplicationAddress; 420 LPVOID lpMaximumApplicationAddress; 421 DWORD_PTR dwActiveProcessorMask; 422 DWORD dwNumberOfProcessors; 423 DWORD dwProcessorType; 424 DWORD dwAllocationGranularity; 425 WORD wProcessorLevel; 426 WORD wProcessorRevision; 427 } SYSTEM_INFO,*LPSYSTEM_INFO; 428 429 #define FreeModule(hLibModule) FreeLibrary((hLibModule)) 430 #define MakeProcInstance(lpProc,hInstance) (lpProc) 431 #define FreeProcInstance(lpProc) (lpProc) 432 433 #define GMEM_FIXED 0x0 434 #define GMEM_MOVEABLE 0x2 435 #define GMEM_NOCOMPACT 0x10 436 #define GMEM_NODISCARD 0x20 437 #define GMEM_ZEROINIT 0x40 438 #define GMEM_MODIFY 0x80 439 #define GMEM_DISCARDABLE 0x100 440 #define GMEM_NOT_BANKED 0x1000 441 #define GMEM_SHARE 0x2000 442 #define GMEM_DDESHARE 0x2000 443 #define GMEM_NOTIFY 0x4000 444 #define GMEM_LOWER GMEM_NOT_BANKED 445 #define GMEM_VALID_FLAGS 0x7F72 446 #define GMEM_INVALID_HANDLE 0x8000 447 448 #define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT) 449 #define GPTR (GMEM_FIXED | GMEM_ZEROINIT) 450 451 #define GlobalLRUNewest(h) ((HANDLE)(h)) 452 #define GlobalLRUOldest(h) ((HANDLE)(h)) 453 #define GlobalDiscard(h) GlobalReAlloc((h),0,GMEM_MOVEABLE) 454 455 #define GMEM_DISCARDED 0x4000 456 #define GMEM_LOCKCOUNT 0xff 457 458 typedef struct _MEMORYSTATUS { 459 DWORD dwLength; 460 DWORD dwMemoryLoad; 461 SIZE_T dwTotalPhys; 462 SIZE_T dwAvailPhys; 463 SIZE_T dwTotalPageFile; 464 SIZE_T dwAvailPageFile; 465 SIZE_T dwTotalVirtual; 466 SIZE_T dwAvailVirtual; 467 } MEMORYSTATUS,*LPMEMORYSTATUS; 468 469 #define LMEM_FIXED 0x0 470 #define LMEM_MOVEABLE 0x2 471 #define LMEM_NOCOMPACT 0x10 472 #define LMEM_NODISCARD 0x20 473 #define LMEM_ZEROINIT 0x40 474 #define LMEM_MODIFY 0x80 475 #define LMEM_DISCARDABLE 0xf00 476 #define LMEM_VALID_FLAGS 0xf72 477 #define LMEM_INVALID_HANDLE 0x8000 478 479 #define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT) 480 #define LPTR (LMEM_FIXED | LMEM_ZEROINIT) 481 482 #define NONZEROLHND (LMEM_MOVEABLE) 483 #define NONZEROLPTR (LMEM_FIXED) 484 485 #define LocalDiscard(h) LocalReAlloc((h),0,LMEM_MOVEABLE) 486 487 #define LMEM_DISCARDED 0x4000 488 #define LMEM_LOCKCOUNT 0xff 489 490 #define DEBUG_PROCESS 0x1 491 #define DEBUG_ONLY_THIS_PROCESS 0x2 492 #define CREATE_SUSPENDED 0x4 493 #define DETACHED_PROCESS 0x8 494 #define CREATE_NEW_CONSOLE 0x10 495 #define NORMAL_PRIORITY_CLASS 0x20 496 #define IDLE_PRIORITY_CLASS 0x40 497 #define HIGH_PRIORITY_CLASS 0x80 498 #define REALTIME_PRIORITY_CLASS 0x100 499 #define CREATE_NEW_PROCESS_GROUP 0x200 500 #define CREATE_UNICODE_ENVIRONMENT 0x400 501 #define CREATE_SEPARATE_WOW_VDM 0x800 502 #define CREATE_SHARED_WOW_VDM 0x1000 503 #define CREATE_FORCEDOS 0x2000 504 #define BELOW_NORMAL_PRIORITY_CLASS 0x4000 505 #define ABOVE_NORMAL_PRIORITY_CLASS 0x8000 506 #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x10000 507 508 #define CREATE_BREAKAWAY_FROM_JOB 0x1000000 509 #define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x2000000 510 511 #define CREATE_DEFAULT_ERROR_MODE 0x4000000 512 #define CREATE_NO_WINDOW 0x8000000 513 514 #define PROFILE_USER 0x10000000 515 #define PROFILE_KERNEL 0x20000000 516 #define PROFILE_SERVER 0x40000000 517 518 #define CREATE_IGNORE_SYSTEM_DEFAULT 0x80000000 519 520 #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN 521 #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1) 522 #define THREAD_PRIORITY_NORMAL 0 523 #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX 524 #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1) 525 #define THREAD_PRIORITY_ERROR_RETURN (MAXLONG) 526 527 #define THREAD_MODE_BACKGROUND_BEGIN 0x00010000 528 #define THREAD_MODE_BACKGROUND_END 0x00020000 529 530 #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT 531 #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE 532 533 #define EXCEPTION_DEBUG_EVENT 1 534 #define CREATE_THREAD_DEBUG_EVENT 2 535 #define CREATE_PROCESS_DEBUG_EVENT 3 536 #define EXIT_THREAD_DEBUG_EVENT 4 537 #define EXIT_PROCESS_DEBUG_EVENT 5 538 #define LOAD_DLL_DEBUG_EVENT 6 539 #define UNLOAD_DLL_DEBUG_EVENT 7 540 #define OUTPUT_DEBUG_STRING_EVENT 8 541 #define RIP_EVENT 9 542 543 typedef struct _EXCEPTION_DEBUG_INFO { 544 EXCEPTION_RECORD ExceptionRecord; 545 DWORD dwFirstChance; 546 } EXCEPTION_DEBUG_INFO,*LPEXCEPTION_DEBUG_INFO; 547 548 typedef struct _CREATE_THREAD_DEBUG_INFO { 549 HANDLE hThread; 550 LPVOID lpThreadLocalBase; 551 LPTHREAD_START_ROUTINE lpStartAddress; 552 } CREATE_THREAD_DEBUG_INFO,*LPCREATE_THREAD_DEBUG_INFO; 553 554 typedef struct _CREATE_PROCESS_DEBUG_INFO { 555 HANDLE hFile; 556 HANDLE hProcess; 557 HANDLE hThread; 558 LPVOID lpBaseOfImage; 559 DWORD dwDebugInfoFileOffset; 560 DWORD nDebugInfoSize; 561 LPVOID lpThreadLocalBase; 562 LPTHREAD_START_ROUTINE lpStartAddress; 563 LPVOID lpImageName; 564 WORD fUnicode; 565 } CREATE_PROCESS_DEBUG_INFO,*LPCREATE_PROCESS_DEBUG_INFO; 566 567 typedef struct _EXIT_THREAD_DEBUG_INFO { 568 DWORD dwExitCode; 569 } EXIT_THREAD_DEBUG_INFO,*LPEXIT_THREAD_DEBUG_INFO; 570 571 typedef struct _EXIT_PROCESS_DEBUG_INFO { 572 DWORD dwExitCode; 573 } EXIT_PROCESS_DEBUG_INFO,*LPEXIT_PROCESS_DEBUG_INFO; 574 575 typedef struct _LOAD_DLL_DEBUG_INFO { 576 HANDLE hFile; 577 LPVOID lpBaseOfDll; 578 DWORD dwDebugInfoFileOffset; 579 DWORD nDebugInfoSize; 580 LPVOID lpImageName; 581 WORD fUnicode; 582 } LOAD_DLL_DEBUG_INFO,*LPLOAD_DLL_DEBUG_INFO; 583 584 typedef struct _UNLOAD_DLL_DEBUG_INFO { 585 LPVOID lpBaseOfDll; 586 } UNLOAD_DLL_DEBUG_INFO,*LPUNLOAD_DLL_DEBUG_INFO; 587 588 typedef struct _OUTPUT_DEBUG_STRING_INFO { 589 LPSTR lpDebugStringData; 590 WORD fUnicode; 591 WORD nDebugStringLength; 592 } OUTPUT_DEBUG_STRING_INFO,*LPOUTPUT_DEBUG_STRING_INFO; 593 594 typedef struct _RIP_INFO { 595 DWORD dwError; 596 DWORD dwType; 597 } RIP_INFO,*LPRIP_INFO; 598 599 typedef struct _DEBUG_EVENT { 600 DWORD dwDebugEventCode; 601 DWORD dwProcessId; 602 DWORD dwThreadId; 603 union { 604 EXCEPTION_DEBUG_INFO Exception; 605 CREATE_THREAD_DEBUG_INFO CreateThread; 606 CREATE_PROCESS_DEBUG_INFO CreateProcessInfo; 607 EXIT_THREAD_DEBUG_INFO ExitThread; 608 EXIT_PROCESS_DEBUG_INFO ExitProcess; 609 LOAD_DLL_DEBUG_INFO LoadDll; 610 UNLOAD_DLL_DEBUG_INFO UnloadDll; 611 OUTPUT_DEBUG_STRING_INFO DebugString; 612 RIP_INFO RipInfo; 613 } u; 614 } DEBUG_EVENT,*LPDEBUG_EVENT; 615 616 typedef PCONTEXT LPCONTEXT; 617 typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD; 618 typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS; 619 620 #define DRIVE_UNKNOWN 0 621 #define DRIVE_NO_ROOT_DIR 1 622 #define DRIVE_REMOVABLE 2 623 #define DRIVE_FIXED 3 624 #define DRIVE_REMOTE 4 625 #define DRIVE_CDROM 5 626 #define DRIVE_RAMDISK 6 627 628 #define GetFreeSpace(w) (__MSABI_LONG(0x100000)) 629 #define FILE_TYPE_UNKNOWN 0x0 630 #define FILE_TYPE_DISK 0x1 631 #define FILE_TYPE_CHAR 0x2 632 #define FILE_TYPE_PIPE 0x3 633 #define FILE_TYPE_REMOTE 0x8000 634 635 #define STD_INPUT_HANDLE ((DWORD)-10) 636 #define STD_OUTPUT_HANDLE ((DWORD)-11) 637 #define STD_ERROR_HANDLE ((DWORD)-12) 638 639 #define NOPARITY 0 640 #define ODDPARITY 1 641 #define EVENPARITY 2 642 #define MARKPARITY 3 643 #define SPACEPARITY 4 644 645 #define ONESTOPBIT 0 646 #define ONE5STOPBITS 1 647 #define TWOSTOPBITS 2 648 649 #define IGNORE 0 650 #define INFINITE 0xffffffff 651 652 #define CBR_110 110 653 #define CBR_300 300 654 #define CBR_600 600 655 #define CBR_1200 1200 656 #define CBR_2400 2400 657 #define CBR_4800 4800 658 #define CBR_9600 9600 659 #define CBR_14400 14400 660 #define CBR_19200 19200 661 #define CBR_38400 38400 662 #define CBR_56000 56000 663 #define CBR_57600 57600 664 #define CBR_115200 115200 665 #define CBR_128000 128000 666 #define CBR_256000 256000 667 668 #define CE_RXOVER 0x1 669 #define CE_OVERRUN 0x2 670 #define CE_RXPARITY 0x4 671 #define CE_FRAME 0x8 672 #define CE_BREAK 0x10 673 #define CE_TXFULL 0x100 674 #define CE_PTO 0x200 675 #define CE_IOE 0x400 676 #define CE_DNS 0x800 677 #define CE_OOP 0x1000 678 #define CE_MODE 0x8000 679 680 #define IE_BADID (-1) 681 #define IE_OPEN (-2) 682 #define IE_NOPEN (-3) 683 #define IE_MEMORY (-4) 684 #define IE_DEFAULT (-5) 685 #define IE_HARDWARE (-10) 686 #define IE_BYTESIZE (-11) 687 #define IE_BAUDRATE (-12) 688 689 #define EV_RXCHAR 0x1 690 #define EV_RXFLAG 0x2 691 #define EV_TXEMPTY 0x4 692 #define EV_CTS 0x8 693 #define EV_DSR 0x10 694 #define EV_RLSD 0x20 695 #define EV_BREAK 0x40 696 #define EV_ERR 0x80 697 #define EV_RING 0x100 698 #define EV_PERR 0x200 699 #define EV_RX80FULL 0x400 700 #define EV_EVENT1 0x800 701 #define EV_EVENT2 0x1000 702 703 #define SETXOFF 1 704 #define SETXON 2 705 #define SETRTS 3 706 #define CLRRTS 4 707 #define SETDTR 5 708 #define CLRDTR 6 709 #define RESETDEV 7 710 #define SETBREAK 8 711 #define CLRBREAK 9 712 713 #define PURGE_TXABORT 0x1 714 #define PURGE_RXABORT 0x2 715 #define PURGE_TXCLEAR 0x4 716 #define PURGE_RXCLEAR 0x8 717 718 #define LPTx 0x80 719 720 #define MS_CTS_ON ((DWORD)0x10) 721 #define MS_DSR_ON ((DWORD)0x20) 722 #define MS_RING_ON ((DWORD)0x40) 723 #define MS_RLSD_ON ((DWORD)0x80) 724 725 #define S_QUEUEEMPTY 0 726 #define S_THRESHOLD 1 727 #define S_ALLTHRESHOLD 2 728 729 #define S_NORMAL 0 730 #define S_LEGATO 1 731 #define S_STACCATO 2 732 733 #define S_PERIOD512 0 734 #define S_PERIOD1024 1 735 #define S_PERIOD2048 2 736 #define S_PERIODVOICE 3 737 #define S_WHITE512 4 738 #define S_WHITE1024 5 739 #define S_WHITE2048 6 740 #define S_WHITEVOICE 7 741 742 #define S_SERDVNA (-1) 743 #define S_SEROFM (-2) 744 #define S_SERMACT (-3) 745 #define S_SERQFUL (-4) 746 #define S_SERBDNT (-5) 747 #define S_SERDLN (-6) 748 #define S_SERDCC (-7) 749 #define S_SERDTP (-8) 750 #define S_SERDVL (-9) 751 #define S_SERDMD (-10) 752 #define S_SERDSH (-11) 753 #define S_SERDPT (-12) 754 #define S_SERDFQ (-13) 755 #define S_SERDDR (-14) 756 #define S_SERDSR (-15) 757 #define S_SERDST (-16) 758 759 #define NMPWAIT_WAIT_FOREVER 0xffffffff 760 #define NMPWAIT_NOWAIT 0x1 761 #define NMPWAIT_USE_DEFAULT_WAIT 0x0 762 763 #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES 764 #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH 765 #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK 766 #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS 767 #define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED 768 #define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION 769 #define FS_FILE_ENCRYPTION FILE_SUPPORTS_ENCRYPTION 770 771 #define FILE_MAP_COPY SECTION_QUERY 772 #define FILE_MAP_WRITE SECTION_MAP_WRITE 773 #define FILE_MAP_READ SECTION_MAP_READ 774 #define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS 775 #define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT 776 777 #define OF_READ 0x0 778 #define OF_WRITE 0x1 779 #define OF_READWRITE 0x2 780 #define OF_SHARE_COMPAT 0x0 781 #define OF_SHARE_EXCLUSIVE 0x10 782 #define OF_SHARE_DENY_WRITE 0x20 783 #define OF_SHARE_DENY_READ 0x30 784 #define OF_SHARE_DENY_NONE 0x40 785 #define OF_PARSE 0x100 786 #define OF_DELETE 0x200 787 #define OF_VERIFY 0x400 788 #define OF_CANCEL 0x800 789 #define OF_CREATE 0x1000 790 #define OF_PROMPT 0x2000 791 #define OF_EXIST 0x4000 792 #define OF_REOPEN 0x8000 793 794 #define OFS_MAXPATHNAME 128 795 typedef struct _OFSTRUCT { 796 BYTE cBytes; 797 BYTE fFixedDisk; 798 WORD nErrCode; 799 WORD Reserved1; 800 WORD Reserved2; 801 CHAR szPathName[OFS_MAXPATHNAME]; 802 } OFSTRUCT,*LPOFSTRUCT,*POFSTRUCT; 803 804 #ifndef NOWINBASEINTERLOCK 805 806 #ifndef _NTOS_ 807 808 #if defined(__ia64__) && !defined(RC_INVOKED) 809 810 #define InterlockedIncrement _InterlockedIncrement 811 #define InterlockedIncrementAcquire _InterlockedIncrement_acq 812 #define InterlockedIncrementRelease _InterlockedIncrement_rel 813 #define InterlockedDecrement _InterlockedDecrement 814 #define InterlockedDecrementAcquire _InterlockedDecrement_acq 815 #define InterlockedDecrementRelease _InterlockedDecrement_rel 816 #define InterlockedExchange _InterlockedExchange 817 #define InterlockedExchangeAdd _InterlockedExchangeAdd 818 #define InterlockedCompareExchange _InterlockedCompareExchange 819 #define InterlockedCompareExchangeAcquire _InterlockedCompareExchange_acq 820 #define InterlockedCompareExchangeRelease _InterlockedCompareExchange_rel 821 #define InterlockedExchangePointer _InterlockedExchangePointer 822 #define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer 823 #define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer_rel 824 #define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer_acq 825 826 #define InterlockedIncrement64 _InterlockedIncrement64 827 #define InterlockedDecrement64 _InterlockedDecrement64 828 #define InterlockedExchange64 _InterlockedExchange64 829 #define InterlockedExchangeAcquire64 _InterlockedExchange64_acq 830 #define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 831 #define InterlockedCompareExchange64 _InterlockedCompareExchange64 832 #define InterlockedCompareExchangeAcquire64 _InterlockedCompareExchange64_acq 833 #define InterlockedCompareExchangeRelease64 _InterlockedCompareExchange64_rel 834 835 LONGLONG __cdecl InterlockedIncrement64(LONGLONG volatile *Addend); 836 LONGLONG __cdecl InterlockedDecrement64(LONGLONG volatile *Addend); 837 LONG __cdecl InterlockedIncrementAcquire(LONG volatile *Addend); 838 LONG __cdecl InterlockedDecrementAcquire(LONG volatile *Addend); 839 LONG __cdecl InterlockedIncrementRelease(LONG volatile *Addend); 840 LONG __cdecl InterlockedDecrementRelease(LONG volatile *Addend); 841 LONGLONG __cdecl InterlockedExchange64 (LONGLONG volatile *Target,LONGLONG Value); 842 LONGLONG __cdecl InterlockedExchangeAcquire64 (LONGLONG volatile *Target,LONGLONG Value); 843 LONGLONG __cdecl InterlockedExchangeAdd64 (LONGLONG volatile *Addend,LONGLONG Value); 844 LONGLONG __cdecl InterlockedCompareExchange64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand); 845 LONGLONG __cdecl InterlockedCompareExchangeAcquire64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand); 846 LONGLONG __cdecl InterlockedCompareExchangeRelease64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand); 847 LONG __cdecl InterlockedIncrement(LONG volatile *lpAddend); 848 LONG __cdecl InterlockedDecrement(LONG volatile *lpAddend); 849 LONG __cdecl InterlockedExchange(LONG volatile *Target,LONG Value); 850 LONG __cdecl InterlockedExchangeAdd(LONG volatile *Addend,LONG Value); 851 LONG __cdecl InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand); 852 LONG __cdecl InterlockedCompareExchangeRelease(LONG volatile *Destination,LONG ExChange,LONG Comperand); 853 LONG __cdecl InterlockedCompareExchangeAcquire(LONG volatile *Destination,LONG ExChange,LONG Comperand); 854 PVOID __cdecl InterlockedExchangePointer(PVOID volatile *Target,PVOID Value); 855 PVOID __cdecl InterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID ExChange,PVOID Comperand); 856 PVOID __cdecl InterlockedCompareExchangePointerAcquire(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand); 857 PVOID __cdecl InterlockedCompareExchangePointerRelease(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand); 858 859 #ifndef __CRT__NO_INLINE 860 #ifndef InterlockedAnd 861 #define InterlockedAnd InterlockedAnd_Inline 862 __CRT_INLINE LONG InterlockedAnd_Inline(LONG volatile *Target,LONG Set) { 863 LONG i; 864 LONG j; 865 j = *Target; 866 do { 867 i = j; 868 j = InterlockedCompareExchange(Target,i & Set,i); 869 } while(i!=j); 870 return j; 871 } 872 #endif 873 874 #ifndef InterlockedOr 875 #define InterlockedOr InterlockedOr_Inline 876 877 __CRT_INLINE LONG InterlockedOr_Inline(LONG volatile *Target,LONG Set) { 878 LONG i; 879 LONG j; 880 j = *Target; 881 do { 882 i = j; 883 j = InterlockedCompareExchange(Target,i | Set,i); 884 } while(i!=j); 885 return j; 886 } 887 #endif 888 889 #ifndef InterlockedXor 890 #define InterlockedXor InterlockedXor_Inline 891 892 __CRT_INLINE LONG InterlockedXor_Inline(LONG volatile *Target,LONG Set) { 893 LONG i; 894 LONG j; 895 j = *Target; 896 do { 897 i = j; 898 j = InterlockedCompareExchange(Target,i ^ Set,i); 899 } while(i!=j); 900 return j; 901 } 902 #endif 903 904 #ifndef !defined (InterlockedAnd64) 905 #define InterlockedAnd64 InterlockedAnd64_Inline 906 907 __CRT_INLINE LONGLONG InterlockedAnd64_Inline (LONGLONG volatile *Destination,LONGLONG Value) { 908 LONGLONG Old; 909 do { 910 Old = *Destination; 911 } while(InterlockedCompareExchange64(Destination,Old & Value,Old)!=Old); 912 return Old; 913 } 914 #endif 915 916 #ifndef InterlockedOr64 917 #define InterlockedOr64 InterlockedOr64_Inline 918 919 __CRT_INLINE LONGLONG InterlockedOr64_Inline (LONGLONG volatile *Destination,LONGLONG Value) { 920 LONGLONG Old; 921 do { 922 Old = *Destination; 923 } while(InterlockedCompareExchange64(Destination,Old | Value,Old)!=Old); 924 return Old; 925 } 926 #endif 927 928 #ifndef InterlockedXor64 929 #define InterlockedXor64 InterlockedXor64_Inline 930 931 __CRT_INLINE LONGLONG InterlockedXor64_Inline (LONGLONG volatile *Destination,LONGLONG Value) { 932 LONGLONG Old; 933 do { 934 Old = *Destination; 935 } while(InterlockedCompareExchange64(Destination,Old ^ Value,Old)!=Old); 936 return Old; 937 } 938 #endif 939 940 #ifndef InterlockedBitTestAndSet 941 #define InterlockedBitTestAndSet InterlockedBitTestAndSet_Inline 942 943 __CRT_INLINE BOOLEAN InterlockedBitTestAndSet_Inline(LONG *Base,LONG Bit) { 944 LONG tBit; 945 tBit = 1<<(Bit & (sizeof (*Base)*8-1)); 946 return (BOOLEAN)((InterlockedOr(&Base[Bit/(sizeof(*Base)*8)],tBit)&tBit)!=0); 947 } 948 #endif 949 950 #ifndef InterlockedBitTestAndReset 951 #define InterlockedBitTestAndReset InterlockedBitTestAndReset_Inline 952 953 __CRT_INLINE BOOLEAN InterlockedBitTestAndReset_Inline(LONG *Base,LONG Bit) { 954 LONG tBit; 955 tBit = 1<<(Bit & (sizeof (*Base)*8-1)); 956 return (BOOLEAN)((InterlockedAnd(&Base[Bit/(sizeof(*Base)*8)],~tBit)&tBit)!=0); 957 } 958 #endif 959 960 #ifndef InterlockedBitTestAndComplement 961 #define InterlockedBitTestAndComplement InterlockedBitTestAndComplement_Inline 962 963 __CRT_INLINE BOOLEAN InterlockedBitTestAndComplement_Inline(LONG *Base,LONG Bit) { 964 LONG tBit; 965 tBit = 1<<(Bit & (sizeof (*Base)*8-1)); 966 return (BOOLEAN)((InterlockedXor(&Base[Bit/(sizeof(*Base)*8)],tBit)&tBit)!=0); 967 } 968 #endif 969 #endif /* !__CRT__NO_INLINE */ 970 971 #elif defined(__x86_64) && !defined(RC_INVOKED) 972 973 #define InterlockedIncrement _InterlockedIncrement 974 #define InterlockedIncrementAcquire InterlockedIncrement 975 #define InterlockedIncrementRelease InterlockedIncrement 976 #define InterlockedDecrement _InterlockedDecrement 977 #define InterlockedDecrementAcquire InterlockedDecrement 978 #define InterlockedDecrementRelease InterlockedDecrement 979 #define InterlockedExchange _InterlockedExchange 980 #define InterlockedExchangeAdd _InterlockedExchangeAdd 981 #define InterlockedCompareExchange _InterlockedCompareExchange 982 #define InterlockedCompareExchangeAcquire InterlockedCompareExchange 983 #define InterlockedCompareExchangeRelease InterlockedCompareExchange 984 #define InterlockedExchangePointer _InterlockedExchangePointer 985 #define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer 986 #define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer 987 #define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer 988 #define InterlockedAnd64 _InterlockedAnd64 989 #define InterlockedOr64 _InterlockedOr64 990 #define InterlockedXor64 _InterlockedXor64 991 #define InterlockedIncrement64 _InterlockedIncrement64 992 #define InterlockedDecrement64 _InterlockedDecrement64 993 #define InterlockedExchange64 _InterlockedExchange64 994 #define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 995 #define InterlockedCompareExchange64 _InterlockedCompareExchange64 996 #define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64 997 #define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64 998 999 LONG __cdecl _InterlockedIncrement(LONG volatile *Addend); 1000 LONG __cdecl _InterlockedDecrement(LONG volatile *Addend); 1001 LONG __cdecl _InterlockedExchange(LONG volatile *Target,LONG Value); 1002 LONG __cdecl _InterlockedExchangeAdd(LONG volatile *Addend,LONG Value); 1003 LONG __cdecl _InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand); 1004 PVOID __cdecl _InterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand); 1005 PVOID __cdecl _InterlockedExchangePointer(PVOID volatile *Target,PVOID Value); 1006 LONG64 __cdecl _InterlockedAnd64(LONG64 volatile *Destination,LONG64 Value); 1007 LONG64 __cdecl _InterlockedOr64(LONG64 volatile *Destination,LONG64 Value); 1008 LONG64 __cdecl _InterlockedXor64(LONG64 volatile *Destination,LONG64 Value); 1009 LONG64 __cdecl _InterlockedIncrement64(LONG64 volatile *Addend); 1010 LONG64 __cdecl _InterlockedDecrement64(LONG64 volatile *Addend); 1011 LONG64 __cdecl _InterlockedExchange64(LONG64 volatile *Target,LONG64 Value); 1012 LONG64 __cdecl _InterlockedExchangeAdd64(LONG64 volatile *Addend,LONG64 Value); 1013 LONG64 __cdecl _InterlockedCompareExchange64(LONG64 volatile *Destination,LONG64 ExChange,LONG64 Comperand); 1014 1015 #else /* not ia64, nor x64. */ 1016 1017 LONG WINAPI InterlockedIncrement(LONG volatile *lpAddend); 1018 LONG WINAPI InterlockedDecrement(LONG volatile *lpAddend); 1019 LONG WINAPI InterlockedExchange(LONG volatile *Target,LONG Value); 1020 1021 #define InterlockedExchangePointer(Target,Value) (PVOID)InterlockedExchange((PLONG)(Target),(LONG)(Value)) 1022 1023 LONG WINAPI InterlockedExchangeAdd(LONG volatile *Addend,LONG Value); 1024 LONG WINAPI InterlockedCompareExchange(LONG volatile *Destination,LONG Exchange,LONG Comperand); 1025 LONGLONG WINAPI InterlockedCompareExchange64(LONGLONG volatile *Destination,LONGLONG Exchange,LONGLONG Comperand); 1026 LONGLONG WINAPI InterlockedAnd64 (LONGLONG volatile *Destination,LONGLONG Value); 1027 LONGLONG WINAPI InterlockedOr64 (LONGLONG volatile *Destination,LONGLONG Value); 1028 LONGLONG WINAPI InterlockedXor64 (LONGLONG volatile *Destination,LONGLONG Value); 1029 LONGLONG WINAPI InterlockedIncrement64(LONGLONG volatile *Addend); 1030 LONGLONG WINAPI InterlockedDecrement64(LONGLONG volatile *Addend); 1031 LONGLONG WINAPI InterlockedExchange64(LONGLONG volatile *Target,LONGLONG Value); 1032 LONGLONG WINAPI InterlockedExchangeAdd64(LONGLONG volatile *Addend,LONGLONG Value); 1033 #ifndef __CRT__NO_INLINE 1034 __CRT_INLINE LONGLONG WINAPI InterlockedAnd64 (LONGLONG volatile *Destination,LONGLONG Value) { 1035 LONGLONG Old; 1036 do { 1037 Old = *Destination; 1038 } while(InterlockedCompareExchange64(Destination,Old & Value,Old)!=Old); 1039 return Old; 1040 } 1041 1042 __CRT_INLINE LONGLONG WINAPI InterlockedOr64 (LONGLONG volatile *Destination,LONGLONG Value) { 1043 LONGLONG Old; 1044 do { 1045 Old = *Destination; 1046 } while(InterlockedCompareExchange64(Destination,Old | Value,Old)!=Old); 1047 return Old; 1048 } 1049 1050 __CRT_INLINE LONGLONG WINAPI InterlockedXor64 (LONGLONG volatile *Destination,LONGLONG Value) { 1051 LONGLONG Old; 1052 do { 1053 Old = *Destination; 1054 } while(InterlockedCompareExchange64(Destination,Old ^ Value,Old)!=Old); 1055 1056 return Old; 1057 } 1058 1059 __CRT_INLINE LONGLONG WINAPI InterlockedIncrement64(LONGLONG volatile *Addend) { 1060 LONGLONG Old; 1061 do { 1062 Old = *Addend; 1063 } while(InterlockedCompareExchange64(Addend,Old + 1,Old)!=Old); 1064 return Old + 1; 1065 } 1066 1067 __CRT_INLINE LONGLONG WINAPI InterlockedDecrement64(LONGLONG volatile *Addend) { 1068 LONGLONG Old; 1069 do { 1070 Old = *Addend; 1071 } while(InterlockedCompareExchange64(Addend,Old - 1,Old)!=Old); 1072 return Old - 1; 1073 } 1074 1075 __CRT_INLINE LONGLONG WINAPI InterlockedExchange64(LONGLONG volatile *Target,LONGLONG Value) { 1076 LONGLONG Old; 1077 do { 1078 Old = *Target; 1079 } while(InterlockedCompareExchange64(Target,Value,Old)!=Old); 1080 return Old; 1081 } 1082 1083 __CRT_INLINE LONGLONG WINAPI InterlockedExchangeAdd64(LONGLONG volatile *Addend,LONGLONG Value) { 1084 LONGLONG Old; 1085 do { 1086 Old = *Addend; 1087 } while(InterlockedCompareExchange64(Addend,Old + Value,Old)!=Old); 1088 return Old; 1089 } 1090 #endif /* !__CRT__NO_INLINE */ 1091 1092 #if defined(__cplusplus) && !defined(__CRT__NO_INLINE) 1093 __CRT_INLINE PVOID __cdecl 1094 __InlineInterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID ExChange,PVOID Comperand) { 1095 return ((PVOID)(LONG_PTR) 1096 InterlockedCompareExchange((LONG volatile *)(LONG_PTR)Destination,(LONG)(LONG_PTR)ExChange,(LONG)(LONG_PTR)Comperand)); 1097 } 1098 #define InterlockedCompareExchangePointer __InlineInterlockedCompareExchangePointer 1099 #else 1100 #define InterlockedCompareExchangePointer(Destination,ExChange,Comperand) \ 1101 (PVOID)(LONG_PTR) \ 1102 InterlockedCompareExchange((LONG volatile *)(LONG_PTR)(Destination),(LONG)(LONG_PTR)(ExChange),(LONG)(LONG_PTR)(Comperand)) 1103 #endif /* __cplusplus */ 1104 1105 #define InterlockedIncrementAcquire InterlockedIncrement 1106 #define InterlockedIncrementRelease InterlockedIncrement 1107 #define InterlockedDecrementAcquire InterlockedDecrement 1108 #define InterlockedDecrementRelease InterlockedDecrement 1109 #define InterlockedIncrementAcquire InterlockedIncrement 1110 #define InterlockedIncrementRelease InterlockedIncrement 1111 #define InterlockedCompareExchangeAcquire InterlockedCompareExchange 1112 #define InterlockedCompareExchangeRelease InterlockedCompareExchange 1113 #define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64 1114 #define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64 1115 #define InterlockedCompareExchangePointerAcquire InterlockedCompareExchangePointer 1116 #define InterlockedCompareExchangePointerRelease InterlockedCompareExchangePointer 1117 #endif /* end of _X86_ interlocked api */ 1118 1119 #if defined(_SLIST_HEADER_) && !defined(_NTOSP_) 1120 WINBASEAPI VOID WINAPI InitializeSListHead(PSLIST_HEADER ListHead); 1121 WINBASEAPI PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER ListHead); 1122 WINBASEAPI PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER ListHead,PSLIST_ENTRY ListEntry); 1123 WINBASEAPI PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER ListHead); 1124 WINBASEAPI USHORT WINAPI QueryDepthSList(PSLIST_HEADER ListHead); 1125 #endif /* _SLIST_HEADER_ && !_NTOSP_ */ 1126 1127 #endif /* ! _NTOS_ */ 1128 #endif /* ! NOWINBASEINTERLOCK */ 1129 1130 WINBASEAPI WINBOOL WINAPI FreeResource(HGLOBAL hResData); 1131 WINBASEAPI LPVOID WINAPI LockResource(HGLOBAL hResData); 1132 1133 /* #define UnlockResource(hResData) ((hResData),0) */ 1134 #define UnlockResource(hResData) ( { (VOID)(hResData); 0; } ) 1135 #define MAXINTATOM 0xC000 1136 #define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i))) 1137 #define INVALID_ATOM ((ATOM)0) 1138 1139 int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd); 1140 int WINAPI wWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPWSTR lpCmdLine,int nShowCmd); 1141 /* Unicode entry point is wWinMain, WinMain is just the ANSI version. */ 1142 1143 WINBASEAPI WINBOOL WINAPI FreeLibrary(HMODULE hLibModule); 1144 WINBASEAPI DECLSPEC_NORETURN VOID WINAPI FreeLibraryAndExitThread(HMODULE hLibModule,DWORD dwExitCode); 1145 WINBASEAPI WINBOOL WINAPI DisableThreadLibraryCalls(HMODULE hLibModule); 1146 WINBASEAPI FARPROC WINAPI GetProcAddress(HMODULE hModule,LPCSTR lpProcName); 1147 WINBASEAPI DWORD WINAPI GetVersion(VOID); 1148 WINBASEAPI HGLOBAL WINAPI GlobalAlloc(UINT uFlags,SIZE_T dwBytes); 1149 WINBASEAPI HGLOBAL WINAPI GlobalReAlloc(HGLOBAL hMem,SIZE_T dwBytes,UINT uFlags); 1150 WINBASEAPI SIZE_T WINAPI GlobalSize(HGLOBAL hMem); 1151 WINBASEAPI UINT WINAPI GlobalFlags(HGLOBAL hMem); 1152 WINBASEAPI LPVOID WINAPI GlobalLock(HGLOBAL hMem); 1153 WINBASEAPI HGLOBAL WINAPI GlobalHandle(LPCVOID pMem); 1154 WINBASEAPI WINBOOL WINAPI GlobalUnlock(HGLOBAL hMem); 1155 WINBASEAPI HGLOBAL WINAPI GlobalFree(HGLOBAL hMem); 1156 WINBASEAPI SIZE_T WINAPI GlobalCompact(DWORD dwMinFree); 1157 WINBASEAPI VOID WINAPI GlobalFix(HGLOBAL hMem); 1158 WINBASEAPI VOID WINAPI GlobalUnfix(HGLOBAL hMem); 1159 WINBASEAPI LPVOID WINAPI GlobalWire(HGLOBAL hMem); 1160 WINBASEAPI WINBOOL WINAPI GlobalUnWire(HGLOBAL hMem); 1161 WINBASEAPI VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer); 1162 1163 typedef struct _MEMORYSTATUSEX { 1164 DWORD dwLength; 1165 DWORD dwMemoryLoad; 1166 DWORDLONG ullTotalPhys; 1167 DWORDLONG ullAvailPhys; 1168 DWORDLONG ullTotalPageFile; 1169 DWORDLONG ullAvailPageFile; 1170 DWORDLONG ullTotalVirtual; 1171 DWORDLONG ullAvailVirtual; 1172 DWORDLONG ullAvailExtendedVirtual; 1173 } MEMORYSTATUSEX,*LPMEMORYSTATUSEX; 1174 1175 WINBASEAPI WINBOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer); 1176 WINBASEAPI HLOCAL WINAPI LocalAlloc(UINT uFlags,SIZE_T uBytes); 1177 WINBASEAPI HLOCAL WINAPI LocalReAlloc(HLOCAL hMem,SIZE_T uBytes,UINT uFlags); 1178 WINBASEAPI LPVOID WINAPI LocalLock(HLOCAL hMem); 1179 WINBASEAPI HLOCAL WINAPI LocalHandle(LPCVOID pMem); 1180 WINBASEAPI WINBOOL WINAPI LocalUnlock(HLOCAL hMem); 1181 WINBASEAPI SIZE_T WINAPI LocalSize(HLOCAL hMem); 1182 WINBASEAPI UINT WINAPI LocalFlags(HLOCAL hMem); 1183 WINBASEAPI HLOCAL WINAPI LocalFree(HLOCAL hMem); 1184 WINBASEAPI SIZE_T WINAPI LocalShrink(HLOCAL hMem,UINT cbNewSize); 1185 WINBASEAPI SIZE_T WINAPI LocalCompact(UINT uMinFree); 1186 WINBASEAPI WINBOOL WINAPI FlushInstructionCache(HANDLE hProcess,LPCVOID lpBaseAddress,SIZE_T dwSize); 1187 WINBASEAPI LPVOID WINAPI VirtualAlloc(LPVOID lpAddress,SIZE_T dwSize,DWORD flAllocationType,DWORD flProtect); 1188 WINBASEAPI WINBOOL WINAPI VirtualFree(LPVOID lpAddress,SIZE_T dwSize,DWORD dwFreeType); 1189 WINBASEAPI WINBOOL WINAPI VirtualProtect(LPVOID lpAddress,SIZE_T dwSize,DWORD flNewProtect,PDWORD lpflOldProtect); 1190 WINBASEAPI SIZE_T WINAPI VirtualQuery(LPCVOID lpAddress,PMEMORY_BASIC_INFORMATION lpBuffer,SIZE_T dwLength); 1191 WINBASEAPI LPVOID WINAPI VirtualAllocEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD flAllocationType,DWORD flProtect); 1192 WINBASEAPI UINT WINAPI GetWriteWatch(DWORD dwFlags,PVOID lpBaseAddress,SIZE_T dwRegionSize,PVOID *lpAddresses,ULONG_PTR *lpdwCount,PULONG lpdwGranularity); 1193 WINBASEAPI UINT WINAPI ResetWriteWatch(LPVOID lpBaseAddress,SIZE_T dwRegionSize); 1194 WINBASEAPI SIZE_T WINAPI GetLargePageMinimum(VOID); 1195 WINBASEAPI UINT WINAPI EnumSystemFirmwareTables(DWORD FirmwareTableProviderSignature,PVOID pFirmwareTableEnumBuffer,DWORD BufferSize); 1196 WINBASEAPI UINT WINAPI GetSystemFirmwareTable(DWORD FirmwareTableProviderSignature,DWORD FirmwareTableID,PVOID pFirmwareTableBuffer,DWORD BufferSize); 1197 WINBASEAPI WINBOOL WINAPI VirtualFreeEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD dwFreeType); 1198 WINBASEAPI WINBOOL WINAPI VirtualProtectEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD flNewProtect,PDWORD lpflOldProtect); 1199 WINBASEAPI SIZE_T WINAPI VirtualQueryEx(HANDLE hProcess,LPCVOID lpAddress,PMEMORY_BASIC_INFORMATION lpBuffer,SIZE_T dwLength); 1200 WINBASEAPI HANDLE WINAPI HeapCreate(DWORD flOptions,SIZE_T dwInitialSize,SIZE_T dwMaximumSize); 1201 WINBASEAPI WINBOOL WINAPI HeapDestroy(HANDLE hHeap); 1202 WINBASEAPI LPVOID WINAPI HeapAlloc(HANDLE hHeap,DWORD dwFlags,SIZE_T dwBytes); 1203 WINBASEAPI LPVOID WINAPI HeapReAlloc(HANDLE hHeap,DWORD dwFlags,LPVOID lpMem,SIZE_T dwBytes); 1204 WINBASEAPI WINBOOL WINAPI HeapFree(HANDLE hHeap,DWORD dwFlags,LPVOID lpMem); 1205 WINBASEAPI SIZE_T WINAPI HeapSize(HANDLE hHeap,DWORD dwFlags,LPCVOID lpMem); 1206 WINBASEAPI WINBOOL WINAPI HeapValidate(HANDLE hHeap,DWORD dwFlags,LPCVOID lpMem); 1207 WINBASEAPI SIZE_T WINAPI HeapCompact(HANDLE hHeap,DWORD dwFlags); 1208 WINBASEAPI HANDLE WINAPI GetProcessHeap(VOID); 1209 WINBASEAPI DWORD WINAPI GetProcessHeaps(DWORD NumberOfHeaps,PHANDLE ProcessHeaps); 1210 1211 typedef struct _PROCESS_HEAP_ENTRY { 1212 PVOID lpData; 1213 DWORD cbData; 1214 BYTE cbOverhead; 1215 BYTE iRegionIndex; 1216 WORD wFlags; 1217 __C89_NAMELESS union { 1218 struct { 1219 HANDLE hMem; 1220 DWORD dwReserved[3]; 1221 } Block; 1222 struct { 1223 DWORD dwCommittedSize; 1224 DWORD dwUnCommittedSize; 1225 LPVOID lpFirstBlock; 1226 LPVOID lpLastBlock; 1227 } Region; 1228 } DUMMYUNIONNAME; 1229 } PROCESS_HEAP_ENTRY,*LPPROCESS_HEAP_ENTRY,*PPROCESS_HEAP_ENTRY; 1230 1231 #define PROCESS_HEAP_REGION 0x1 1232 #define PROCESS_HEAP_UNCOMMITTED_RANGE 0x2 1233 #define PROCESS_HEAP_ENTRY_BUSY 0x4 1234 #define PROCESS_HEAP_ENTRY_MOVEABLE 0x10 1235 #define PROCESS_HEAP_ENTRY_DDESHARE 0x20 1236 1237 WINBASEAPI WINBOOL WINAPI HeapLock(HANDLE hHeap); 1238 WINBASEAPI WINBOOL WINAPI HeapUnlock(HANDLE hHeap); 1239 WINBASEAPI WINBOOL WINAPI HeapWalk(HANDLE hHeap,LPPROCESS_HEAP_ENTRY lpEntry); 1240 WINBASEAPI WINBOOL WINAPI HeapSetInformation(HANDLE HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength); 1241 WINBASEAPI WINBOOL WINAPI HeapQueryInformation(HANDLE HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength,PSIZE_T ReturnLength); 1242 1243 #define SCS_32BIT_BINARY 0 1244 #define SCS_DOS_BINARY 1 1245 #define SCS_WOW_BINARY 2 1246 #define SCS_PIF_BINARY 3 1247 #define SCS_POSIX_BINARY 4 1248 #define SCS_OS216_BINARY 5 1249 #define SCS_64BIT_BINARY 6 1250 1251 #define GetBinaryType __MINGW_NAME_AW(GetBinaryType) 1252 #define GetShortPathName __MINGW_NAME_AW(GetShortPathName) 1253 #define GetLongPathName __MINGW_NAME_AW(GetLongPathName) 1254 #define SetEnvironmentStrings __MINGW_NAME_AW(SetEnvironmentStrings) 1255 #define FreeEnvironmentStrings __MINGW_NAME_AW(FreeEnvironmentStrings) 1256 1257 #if defined(UNICODE) 1258 #define GetEnvironmentStrings GetEnvironmentStringsW 1259 #endif 1260 1261 #ifdef _WIN64 1262 #define SCS_THIS_PLATFORM_BINARY SCS_64BIT_BINARY 1263 #else 1264 #define SCS_THIS_PLATFORM_BINARY SCS_32BIT_BINARY 1265 #endif 1266 1267 WINBASEAPI WINBOOL WINAPI GetBinaryTypeA(LPCSTR lpApplicationName,LPDWORD lpBinaryType); 1268 WINBASEAPI WINBOOL WINAPI GetBinaryTypeW(LPCWSTR lpApplicationName,LPDWORD lpBinaryType); 1269 WINBASEAPI DWORD WINAPI GetShortPathNameA(LPCSTR lpszLongPath,LPSTR lpszShortPath,DWORD cchBuffer); 1270 WINBASEAPI DWORD WINAPI GetShortPathNameW(LPCWSTR lpszLongPath,LPWSTR lpszShortPath,DWORD cchBuffer); 1271 WINBASEAPI DWORD WINAPI GetLongPathNameA(LPCSTR lpszShortPath,LPSTR lpszLongPath,DWORD cchBuffer); 1272 WINBASEAPI DWORD WINAPI GetLongPathNameW(LPCWSTR lpszShortPath,LPWSTR lpszLongPath,DWORD cchBuffer); 1273 WINBASEAPI WINBOOL WINAPI GetProcessAffinityMask(HANDLE hProcess,PDWORD_PTR lpProcessAffinityMask,PDWORD_PTR lpSystemAffinityMask); 1274 WINBASEAPI WINBOOL WINAPI SetProcessAffinityMask(HANDLE hProcess,DWORD_PTR dwProcessAffinityMask); 1275 1276 /* available in XP SP3, Vista SP1 and higher */ 1277 WINBASEAPI WINBOOL WINAPI GetProcessDEPPolicy (HANDLE hProcess,LPDWORD lpFlags,PBOOL lpPermanent); 1278 WINBASEAPI WINBOOL WINAPI SetProcessDEPPolicy (DWORD dwFlags); 1279 1280 WINBASEAPI WINBOOL WINAPI GetProcessHandleCount(HANDLE hProcess,PDWORD pdwHandleCount); 1281 WINBASEAPI WINBOOL WINAPI GetProcessTimes(HANDLE hProcess,LPFILETIME lpCreationTime,LPFILETIME lpExitTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime); 1282 WINBASEAPI WINBOOL WINAPI GetProcessIoCounters(HANDLE hProcess,PIO_COUNTERS lpIoCounters); 1283 WINBASEAPI WINBOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess,PSIZE_T lpMinimumWorkingSetSize,PSIZE_T lpMaximumWorkingSetSize); 1284 WINBASEAPI WINBOOL WINAPI GetProcessWorkingSetSizeEx(HANDLE hProcess,PSIZE_T lpMinimumWorkingSetSize,PSIZE_T lpMaximumWorkingSetSize,PDWORD Flags); 1285 WINBASEAPI WINBOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess,SIZE_T dwMinimumWorkingSetSize,SIZE_T dwMaximumWorkingSetSize); 1286 WINBASEAPI WINBOOL WINAPI SetProcessWorkingSetSizeEx(HANDLE hProcess,SIZE_T dwMinimumWorkingSetSize,SIZE_T dwMaximumWorkingSetSize,DWORD Flags); 1287 WINBASEAPI HANDLE WINAPI OpenProcess(DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwProcessId); 1288 WINBASEAPI HANDLE WINAPI GetCurrentProcess(VOID); 1289 WINBASEAPI DWORD WINAPI GetCurrentProcessId(VOID); 1290 WINBASEAPI DECLSPEC_NORETURN VOID WINAPI ExitProcess(UINT uExitCode); 1291 WINBASEAPI WINBOOL WINAPI TerminateProcess(HANDLE hProcess,UINT uExitCode); 1292 WINBASEAPI WINBOOL WINAPI GetExitCodeProcess(HANDLE hProcess,LPDWORD lpExitCode); 1293 WINBASEAPI VOID WINAPI FatalExit(int ExitCode); 1294 #pragma push_macro("GetEnvironmentStrings") 1295 #undef GetEnvironmentStrings 1296 #define GetEnvironmentStringsA GetEnvironmentStrings 1297 WINBASEAPI LPCH WINAPI GetEnvironmentStrings(VOID); 1298 #pragma pop_macro("GetEnvironmentStrings") 1299 WINBASEAPI LPWCH WINAPI GetEnvironmentStringsW(VOID); 1300 WINBASEAPI WINBOOL WINAPI SetEnvironmentStringsA(LPCH NewEnvironment); 1301 WINBASEAPI WINBOOL WINAPI SetEnvironmentStringsW(LPWCH NewEnvironment); 1302 WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsA(LPCH); 1303 WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsW(LPWCH); 1304 WINBASEAPI VOID WINAPI RaiseException(DWORD dwExceptionCode,DWORD dwExceptionFlags,DWORD nNumberOfArguments,CONST ULONG_PTR *lpArguments); 1305 WINBASEAPI LONG WINAPI UnhandledExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo); 1306 1307 typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)(struct _EXCEPTION_POINTERS *ExceptionInfo); 1308 typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER; 1309 1310 WINBASEAPI LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter); 1311 1312 #define FIBER_FLAG_FLOAT_SWITCH 0x1 1313 1314 WINBASEAPI LPVOID WINAPI CreateFiber(SIZE_T dwStackSize,LPFIBER_START_ROUTINE lpStartAddress,LPVOID lpParameter); 1315 WINBASEAPI LPVOID WINAPI CreateFiberEx(SIZE_T dwStackCommitSize,SIZE_T dwStackReserveSize,DWORD dwFlags,LPFIBER_START_ROUTINE lpStartAddress,LPVOID lpParameter); 1316 WINBASEAPI VOID WINAPI DeleteFiber(LPVOID lpFiber); 1317 WINBASEAPI LPVOID WINAPI ConvertThreadToFiber(LPVOID lpParameter); 1318 WINBASEAPI LPVOID WINAPI ConvertThreadToFiberEx(LPVOID lpParameter,DWORD dwFlags); 1319 WINBASEAPI WINBOOL WINAPI ConvertFiberToThread(VOID); 1320 WINBASEAPI VOID WINAPI SwitchToFiber(LPVOID lpFiber); 1321 WINBASEAPI WINBOOL WINAPI SwitchToThread(VOID); 1322 WINBASEAPI HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes,SIZE_T dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress,LPVOID lpParameter,DWORD dwCreationFlags,LPDWORD lpThreadId); 1323 WINBASEAPI HANDLE WINAPI CreateRemoteThread(HANDLE hProcess,LPSECURITY_ATTRIBUTES lpThreadAttributes,SIZE_T dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress,LPVOID lpParameter,DWORD dwCreationFlags,LPDWORD lpThreadId); 1324 WINBASEAPI HANDLE WINAPI GetCurrentThread(VOID); 1325 WINBASEAPI DWORD WINAPI GetCurrentThreadId(VOID); 1326 WINBASEAPI WINBOOL WINAPI SetThreadStackGuarantee (PULONG StackSizeInBytes); 1327 WINBASEAPI DWORD WINAPI GetProcessIdOfThread(HANDLE Thread); 1328 WINBASEAPI DWORD WINAPI GetThreadId(HANDLE Thread); 1329 WINBASEAPI DWORD WINAPI GetProcessId(HANDLE Process); 1330 WINBASEAPI DWORD WINAPI GetCurrentProcessorNumber(VOID); 1331 WINBASEAPI DWORD_PTR WINAPI SetThreadAffinityMask(HANDLE hThread,DWORD_PTR dwThreadAffinityMask); 1332 WINBASEAPI DWORD WINAPI SetThreadIdealProcessor(HANDLE hThread,DWORD dwIdealProcessor); 1333 WINBASEAPI WINBOOL WINAPI SetProcessPriorityBoost(HANDLE hProcess,WINBOOL bDisablePriorityBoost); 1334 WINBASEAPI WINBOOL WINAPI GetProcessPriorityBoost(HANDLE hProcess,PBOOL pDisablePriorityBoost); 1335 WINBASEAPI WINBOOL WINAPI RequestWakeupLatency(LATENCY_TIME latency); 1336 WINBASEAPI WINBOOL WINAPI IsSystemResumeAutomatic(VOID); 1337 WINBASEAPI HANDLE WINAPI OpenThread(DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwThreadId); 1338 WINBASEAPI WINBOOL WINAPI SetThreadPriority(HANDLE hThread,int nPriority); 1339 WINBASEAPI WINBOOL WINAPI SetThreadPriorityBoost(HANDLE hThread,WINBOOL bDisablePriorityBoost); 1340 WINBASEAPI WINBOOL WINAPI GetThreadPriorityBoost(HANDLE hThread,PBOOL pDisablePriorityBoost); 1341 WINBASEAPI int WINAPI GetThreadPriority(HANDLE hThread); 1342 WINBASEAPI WINBOOL WINAPI GetThreadTimes(HANDLE hThread,LPFILETIME lpCreationTime,LPFILETIME lpExitTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime); 1343 WINBASEAPI WINBOOL WINAPI GetThreadIOPendingFlag(HANDLE hThread,PBOOL lpIOIsPending); 1344 WINBASEAPI DECLSPEC_NORETURN VOID WINAPI ExitThread(DWORD dwExitCode); 1345 WINBASEAPI WINBOOL WINAPI TerminateThread(HANDLE hThread,DWORD dwExitCode); 1346 WINBASEAPI WINBOOL WINAPI GetExitCodeThread(HANDLE hThread,LPDWORD lpExitCode); 1347 WINBASEAPI WINBOOL WINAPI GetThreadSelectorEntry(HANDLE hThread,DWORD dwSelector,LPLDT_ENTRY lpSelectorEntry); 1348 WINBASEAPI EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE esFlags); 1349 WINBASEAPI DWORD WINAPI GetLastError(VOID); 1350 WINBASEAPI VOID WINAPI SetLastError(DWORD dwErrCode); 1351 1352 #ifndef RC_INVOKED 1353 #ifdef WINBASE_DECLARE_RESTORE_LAST_ERROR 1354 WINBASEAPI VOID WINAPI RestoreLastError(DWORD dwErrCode); 1355 1356 typedef VOID (WINAPI *PRESTORE_LAST_ERROR)(DWORD); 1357 1358 #define RESTORE_LAST_ERROR_NAME_A "RestoreLastError" 1359 #define RESTORE_LAST_ERROR_NAME_W L"RestoreLastError" 1360 #define RESTORE_LAST_ERROR_NAME TEXT("RestoreLastError") 1361 #endif 1362 #endif 1363 1364 #define HasOverlappedIoCompleted(lpOverlapped) (((DWORD)(lpOverlapped)->Internal)!=STATUS_PENDING) 1365 1366 WINBASEAPI WINBOOL WINAPI GetOverlappedResult(HANDLE hFile,LPOVERLAPPED lpOverlapped,LPDWORD lpNumberOfBytesTransferred,WINBOOL bWait); 1367 WINBASEAPI HANDLE WINAPI CreateIoCompletionPort(HANDLE FileHandle,HANDLE ExistingCompletionPort,ULONG_PTR CompletionKey,DWORD NumberOfConcurrentThreads); 1368 WINBASEAPI WINBOOL WINAPI GetQueuedCompletionStatus(HANDLE CompletionPort,LPDWORD lpNumberOfBytesTransferred,PULONG_PTR lpCompletionKey,LPOVERLAPPED *lpOverlapped,DWORD dwMilliseconds); 1369 WINBASEAPI WINBOOL WINAPI PostQueuedCompletionStatus(HANDLE CompletionPort,DWORD dwNumberOfBytesTransferred,ULONG_PTR dwCompletionKey,LPOVERLAPPED lpOverlapped); 1370 1371 #define SEM_FAILCRITICALERRORS 0x1 1372 #define SEM_NOGPFAULTERRORBOX 0x2 1373 #define SEM_NOALIGNMENTFAULTEXCEPT 0x4 1374 #define SEM_NOOPENFILEERRORBOX 0x8000 1375 1376 WINBASEAPI UINT WINAPI SetErrorMode(UINT uMode); 1377 WINBASEAPI WINBOOL WINAPI ReadProcessMemory(HANDLE hProcess,LPCVOID lpBaseAddress,LPVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesRead); 1378 WINBASEAPI WINBOOL WINAPI WriteProcessMemory(HANDLE hProcess,LPVOID lpBaseAddress,LPCVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesWritten); 1379 WINBASEAPI WINBOOL WINAPI GetThreadContext(HANDLE hThread,LPCONTEXT lpContext); 1380 WINBASEAPI WINBOOL WINAPI SetThreadContext(HANDLE hThread,CONST CONTEXT *lpContext); 1381 WINBASEAPI DWORD WINAPI SuspendThread(HANDLE hThread); 1382 WINBASEAPI DWORD WINAPI ResumeThread(HANDLE hThread); 1383 1384 typedef VOID (WINAPI *PAPCFUNC)(ULONG_PTR dwParam); 1385 1386 WINBASEAPI DWORD WINAPI QueueUserAPC(PAPCFUNC pfnAPC,HANDLE hThread,ULONG_PTR dwData); 1387 WINBASEAPI WINBOOL WINAPI IsDebuggerPresent(VOID); 1388 WINBASEAPI WINBOOL WINAPI CheckRemoteDebuggerPresent(HANDLE hProcess,PBOOL pbDebuggerPresent); 1389 WINBASEAPI VOID WINAPI DebugBreak(VOID); 1390 WINBASEAPI WINBOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT lpDebugEvent,DWORD dwMilliseconds); 1391 WINBASEAPI WINBOOL WINAPI ContinueDebugEvent(DWORD dwProcessId,DWORD dwThreadId,DWORD dwContinueStatus); 1392 WINBASEAPI WINBOOL WINAPI DebugActiveProcess(DWORD dwProcessId); 1393 WINBASEAPI WINBOOL WINAPI DebugActiveProcessStop(DWORD dwProcessId); 1394 WINBASEAPI WINBOOL WINAPI DebugSetProcessKillOnExit(WINBOOL KillOnExit); 1395 WINBASEAPI WINBOOL WINAPI DebugBreakProcess(HANDLE Process); 1396 WINBASEAPI VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION lpCriticalSection); 1397 WINBASEAPI VOID WINAPI EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection); 1398 WINBASEAPI VOID WINAPI LeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection); 1399 WINBASEAPI WINBOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION lpCriticalSection,DWORD dwSpinCount); 1400 WINBASEAPI DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection,DWORD dwSpinCount); 1401 WINBASEAPI WINBOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection); 1402 WINBASEAPI VOID WINAPI DeleteCriticalSection(LPCRITICAL_SECTION lpCriticalSection); 1403 WINBASEAPI WINBOOL WINAPI SetEvent(HANDLE hEvent); 1404 WINBASEAPI WINBOOL WINAPI ResetEvent(HANDLE hEvent); 1405 WINBASEAPI WINBOOL WINAPI PulseEvent(HANDLE hEvent); 1406 WINBASEAPI WINBOOL WINAPI ReleaseSemaphore(HANDLE hSemaphore,LONG lReleaseCount,LPLONG lpPreviousCount); 1407 WINBASEAPI WINBOOL WINAPI ReleaseMutex(HANDLE hMutex); 1408 WINBASEAPI DWORD WINAPI WaitForSingleObject(HANDLE hHandle,DWORD dwMilliseconds); 1409 WINBASEAPI DWORD WINAPI WaitForMultipleObjects(DWORD nCount,CONST HANDLE *lpHandles,WINBOOL bWaitAll,DWORD dwMilliseconds); 1410 WINBASEAPI VOID WINAPI Sleep(DWORD dwMilliseconds); 1411 WINBASEAPI HGLOBAL WINAPI LoadResource(HMODULE hModule,HRSRC hResInfo); 1412 WINBASEAPI DWORD WINAPI SizeofResource(HMODULE hModule,HRSRC hResInfo); 1413 WINBASEAPI ATOM WINAPI GlobalDeleteAtom(ATOM nAtom); 1414 WINBASEAPI WINBOOL WINAPI InitAtomTable(DWORD nSize); 1415 WINBASEAPI ATOM WINAPI DeleteAtom(ATOM nAtom); 1416 WINBASEAPI UINT WINAPI SetHandleCount(UINT uNumber); 1417 WINBASEAPI DWORD WINAPI GetLogicalDrives(VOID); 1418 WINBASEAPI WINBOOL WINAPI LockFile(HANDLE hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh); 1419 WINBASEAPI WINBOOL WINAPI UnlockFile(HANDLE hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh); 1420 WINBASEAPI WINBOOL WINAPI LockFileEx(HANDLE hFile,DWORD dwFlags,DWORD dwReserved,DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh,LPOVERLAPPED lpOverlapped); 1421 1422 #define LOCKFILE_FAIL_IMMEDIATELY 0x1 1423 #define LOCKFILE_EXCLUSIVE_LOCK 0x2 1424 1425 WINBASEAPI WINBOOL WINAPI UnlockFileEx(HANDLE hFile,DWORD dwReserved,DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh,LPOVERLAPPED lpOverlapped); 1426 1427 typedef struct _BY_HANDLE_FILE_INFORMATION { 1428 DWORD dwFileAttributes; 1429 FILETIME ftCreationTime; 1430 FILETIME ftLastAccessTime; 1431 FILETIME ftLastWriteTime; 1432 DWORD dwVolumeSerialNumber; 1433 DWORD nFileSizeHigh; 1434 DWORD nFileSizeLow; 1435 DWORD nNumberOfLinks; 1436 DWORD nFileIndexHigh; 1437 DWORD nFileIndexLow; 1438 } BY_HANDLE_FILE_INFORMATION,*PBY_HANDLE_FILE_INFORMATION,*LPBY_HANDLE_FILE_INFORMATION; 1439 1440 #define SetFileShortName __MINGW_NAME_AW(SetFileShortName) 1441 1442 WINBASEAPI WINBOOL WINAPI GetFileInformationByHandle(HANDLE hFile,LPBY_HANDLE_FILE_INFORMATION lpFileInformation); 1443 WINBASEAPI DWORD WINAPI GetFileType(HANDLE hFile); 1444 WINBASEAPI DWORD WINAPI GetFileSize(HANDLE hFile,LPDWORD lpFileSizeHigh); 1445 WINBASEAPI WINBOOL WINAPI GetFileSizeEx(HANDLE hFile,PLARGE_INTEGER lpFileSize); 1446 WINBASEAPI HANDLE WINAPI GetStdHandle(DWORD nStdHandle); 1447 WINBASEAPI WINBOOL WINAPI SetStdHandle(DWORD nStdHandle,HANDLE hHandle); 1448 WINBASEAPI WINBOOL WINAPI WriteFile(HANDLE hFile,LPCVOID lpBuffer,DWORD nNumberOfBytesToWrite,LPDWORD lpNumberOfBytesWritten,LPOVERLAPPED lpOverlapped); 1449 WINBASEAPI WINBOOL WINAPI ReadFile(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,LPOVERLAPPED lpOverlapped); 1450 WINBASEAPI WINBOOL WINAPI FlushFileBuffers(HANDLE hFile); 1451 WINBASEAPI WINBOOL WINAPI DeviceIoControl(HANDLE hDevice,DWORD dwIoControlCode,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesReturned,LPOVERLAPPED lpOverlapped); 1452 WINBASEAPI WINBOOL WINAPI RequestDeviceWakeup(HANDLE hDevice); 1453 WINBASEAPI WINBOOL WINAPI CancelDeviceWakeupRequest(HANDLE hDevice); 1454 WINBASEAPI WINBOOL WINAPI GetDevicePowerState(HANDLE hDevice,WINBOOL *pfOn); 1455 WINBASEAPI WINBOOL WINAPI SetMessageWaitingIndicator(HANDLE hMsgIndicator,ULONG ulMsgCount); 1456 WINBASEAPI WINBOOL WINAPI SetEndOfFile(HANDLE hFile); 1457 WINBASEAPI DWORD WINAPI SetFilePointer(HANDLE hFile,LONG lDistanceToMove,PLONG lpDistanceToMoveHigh,DWORD dwMoveMethod); 1458 WINBASEAPI WINBOOL WINAPI SetFilePointerEx(HANDLE hFile,LARGE_INTEGER liDistanceToMove,PLARGE_INTEGER lpNewFilePointer,DWORD dwMoveMethod); 1459 WINBASEAPI WINBOOL WINAPI FindClose(HANDLE hFindFile); 1460 WINBASEAPI WINBOOL WINAPI GetFileTime(HANDLE hFile,LPFILETIME lpCreationTime,LPFILETIME lpLastAccessTime,LPFILETIME lpLastWriteTime); 1461 WINBASEAPI WINBOOL WINAPI SetFileTime(HANDLE hFile,CONST FILETIME *lpCreationTime,CONST FILETIME *lpLastAccessTime,CONST FILETIME *lpLastWriteTime); 1462 WINBASEAPI WINBOOL WINAPI SetFileValidData(HANDLE hFile,LONGLONG ValidDataLength); 1463 WINBASEAPI WINBOOL WINAPI SetFileShortNameA(HANDLE hFile,LPCSTR lpShortName); 1464 WINBASEAPI WINBOOL WINAPI SetFileShortNameW(HANDLE hFile,LPCWSTR lpShortName); 1465 WINBASEAPI WINBOOL WINAPI CloseHandle(HANDLE hObject); 1466 WINBASEAPI WINBOOL WINAPI DuplicateHandle(HANDLE hSourceProcessHandle,HANDLE hSourceHandle,HANDLE hTargetProcessHandle,LPHANDLE lpTargetHandle,DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwOptions); 1467 WINBASEAPI WINBOOL WINAPI GetHandleInformation(HANDLE hObject,LPDWORD lpdwFlags); 1468 WINBASEAPI WINBOOL WINAPI SetHandleInformation(HANDLE hObject,DWORD dwMask,DWORD dwFlags); 1469 1470 #define HANDLE_FLAG_INHERIT 0x1 1471 #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x2 1472 1473 #define HINSTANCE_ERROR 32 1474 1475 WINBASEAPI DWORD WINAPI LoadModule(LPCSTR lpModuleName,LPVOID lpParameterBlock); 1476 WINBASEAPI UINT WINAPI WinExec(LPCSTR lpCmdLine,UINT uCmdShow); 1477 WINBASEAPI WINBOOL WINAPI ClearCommBreak(HANDLE hFile); 1478 WINBASEAPI WINBOOL WINAPI ClearCommError(HANDLE hFile,LPDWORD lpErrors,LPCOMSTAT lpStat); 1479 WINBASEAPI WINBOOL WINAPI SetupComm(HANDLE hFile,DWORD dwInQueue,DWORD dwOutQueue); 1480 WINBASEAPI WINBOOL WINAPI EscapeCommFunction(HANDLE hFile,DWORD dwFunc); 1481 WINBASEAPI WINBOOL WINAPI GetCommConfig(HANDLE hCommDev,LPCOMMCONFIG lpCC,LPDWORD lpdwSize); 1482 WINBASEAPI WINBOOL WINAPI GetCommMask(HANDLE hFile,LPDWORD lpEvtMask); 1483 WINBASEAPI WINBOOL WINAPI GetCommProperties(HANDLE hFile,LPCOMMPROP lpCommProp); 1484 WINBASEAPI WINBOOL WINAPI GetCommModemStatus(HANDLE hFile,LPDWORD lpModemStat); 1485 WINBASEAPI WINBOOL WINAPI GetCommState(HANDLE hFile,LPDCB lpDCB); 1486 WINBASEAPI WINBOOL WINAPI GetCommTimeouts(HANDLE hFile,LPCOMMTIMEOUTS lpCommTimeouts); 1487 WINBASEAPI WINBOOL WINAPI PurgeComm(HANDLE hFile,DWORD dwFlags); 1488 WINBASEAPI WINBOOL WINAPI SetCommBreak(HANDLE hFile); 1489 WINBASEAPI WINBOOL WINAPI SetCommConfig(HANDLE hCommDev,LPCOMMCONFIG lpCC,DWORD dwSize); 1490 WINBASEAPI WINBOOL WINAPI SetCommMask(HANDLE hFile,DWORD dwEvtMask); 1491 WINBASEAPI WINBOOL WINAPI SetCommState(HANDLE hFile,LPDCB lpDCB); 1492 WINBASEAPI WINBOOL WINAPI SetCommTimeouts(HANDLE hFile,LPCOMMTIMEOUTS lpCommTimeouts); 1493 WINBASEAPI WINBOOL WINAPI TransmitCommChar(HANDLE hFile,char cChar); 1494 WINBASEAPI WINBOOL WINAPI WaitCommEvent(HANDLE hFile,LPDWORD lpEvtMask,LPOVERLAPPED lpOverlapped); 1495 WINBASEAPI DWORD WINAPI SetTapePosition(HANDLE hDevice,DWORD dwPositionMethod,DWORD dwPartition,DWORD dwOffsetLow,DWORD dwOffsetHigh,WINBOOL bImmediate); 1496 WINBASEAPI DWORD WINAPI GetTapePosition(HANDLE hDevice,DWORD dwPositionType,LPDWORD lpdwPartition,LPDWORD lpdwOffsetLow,LPDWORD lpdwOffsetHigh); 1497 WINBASEAPI DWORD WINAPI PrepareTape(HANDLE hDevice,DWORD dwOperation,WINBOOL bImmediate); 1498 WINBASEAPI DWORD WINAPI EraseTape(HANDLE hDevice,DWORD dwEraseType,WINBOOL bImmediate); 1499 WINBASEAPI DWORD WINAPI CreateTapePartition(HANDLE hDevice,DWORD dwPartitionMethod,DWORD dwCount,DWORD dwSize); 1500 WINBASEAPI DWORD WINAPI WriteTapemark(HANDLE hDevice,DWORD dwTapemarkType,DWORD dwTapemarkCount,WINBOOL bImmediate); 1501 WINBASEAPI DWORD WINAPI GetTapeStatus(HANDLE hDevice); 1502 WINBASEAPI DWORD WINAPI GetTapeParameters(HANDLE hDevice,DWORD dwOperation,LPDWORD lpdwSize,LPVOID lpTapeInformation); 1503 1504 #define GET_TAPE_MEDIA_INFORMATION 0 1505 #define GET_TAPE_DRIVE_INFORMATION 1 1506 1507 WINBASEAPI DWORD WINAPI SetTapeParameters(HANDLE hDevice,DWORD dwOperation,LPVOID lpTapeInformation); 1508 1509 #define SET_TAPE_MEDIA_INFORMATION 0 1510 #define SET_TAPE_DRIVE_INFORMATION 1 1511 1512 WINBASEAPI WINBOOL WINAPI Beep(DWORD dwFreq,DWORD dwDuration); 1513 WINBASEAPI int WINAPI MulDiv(int nNumber,int nNumerator,int nDenominator); 1514 WINBASEAPI VOID WINAPI GetSystemTime(LPSYSTEMTIME lpSystemTime); 1515 WINBASEAPI VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime); 1516 WINBASEAPI WINBOOL WINAPI SetSystemTime(CONST SYSTEMTIME *lpSystemTime); 1517 WINBASEAPI VOID WINAPI GetLocalTime(LPSYSTEMTIME lpSystemTime); 1518 WINBASEAPI WINBOOL WINAPI SetLocalTime(CONST SYSTEMTIME *lpSystemTime); 1519 WINBASEAPI VOID WINAPI GetSystemInfo(LPSYSTEM_INFO lpSystemInfo); 1520 WINBASEAPI WINBOOL WINAPI SetSystemFileCacheSize(SIZE_T MinimumFileCacheSize,SIZE_T MaximumFileCacheSize,DWORD Flags); 1521 WINBASEAPI WINBOOL WINAPI GetSystemFileCacheSize(PSIZE_T lpMinimumFileCacheSize,PSIZE_T lpMaximumFileCacheSize,PDWORD lpFlags); 1522 WINBASEAPI WINBOOL WINAPI GetSystemRegistryQuota(PDWORD pdwQuotaAllowed,PDWORD pdwQuotaUsed); 1523 WINBOOL WINAPI GetSystemTimes(LPFILETIME lpIdleTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime); 1524 WINBASEAPI VOID WINAPI GetNativeSystemInfo(LPSYSTEM_INFO lpSystemInfo); 1525 WINBASEAPI WINBOOL WINAPI IsProcessorFeaturePresent(DWORD ProcessorFeature); 1526 1527 typedef struct _TIME_ZONE_INFORMATION { 1528 LONG Bias; 1529 WCHAR StandardName[32]; 1530 SYSTEMTIME StandardDate; 1531 LONG StandardBias; 1532 WCHAR DaylightName[32]; 1533 SYSTEMTIME DaylightDate; 1534 LONG DaylightBias; 1535 } TIME_ZONE_INFORMATION,*PTIME_ZONE_INFORMATION,*LPTIME_ZONE_INFORMATION; 1536 1537 #define FormatMessage __MINGW_NAME_AW(FormatMessage) 1538 1539 WINBASEAPI WINBOOL WINAPI SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION lpTimeZoneInformation,LPSYSTEMTIME lpUniversalTime,LPSYSTEMTIME lpLocalTime); 1540 WINBASEAPI WINBOOL WINAPI TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION lpTimeZoneInformation,LPSYSTEMTIME lpLocalTime,LPSYSTEMTIME lpUniversalTime); 1541 WINBASEAPI DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation); 1542 WINBASEAPI WINBOOL WINAPI SetTimeZoneInformation(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation); 1543 WINBASEAPI WINBOOL WINAPI SystemTimeToFileTime(CONST SYSTEMTIME *lpSystemTime,LPFILETIME lpFileTime); 1544 WINBASEAPI WINBOOL WINAPI FileTimeToLocalFileTime(CONST FILETIME *lpFileTime,LPFILETIME lpLocalFileTime); 1545 WINBASEAPI WINBOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME *lpLocalFileTime,LPFILETIME lpFileTime); 1546 WINBASEAPI WINBOOL WINAPI FileTimeToSystemTime(CONST FILETIME *lpFileTime,LPSYSTEMTIME lpSystemTime); 1547 WINBASEAPI LONG WINAPI CompareFileTime(CONST FILETIME *lpFileTime1,CONST FILETIME *lpFileTime2); 1548 WINBASEAPI WINBOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *lpFileTime,LPWORD lpFatDate,LPWORD lpFatTime); 1549 WINBASEAPI WINBOOL WINAPI DosDateTimeToFileTime(WORD wFatDate,WORD wFatTime,LPFILETIME lpFileTime); 1550 WINBASEAPI WINBOOL WINAPI SetSystemTimeAdjustment(DWORD dwTimeAdjustment,WINBOOL bTimeAdjustmentDisabled); 1551 WINBASEAPI WINBOOL WINAPI GetSystemTimeAdjustment(PDWORD lpTimeAdjustment,PDWORD lpTimeIncrement,PBOOL lpTimeAdjustmentDisabled); 1552 WINBASEAPI DWORD WINAPI FormatMessageA(DWORD dwFlags,LPCVOID lpSource,DWORD dwMessageId,DWORD dwLanguageId,LPSTR lpBuffer,DWORD nSize,va_list *Arguments); 1553 WINBASEAPI DWORD WINAPI FormatMessageW(DWORD dwFlags,LPCVOID lpSource,DWORD dwMessageId,DWORD dwLanguageId,LPWSTR lpBuffer,DWORD nSize,va_list *Arguments); 1554 1555 WINBASEAPI DWORD WINAPI GetTickCount(VOID); 1556 #ifndef __cplusplus 1557 #define GetCurrentTime() GetTickCount() 1558 #else 1559 DWORD FORCEINLINE GetCurrentTime(void) { 1560 return GetTickCount(); 1561 } 1562 #endif 1563 1564 #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x100 1565 #define FORMAT_MESSAGE_IGNORE_INSERTS 0x200 1566 #define FORMAT_MESSAGE_FROM_STRING 0x400 1567 #define FORMAT_MESSAGE_FROM_HMODULE 0x800 1568 #define FORMAT_MESSAGE_FROM_SYSTEM 0x1000 1569 #define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x2000 1570 #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0xff 1571 1572 #define CreateMailslot __MINGW_NAME_AW(CreateMailslot) 1573 #define EncryptFile __MINGW_NAME_AW(EncryptFile) 1574 #define DecryptFile __MINGW_NAME_AW(DecryptFile) 1575 #define FileEncryptionStatus __MINGW_NAME_AW(FileEncryptionStatus) 1576 1577 WINBASEAPI WINBOOL WINAPI CreatePipe(PHANDLE hReadPipe,PHANDLE hWritePipe,LPSECURITY_ATTRIBUTES lpPipeAttributes,DWORD nSize); 1578 WINBASEAPI WINBOOL WINAPI ConnectNamedPipe(HANDLE hNamedPipe,LPOVERLAPPED lpOverlapped); 1579 WINBASEAPI WINBOOL WINAPI DisconnectNamedPipe(HANDLE hNamedPipe); 1580 WINBASEAPI WINBOOL WINAPI SetNamedPipeHandleState(HANDLE hNamedPipe,LPDWORD lpMode,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout); 1581 WINBASEAPI WINBOOL WINAPI GetNamedPipeInfo(HANDLE hNamedPipe,LPDWORD lpFlags,LPDWORD lpOutBufferSize,LPDWORD lpInBufferSize,LPDWORD lpMaxInstances); 1582 WINBASEAPI WINBOOL WINAPI PeekNamedPipe(HANDLE hNamedPipe,LPVOID lpBuffer,DWORD nBufferSize,LPDWORD lpBytesRead,LPDWORD lpTotalBytesAvail,LPDWORD lpBytesLeftThisMessage); 1583 WINBASEAPI WINBOOL WINAPI TransactNamedPipe(HANDLE hNamedPipe,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,LPOVERLAPPED lpOverlapped); 1584 WINBASEAPI HANDLE WINAPI CreateMailslotA(LPCSTR lpName,DWORD nMaxMessageSize,DWORD lReadTimeout,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 1585 WINBASEAPI HANDLE WINAPI CreateMailslotW(LPCWSTR lpName,DWORD nMaxMessageSize,DWORD lReadTimeout,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 1586 WINBASEAPI WINBOOL WINAPI GetMailslotInfo(HANDLE hMailslot,LPDWORD lpMaxMessageSize,LPDWORD lpNextSize,LPDWORD lpMessageCount,LPDWORD lpReadTimeout); 1587 WINBASEAPI WINBOOL WINAPI SetMailslotInfo(HANDLE hMailslot,DWORD lReadTimeout); 1588 WINBASEAPI LPVOID WINAPI MapViewOfFile(HANDLE hFileMappingObject,DWORD dwDesiredAccess,DWORD dwFileOffsetHigh,DWORD dwFileOffsetLow,SIZE_T dwNumberOfBytesToMap); 1589 WINBASEAPI WINBOOL WINAPI FlushViewOfFile(LPCVOID lpBaseAddress,SIZE_T dwNumberOfBytesToFlush); 1590 WINBASEAPI WINBOOL WINAPI UnmapViewOfFile(LPCVOID lpBaseAddress); 1591 WINADVAPI WINBOOL WINAPI EncryptFileA(LPCSTR lpFileName); 1592 WINADVAPI WINBOOL WINAPI EncryptFileW(LPCWSTR lpFileName); 1593 WINADVAPI WINBOOL WINAPI DecryptFileA(LPCSTR lpFileName,DWORD dwReserved); 1594 WINADVAPI WINBOOL WINAPI DecryptFileW(LPCWSTR lpFileName,DWORD dwReserved); 1595 1596 #define FILE_ENCRYPTABLE 0 1597 #define FILE_IS_ENCRYPTED 1 1598 #define FILE_SYSTEM_ATTR 2 1599 #define FILE_ROOT_DIR 3 1600 #define FILE_SYSTEM_DIR 4 1601 #define FILE_UNKNOWN 5 1602 #define FILE_SYSTEM_NOT_SUPPORT 6 1603 #define FILE_USER_DISALLOWED 7 1604 #define FILE_READ_ONLY 8 1605 #define FILE_DIR_DISALLOWED 9 1606 1607 WINADVAPI WINBOOL WINAPI FileEncryptionStatusA(LPCSTR lpFileName,LPDWORD lpStatus); 1608 WINADVAPI WINBOOL WINAPI FileEncryptionStatusW(LPCWSTR lpFileName,LPDWORD lpStatus); 1609 1610 #define EFS_USE_RECOVERY_KEYS (0x1) 1611 1612 typedef DWORD (WINAPI *PFE_EXPORT_FUNC)(PBYTE pbData,PVOID pvCallbackContext,ULONG ulLength); 1613 typedef DWORD (WINAPI *PFE_IMPORT_FUNC)(PBYTE pbData,PVOID pvCallbackContext,PULONG ulLength); 1614 1615 #define CREATE_FOR_IMPORT (1) 1616 #define CREATE_FOR_DIR (2) 1617 #define OVERWRITE_HIDDEN (4) 1618 1619 #define OpenEncryptedFileRaw __MINGW_NAME_AW(OpenEncryptedFileRaw) 1620 #define lstrcmp __MINGW_NAME_AW(lstrcmp) 1621 #define lstrcmpi __MINGW_NAME_AW(lstrcmpi) 1622 #define lstrcpyn __MINGW_NAME_AW(lstrcpyn) 1623 #define lstrcpy __MINGW_NAME_AW(lstrcpy) 1624 #define lstrcat __MINGW_NAME_AW(lstrcat) 1625 #define lstrlen __MINGW_NAME_AW(lstrlen) 1626 1627 WINADVAPI DWORD WINAPI OpenEncryptedFileRawA(LPCSTR lpFileName,ULONG ulFlags,PVOID *pvContext); 1628 WINADVAPI DWORD WINAPI OpenEncryptedFileRawW(LPCWSTR lpFileName,ULONG ulFlags,PVOID *pvContext); 1629 WINADVAPI DWORD WINAPI ReadEncryptedFileRaw(PFE_EXPORT_FUNC pfExportCallback,PVOID pvCallbackContext,PVOID pvContext); 1630 WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC pfImportCallback,PVOID pvCallbackContext,PVOID pvContext); 1631 WINADVAPI VOID WINAPI CloseEncryptedFileRaw(PVOID pvContext); 1632 WINBASEAPI int WINAPI lstrcmpA(LPCSTR lpString1,LPCSTR lpString2); 1633 WINBASEAPI int WINAPI lstrcmpW(LPCWSTR lpString1,LPCWSTR lpString2); 1634 WINBASEAPI int WINAPI lstrcmpiA(LPCSTR lpString1,LPCSTR lpString2); 1635 WINBASEAPI int WINAPI lstrcmpiW(LPCWSTR lpString1,LPCWSTR lpString2); 1636 WINBASEAPI LPSTR WINAPI lstrcpynA(LPSTR lpString1,LPCSTR lpString2,int iMaxLength); 1637 WINBASEAPI LPWSTR WINAPI lstrcpynW(LPWSTR lpString1,LPCWSTR lpString2,int iMaxLength); 1638 WINBASEAPI LPSTR WINAPI lstrcpyA(LPSTR lpString1,LPCSTR lpString2); 1639 WINBASEAPI LPWSTR WINAPI lstrcpyW(LPWSTR lpString1,LPCWSTR lpString2); 1640 WINBASEAPI LPSTR WINAPI lstrcatA(LPSTR lpString1,LPCSTR lpString2); 1641 WINBASEAPI LPWSTR WINAPI lstrcatW(LPWSTR lpString1,LPCWSTR lpString2); 1642 WINBASEAPI int WINAPI lstrlenA(LPCSTR lpString); 1643 WINBASEAPI int WINAPI lstrlenW(LPCWSTR lpString); 1644 WINBASEAPI HFILE WINAPI OpenFile(LPCSTR lpFileName,LPOFSTRUCT lpReOpenBuff,UINT uStyle); 1645 WINBASEAPI HFILE WINAPI _lopen(LPCSTR lpPathName,int iReadWrite); 1646 WINBASEAPI HFILE WINAPI _lcreat(LPCSTR lpPathName,int iAttribute); 1647 WINBASEAPI UINT WINAPI _lread(HFILE hFile,LPVOID lpBuffer,UINT uBytes); 1648 WINBASEAPI UINT WINAPI _lwrite(HFILE hFile,LPCCH lpBuffer,UINT uBytes); 1649 WINBASEAPI __LONG32 WINAPI _hread(HFILE hFile,LPVOID lpBuffer,__LONG32 lBytes); 1650 WINBASEAPI __LONG32 WINAPI _hwrite(HFILE hFile,LPCCH lpBuffer,__LONG32 lBytes); 1651 WINBASEAPI HFILE WINAPI _lclose(HFILE hFile); 1652 WINBASEAPI LONG WINAPI _llseek(HFILE hFile,LONG lOffset,int iOrigin); 1653 WINADVAPI WINBOOL WINAPI IsTextUnicode(CONST VOID *lpv,int iSize,LPINT lpiResult); 1654 1655 #define FLS_OUT_OF_INDEXES ((DWORD)0xffffffff) 1656 1657 WINBASEAPI DWORD WINAPI FlsAlloc(PFLS_CALLBACK_FUNCTION lpCallback); 1658 WINBASEAPI PVOID WINAPI FlsGetValue(DWORD dwFlsIndex); 1659 WINBASEAPI WINBOOL WINAPI FlsSetValue(DWORD dwFlsIndex,PVOID lpFlsData); 1660 WINBASEAPI WINBOOL WINAPI FlsFree(DWORD dwFlsIndex); 1661 1662 #define TLS_OUT_OF_INDEXES ((DWORD)0xffffffff) 1663 1664 WINBASEAPI DWORD WINAPI TlsAlloc(VOID); 1665 WINBASEAPI LPVOID WINAPI TlsGetValue(DWORD dwTlsIndex); 1666 WINBASEAPI WINBOOL WINAPI TlsSetValue(DWORD dwTlsIndex,LPVOID lpTlsValue); 1667 WINBASEAPI WINBOOL WINAPI TlsFree(DWORD dwTlsIndex); 1668 1669 typedef VOID (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode,DWORD dwNumberOfBytesTransfered,LPOVERLAPPED lpOverlapped); 1670 1671 WINBASEAPI DWORD WINAPI SleepEx(DWORD dwMilliseconds,WINBOOL bAlertable); 1672 WINBASEAPI DWORD WINAPI WaitForSingleObjectEx(HANDLE hHandle,DWORD dwMilliseconds,WINBOOL bAlertable); 1673 WINBASEAPI DWORD WINAPI WaitForMultipleObjectsEx(DWORD nCount,CONST HANDLE *lpHandles,WINBOOL bWaitAll,DWORD dwMilliseconds,WINBOOL bAlertable); 1674 WINBASEAPI DWORD WINAPI SignalObjectAndWait(HANDLE hObjectToSignal,HANDLE hObjectToWaitOn,DWORD dwMilliseconds,WINBOOL bAlertable); 1675 WINBASEAPI WINBOOL WINAPI ReadFileEx(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); 1676 WINBASEAPI WINBOOL WINAPI WriteFileEx(HANDLE hFile,LPCVOID lpBuffer,DWORD nNumberOfBytesToWrite,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); 1677 WINBASEAPI WINBOOL WINAPI BackupRead(HANDLE hFile,LPBYTE lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,WINBOOL bAbort,WINBOOL bProcessSecurity,LPVOID *lpContext); 1678 WINBASEAPI WINBOOL WINAPI BackupSeek(HANDLE hFile,DWORD dwLowBytesToSeek,DWORD dwHighBytesToSeek,LPDWORD lpdwLowByteSeeked,LPDWORD lpdwHighByteSeeked,LPVOID *lpContext); 1679 WINBASEAPI WINBOOL WINAPI BackupWrite(HANDLE hFile,LPBYTE lpBuffer,DWORD nNumberOfBytesToWrite,LPDWORD lpNumberOfBytesWritten,WINBOOL bAbort,WINBOOL bProcessSecurity,LPVOID *lpContext); 1680 1681 typedef struct _WIN32_STREAM_ID { 1682 DWORD dwStreamId; 1683 DWORD dwStreamAttributes; 1684 LARGE_INTEGER Size; 1685 DWORD dwStreamNameSize; 1686 WCHAR cStreamName[ANYSIZE_ARRAY]; 1687 } WIN32_STREAM_ID,*LPWIN32_STREAM_ID; 1688 1689 #define BACKUP_INVALID 0x0 1690 #define BACKUP_DATA 0x1 1691 #define BACKUP_EA_DATA 0x2 1692 #define BACKUP_SECURITY_DATA 0x3 1693 #define BACKUP_ALTERNATE_DATA 0x4 1694 #define BACKUP_LINK 0x5 1695 #define BACKUP_PROPERTY_DATA 0x6 1696 #define BACKUP_OBJECT_ID 0x7 1697 #define BACKUP_REPARSE_DATA 0x8 1698 #define BACKUP_SPARSE_BLOCK 0x9 1699 1700 #define STREAM_NORMAL_ATTRIBUTE 0x0 1701 #define STREAM_MODIFIED_WHEN_READ 0x1 1702 #define STREAM_CONTAINS_SECURITY 0x2 1703 #define STREAM_CONTAINS_PROPERTIES 0x4 1704 #define STREAM_SPARSE_ATTRIBUTE 0x8 1705 1706 WINBASEAPI WINBOOL WINAPI ReadFileScatter(HANDLE hFile,FILE_SEGMENT_ELEMENT aSegmentArray[],DWORD nNumberOfBytesToRead,LPDWORD lpReserved,LPOVERLAPPED lpOverlapped); 1707 WINBASEAPI WINBOOL WINAPI WriteFileGather(HANDLE hFile,FILE_SEGMENT_ELEMENT aSegmentArray[],DWORD nNumberOfBytesToWrite,LPDWORD lpReserved,LPOVERLAPPED lpOverlapped); 1708 1709 #define STARTF_USESHOWWINDOW 0x1 1710 #define STARTF_USESIZE 0x2 1711 #define STARTF_USEPOSITION 0x4 1712 #define STARTF_USECOUNTCHARS 0x8 1713 #define STARTF_USEFILLATTRIBUTE 0x10 1714 #define STARTF_RUNFULLSCREEN 0x20 1715 #define STARTF_FORCEONFEEDBACK 0x40 1716 #define STARTF_FORCEOFFFEEDBACK 0x80 1717 #define STARTF_USESTDHANDLES 0x100 1718 1719 #define STARTF_USEHOTKEY 0x200 1720 1721 typedef struct _STARTUPINFOA { 1722 DWORD cb; 1723 LPSTR lpReserved; 1724 LPSTR lpDesktop; 1725 LPSTR lpTitle; 1726 DWORD dwX; 1727 DWORD dwY; 1728 DWORD dwXSize; 1729 DWORD dwYSize; 1730 DWORD dwXCountChars; 1731 DWORD dwYCountChars; 1732 DWORD dwFillAttribute; 1733 DWORD dwFlags; 1734 WORD wShowWindow; 1735 WORD cbReserved2; 1736 LPBYTE lpReserved2; 1737 HANDLE hStdInput; 1738 HANDLE hStdOutput; 1739 HANDLE hStdError; 1740 } STARTUPINFOA,*LPSTARTUPINFOA; 1741 1742 typedef struct _STARTUPINFOW { 1743 DWORD cb; 1744 LPWSTR lpReserved; 1745 LPWSTR lpDesktop; 1746 LPWSTR lpTitle; 1747 DWORD dwX; 1748 DWORD dwY; 1749 DWORD dwXSize; 1750 DWORD dwYSize; 1751 DWORD dwXCountChars; 1752 DWORD dwYCountChars; 1753 DWORD dwFillAttribute; 1754 DWORD dwFlags; 1755 WORD wShowWindow; 1756 WORD cbReserved2; 1757 LPBYTE lpReserved2; 1758 HANDLE hStdInput; 1759 HANDLE hStdOutput; 1760 HANDLE hStdError; 1761 } STARTUPINFOW,*LPSTARTUPINFOW; 1762 1763 __MINGW_TYPEDEF_AW(STARTUPINFO) 1764 __MINGW_TYPEDEF_AW(LPSTARTUPINFO) 1765 1766 #define SHUTDOWN_NORETRY 0x1 1767 1768 typedef struct _WIN32_FIND_DATAA { 1769 DWORD dwFileAttributes; 1770 FILETIME ftCreationTime; 1771 FILETIME ftLastAccessTime; 1772 FILETIME ftLastWriteTime; 1773 DWORD nFileSizeHigh; 1774 DWORD nFileSizeLow; 1775 DWORD dwReserved0; 1776 DWORD dwReserved1; 1777 CHAR cFileName[MAX_PATH]; 1778 CHAR cAlternateFileName[14]; 1779 } WIN32_FIND_DATAA,*PWIN32_FIND_DATAA,*LPWIN32_FIND_DATAA; 1780 1781 typedef struct _WIN32_FIND_DATAW { 1782 DWORD dwFileAttributes; 1783 FILETIME ftCreationTime; 1784 FILETIME ftLastAccessTime; 1785 FILETIME ftLastWriteTime; 1786 DWORD nFileSizeHigh; 1787 DWORD nFileSizeLow; 1788 DWORD dwReserved0; 1789 DWORD dwReserved1; 1790 WCHAR cFileName[MAX_PATH]; 1791 WCHAR cAlternateFileName[14]; 1792 } WIN32_FIND_DATAW,*PWIN32_FIND_DATAW,*LPWIN32_FIND_DATAW; 1793 1794 __MINGW_TYPEDEF_AW(WIN32_FIND_DATA) 1795 __MINGW_TYPEDEF_AW(PWIN32_FIND_DATA) 1796 __MINGW_TYPEDEF_AW(LPWIN32_FIND_DATA) 1797 1798 typedef struct _WIN32_FILE_ATTRIBUTE_DATA { 1799 DWORD dwFileAttributes; 1800 FILETIME ftCreationTime; 1801 FILETIME ftLastAccessTime; 1802 FILETIME ftLastWriteTime; 1803 DWORD nFileSizeHigh; 1804 DWORD nFileSizeLow; 1805 } WIN32_FILE_ATTRIBUTE_DATA,*LPWIN32_FILE_ATTRIBUTE_DATA; 1806 1807 #define CreateMutex __MINGW_NAME_AW(CreateMutex) 1808 #define OpenMutex __MINGW_NAME_AW(OpenMutex) 1809 #define CreateEvent __MINGW_NAME_AW(CreateEvent) 1810 #define OpenEvent __MINGW_NAME_AW(OpenEvent) 1811 #define CreateSemaphore __MINGW_NAME_AW(CreateSemaphore) 1812 #define OpenSemaphore __MINGW_NAME_AW(OpenSemaphore) 1813 1814 WINBASEAPI HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES lpMutexAttributes,WINBOOL bInitialOwner,LPCSTR lpName); 1815 WINBASEAPI HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES lpMutexAttributes,WINBOOL bInitialOwner,LPCWSTR lpName); 1816 WINBASEAPI HANDLE WINAPI OpenMutexA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName); 1817 WINBASEAPI HANDLE WINAPI OpenMutexW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName); 1818 WINBASEAPI HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES lpEventAttributes,WINBOOL bManualReset,WINBOOL bInitialState,LPCSTR lpName); 1819 WINBASEAPI HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes,WINBOOL bManualReset,WINBOOL bInitialState,LPCWSTR lpName); 1820 WINBASEAPI HANDLE WINAPI OpenEventA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName); 1821 WINBASEAPI HANDLE WINAPI OpenEventW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName); 1822 WINBASEAPI HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,LONG lInitialCount,LONG lMaximumCount,LPCSTR lpName); 1823 WINBASEAPI HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,LONG lInitialCount,LONG lMaximumCount,LPCWSTR lpName); 1824 WINBASEAPI HANDLE WINAPI OpenSemaphoreA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName); 1825 WINBASEAPI HANDLE WINAPI OpenSemaphoreW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName); 1826 1827 typedef VOID (WINAPI *PTIMERAPCROUTINE)(LPVOID lpArgToCompletionRoutine,DWORD dwTimerLowValue,DWORD dwTimerHighValue); 1828 1829 #define CreateWaitableTimer __MINGW_NAME_AW(CreateWaitableTimer) 1830 #define OpenWaitableTimer __MINGW_NAME_AW(OpenWaitableTimer) 1831 #define CreateFileMapping __MINGW_NAME_AW(CreateFileMapping) 1832 #define OpenFileMapping __MINGW_NAME_AW(OpenFileMapping) 1833 #define GetLogicalDriveStrings __MINGW_NAME_AW(GetLogicalDriveStrings) 1834 #define LoadLibrary __MINGW_NAME_AW(LoadLibrary) 1835 #define LoadLibraryEx __MINGW_NAME_AW(LoadLibraryEx) 1836 #define GetModuleFileName __MINGW_NAME_AW(GetModuleFileName) 1837 #define GetModuleHandle __MINGW_NAME_AW(GetModuleHandle) 1838 1839 WINBASEAPI HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES lpTimerAttributes,WINBOOL bManualReset,LPCSTR lpTimerName); 1840 WINBASEAPI HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES lpTimerAttributes,WINBOOL bManualReset,LPCWSTR lpTimerName); 1841 WINBASEAPI HANDLE WINAPI OpenWaitableTimerA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpTimerName); 1842 WINBASEAPI HANDLE WINAPI OpenWaitableTimerW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpTimerName); 1843 WINBASEAPI WINBOOL WINAPI SetWaitableTimer(HANDLE hTimer,const LARGE_INTEGER *lpDueTime,LONG lPeriod,PTIMERAPCROUTINE pfnCompletionRoutine,LPVOID lpArgToCompletionRoutine,WINBOOL fResume); 1844 WINBASEAPI WINBOOL WINAPI CancelWaitableTimer(HANDLE hTimer); 1845 WINBASEAPI HANDLE WINAPI CreateFileMappingA(HANDLE hFile,LPSECURITY_ATTRIBUTES lpFileMappingAttributes,DWORD flProtect,DWORD dwMaximumSizeHigh,DWORD dwMaximumSizeLow,LPCSTR lpName); 1846 WINBASEAPI HANDLE WINAPI CreateFileMappingW(HANDLE hFile,LPSECURITY_ATTRIBUTES lpFileMappingAttributes,DWORD flProtect,DWORD dwMaximumSizeHigh,DWORD dwMaximumSizeLow,LPCWSTR lpName); 1847 WINBASEAPI HANDLE WINAPI OpenFileMappingA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName); 1848 WINBASEAPI HANDLE WINAPI OpenFileMappingW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName); 1849 WINBASEAPI DWORD WINAPI GetLogicalDriveStringsA(DWORD nBufferLength,LPSTR lpBuffer); 1850 WINBASEAPI DWORD WINAPI GetLogicalDriveStringsW(DWORD nBufferLength,LPWSTR lpBuffer); 1851 1852 typedef enum _MEMORY_RESOURCE_NOTIFICATION_TYPE { 1853 LowMemoryResourceNotification,HighMemoryResourceNotification 1854 } MEMORY_RESOURCE_NOTIFICATION_TYPE; 1855 1856 WINBASEAPI HANDLE WINAPI CreateMemoryResourceNotification(MEMORY_RESOURCE_NOTIFICATION_TYPE NotificationType); 1857 WINBASEAPI WINBOOL WINAPI QueryMemoryResourceNotification(HANDLE ResourceNotificationHandle,PBOOL ResourceState); 1858 WINBASEAPI HMODULE WINAPI LoadLibraryA(LPCSTR lpLibFileName); 1859 WINBASEAPI HMODULE WINAPI LoadLibraryW(LPCWSTR lpLibFileName); 1860 WINBASEAPI HMODULE WINAPI LoadLibraryExA(LPCSTR lpLibFileName,HANDLE hFile,DWORD dwFlags); 1861 WINBASEAPI HMODULE WINAPI LoadLibraryExW(LPCWSTR lpLibFileName,HANDLE hFile,DWORD dwFlags); 1862 1863 #define DONT_RESOLVE_DLL_REFERENCES 0x1 1864 #define LOAD_LIBRARY_AS_DATAFILE 0x2 1865 #define LOAD_WITH_ALTERED_SEARCH_PATH 0x8 1866 #define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x10 1867 #define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x20 1868 #define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x40 1869 1870 WINBASEAPI DWORD WINAPI GetModuleFileNameA(HMODULE hModule,LPCH lpFilename,DWORD nSize); 1871 WINBASEAPI DWORD WINAPI GetModuleFileNameW(HMODULE hModule,LPWCH lpFilename,DWORD nSize); 1872 WINBASEAPI HMODULE WINAPI GetModuleHandleA(LPCSTR lpModuleName); 1873 WINBASEAPI HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName); 1874 1875 #ifndef RC_INVOKED 1876 #define GET_MODULE_HANDLE_EX_FLAG_PIN (0x1) 1877 #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT (0x2) 1878 #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS (0x4) 1879 1880 typedef WINBOOL (WINAPI *PGET_MODULE_HANDLE_EXA)(DWORD dwFlags,LPCSTR lpModuleName,HMODULE *phModule); 1881 typedef WINBOOL (WINAPI *PGET_MODULE_HANDLE_EXW)(DWORD dwFlags,LPCWSTR lpModuleName,HMODULE *phModule); 1882 1883 #define PGET_MODULE_HANDLE_EX __MINGW_NAME_AW(PGET_MODULE_HANDLE_EX) 1884 #define GetModuleHandleEx __MINGW_NAME_AW(GetModuleHandleEx) 1885 1886 WINBASEAPI WINBOOL WINAPI GetModuleHandleExA(DWORD dwFlags,LPCSTR lpModuleName,HMODULE *phModule); 1887 WINBASEAPI WINBOOL WINAPI GetModuleHandleExW(DWORD dwFlags,LPCWSTR lpModuleName,HMODULE *phModule); 1888 #endif 1889 1890 #define NeedCurrentDirectoryForExePath __MINGW_NAME_AW(NeedCurrentDirectoryForExePath) 1891 #define CreateProcess __MINGW_NAME_AW(CreateProcess) 1892 #define FatalAppExit __MINGW_NAME_AW(FatalAppExit) 1893 #define GetStartupInfo __MINGW_NAME_AW(GetStartupInfo) 1894 #define GetCommandLine __MINGW_NAME_AW(GetCommandLine) 1895 #define GetEnvironmentVariable __MINGW_NAME_AW(GetEnvironmentVariable) 1896 #define SetEnvironmentVariable __MINGW_NAME_AW(SetEnvironmentVariable) 1897 #define ExpandEnvironmentStrings __MINGW_NAME_AW(ExpandEnvironmentStrings) 1898 #define GetFirmwareEnvironmentVariable __MINGW_NAME_AW(GetFirmwareEnvironmentVariable) 1899 #define SetFirmwareEnvironmentVariable __MINGW_NAME_AW(SetFirmwareEnvironmentVariable) 1900 #define OutputDebugString __MINGW_NAME_AW(OutputDebugString) 1901 #define FindResource __MINGW_NAME_AW(FindResource) 1902 #define FindResourceEx __MINGW_NAME_AW(FindResourceEx) 1903 1904 WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathA(LPCSTR ExeName); 1905 WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathW(LPCWSTR ExeName); 1906 WINBASEAPI WINBOOL WINAPI CreateProcessA(LPCSTR lpApplicationName,LPSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCSTR lpCurrentDirectory,LPSTARTUPINFOA lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); 1907 WINBASEAPI WINBOOL WINAPI CreateProcessW(LPCWSTR lpApplicationName,LPWSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); 1908 WINBASEAPI DWORD WINAPI AddLocalAlternateComputerNameA(LPCSTR lpDnsFQHostname,ULONG ulFlags); 1909 WINBASEAPI DWORD WINAPI AddLocalAlternateComputerNameW(LPCWSTR lpDnsFQHostname,ULONG ulFlags); 1910 WINBASEAPI WINBOOL WINAPI SetProcessShutdownParameters(DWORD dwLevel,DWORD dwFlags); 1911 WINBASEAPI WINBOOL WINAPI GetProcessShutdownParameters(LPDWORD lpdwLevel,LPDWORD lpdwFlags); 1912 WINBASEAPI DWORD WINAPI GetProcessVersion(DWORD ProcessId); 1913 WINBASEAPI VOID WINAPI FatalAppExitA(UINT uAction,LPCSTR lpMessageText); 1914 WINBASEAPI VOID WINAPI FatalAppExitW(UINT uAction,LPCWSTR lpMessageText); 1915 WINBASEAPI VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo); 1916 WINBASEAPI VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW lpStartupInfo); 1917 WINBASEAPI LPSTR WINAPI GetCommandLineA(VOID); 1918 WINBASEAPI LPWSTR WINAPI GetCommandLineW(VOID); 1919 WINBASEAPI DWORD WINAPI GetEnvironmentVariableA(LPCSTR lpName,LPSTR lpBuffer,DWORD nSize); 1920 WINBASEAPI DWORD WINAPI GetEnvironmentVariableW(LPCWSTR lpName,LPWSTR lpBuffer,DWORD nSize); 1921 WINBASEAPI WINBOOL WINAPI SetEnvironmentVariableA(LPCSTR lpName,LPCSTR lpValue); 1922 WINBASEAPI WINBOOL WINAPI SetEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpValue); 1923 WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR lpSrc,LPSTR lpDst,DWORD nSize); 1924 WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR lpSrc,LPWSTR lpDst,DWORD nSize); 1925 WINBASEAPI DWORD WINAPI GetFirmwareEnvironmentVariableA(LPCSTR lpName,LPCSTR lpGuid,PVOID pBuffer,DWORD nSize); 1926 WINBASEAPI DWORD WINAPI GetFirmwareEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpGuid,PVOID pBuffer,DWORD nSize); 1927 WINBASEAPI WINBOOL WINAPI SetFirmwareEnvironmentVariableA(LPCSTR lpName,LPCSTR lpGuid,PVOID pValue,DWORD nSize); 1928 WINBASEAPI WINBOOL WINAPI SetFirmwareEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpGuid,PVOID pValue,DWORD nSize); 1929 WINBASEAPI VOID WINAPI OutputDebugStringA(LPCSTR lpOutputString); 1930 WINBASEAPI VOID WINAPI OutputDebugStringW(LPCWSTR lpOutputString); 1931 WINBASEAPI HRSRC WINAPI FindResourceA(HMODULE hModule,LPCSTR lpName,LPCSTR lpType); 1932 WINBASEAPI HRSRC WINAPI FindResourceW(HMODULE hModule,LPCWSTR lpName,LPCWSTR lpType); 1933 WINBASEAPI HRSRC WINAPI FindResourceExA(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,WORD wLanguage); 1934 WINBASEAPI HRSRC WINAPI FindResourceExW(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage); 1935 1936 /* available in XP SP3, Vista SP1 and higher */ 1937 typedef enum _DEP_SYSTEM_POLICY_TYPE { 1938 AlwaysOff = 0, 1939 AlwaysOn = 1, 1940 OptIn = 2, 1941 OptOut = 3 1942 } DEP_SYSTEM_POLICY_TYPE; 1943 WINBASEAPI DEP_SYSTEM_POLICY_TYPE WINAPI GetSystemDEPPolicy (void); 1944 1945 #define ENUMRESTYPEPROC __MINGW_NAME_AW(ENUMRESTYPEPROC) 1946 #define ENUMRESNAMEPROC __MINGW_NAME_AW(ENUMRESNAMEPROC) 1947 #define ENUMRESLANGPROC __MINGW_NAME_AW(ENUMRESLANGPROC) 1948 #define EnumResourceTypes __MINGW_NAME_AW(EnumResourceTypes) 1949 #define EnumResourceNames __MINGW_NAME_AW(EnumResourceNames) 1950 #define EnumResourceLanguages __MINGW_NAME_AW(EnumResourceLanguages) 1951 #define BeginUpdateResource __MINGW_NAME_AW(BeginUpdateResource) 1952 #define UpdateResource __MINGW_NAME_AW(UpdateResource) 1953 #define EndUpdateResource __MINGW_NAME_AW(EndUpdateResource) 1954 #define GlobalAddAtom __MINGW_NAME_AW(GlobalAddAtom) 1955 #define GlobalFindAtom __MINGW_NAME_AW(GlobalFindAtom) 1956 #define GlobalGetAtomName __MINGW_NAME_AW(GlobalGetAtomName) 1957 #define AddAtom __MINGW_NAME_AW(AddAtom) 1958 #define FindAtom __MINGW_NAME_AW(FindAtom) 1959 #define GetAtomName __MINGW_NAME_AW(GetAtomName) 1960 #define GetProfileInt __MINGW_NAME_AW(GetProfileInt) 1961 #define GetProfileString __MINGW_NAME_AW(GetProfileString) 1962 #define WriteProfileString __MINGW_NAME_AW(WriteProfileString) 1963 #define GetProfileSection __MINGW_NAME_AW(GetProfileSection) 1964 #define WriteProfileSection __MINGW_NAME_AW(WriteProfileSection) 1965 #define GetPrivateProfileInt __MINGW_NAME_AW(GetPrivateProfileInt) 1966 #define GetPrivateProfileString __MINGW_NAME_AW(GetPrivateProfileString) 1967 #define WritePrivateProfileString __MINGW_NAME_AW(WritePrivateProfileString) 1968 #define GetPrivateProfileSection __MINGW_NAME_AW(GetPrivateProfileSection) 1969 #define WritePrivateProfileSection __MINGW_NAME_AW(WritePrivateProfileSection) 1970 #define GetPrivateProfileSectionNames __MINGW_NAME_AW(GetPrivateProfileSectionNames) 1971 #define GetPrivateProfileStruct __MINGW_NAME_AW(GetPrivateProfileStruct) 1972 #define WritePrivateProfileStruct __MINGW_NAME_AW(WritePrivateProfileStruct) 1973 #define GetDriveType __MINGW_NAME_AW(GetDriveType) 1974 #define GetSystemDirectory __MINGW_NAME_AW(GetSystemDirectory) 1975 #define GetTempPath __MINGW_NAME_AW(GetTempPath) 1976 #define GetTempFileName __MINGW_NAME_AW(GetTempFileName) 1977 #define GetWindowsDirectory __MINGW_NAME_AW(GetWindowsDirectory) 1978 #define GetSystemWindowsDirectory __MINGW_NAME_AW(GetSystemWindowsDirectory) 1979 #define AddLocalAlternateComputerName __MINGW_NAME_AW(AddLocalAlternateComputerName) 1980 1981 typedef WINBOOL (CALLBACK *ENUMRESTYPEPROCA)(HMODULE hModule,LPSTR lpType,LONG_PTR lParam); 1982 typedef WINBOOL (CALLBACK *ENUMRESTYPEPROCW)(HMODULE hModule,LPWSTR lpType,LONG_PTR lParam); 1983 typedef WINBOOL (CALLBACK *ENUMRESNAMEPROCA)(HMODULE hModule,LPCSTR lpType,LPSTR lpName,LONG_PTR lParam); 1984 typedef WINBOOL (CALLBACK *ENUMRESNAMEPROCW)(HMODULE hModule,LPCWSTR lpType,LPWSTR lpName,LONG_PTR lParam); 1985 typedef WINBOOL (CALLBACK *ENUMRESLANGPROCA)(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,WORD wLanguage,LONG_PTR lParam); 1986 typedef WINBOOL (CALLBACK *ENUMRESLANGPROCW)(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage,LONG_PTR lParam); 1987 1988 WINBASEAPI WINBOOL WINAPI EnumResourceTypesA(HMODULE hModule,ENUMRESTYPEPROCA lpEnumFunc,LONG_PTR lParam); 1989 WINBASEAPI WINBOOL WINAPI EnumResourceTypesW(HMODULE hModule,ENUMRESTYPEPROCW lpEnumFunc,LONG_PTR lParam); 1990 WINBASEAPI WINBOOL WINAPI EnumResourceNamesA(HMODULE hModule,LPCSTR lpType,ENUMRESNAMEPROCA lpEnumFunc,LONG_PTR lParam); 1991 WINBASEAPI WINBOOL WINAPI EnumResourceNamesW(HMODULE hModule,LPCWSTR lpType,ENUMRESNAMEPROCW lpEnumFunc,LONG_PTR lParam); 1992 WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesA(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,ENUMRESLANGPROCA lpEnumFunc,LONG_PTR lParam); 1993 WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesW(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,ENUMRESLANGPROCW lpEnumFunc,LONG_PTR lParam); 1994 WINBASEAPI HANDLE WINAPI BeginUpdateResourceA(LPCSTR pFileName,WINBOOL bDeleteExistingResources); 1995 WINBASEAPI HANDLE WINAPI BeginUpdateResourceW(LPCWSTR pFileName,WINBOOL bDeleteExistingResources); 1996 WINBASEAPI WINBOOL WINAPI UpdateResourceA(HANDLE hUpdate,LPCSTR lpType,LPCSTR lpName,WORD wLanguage,LPVOID lpData,DWORD cb); 1997 WINBASEAPI WINBOOL WINAPI UpdateResourceW(HANDLE hUpdate,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage,LPVOID lpData,DWORD cb); 1998 WINBASEAPI WINBOOL WINAPI EndUpdateResourceA(HANDLE hUpdate,WINBOOL fDiscard); 1999 WINBASEAPI WINBOOL WINAPI EndUpdateResourceW(HANDLE hUpdate,WINBOOL fDiscard); 2000 WINBASEAPI ATOM WINAPI GlobalAddAtomA(LPCSTR lpString); 2001 WINBASEAPI ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString); 2002 WINBASEAPI ATOM WINAPI GlobalFindAtomA(LPCSTR lpString); 2003 WINBASEAPI ATOM WINAPI GlobalFindAtomW(LPCWSTR lpString); 2004 WINBASEAPI UINT WINAPI GlobalGetAtomNameA(ATOM nAtom,LPSTR lpBuffer,int nSize); 2005 WINBASEAPI UINT WINAPI GlobalGetAtomNameW(ATOM nAtom,LPWSTR lpBuffer,int nSize); 2006 WINBASEAPI ATOM WINAPI AddAtomA(LPCSTR lpString); 2007 WINBASEAPI ATOM WINAPI AddAtomW(LPCWSTR lpString); 2008 WINBASEAPI ATOM WINAPI FindAtomA(LPCSTR lpString); 2009 WINBASEAPI ATOM WINAPI FindAtomW(LPCWSTR lpString); 2010 WINBASEAPI UINT WINAPI GetAtomNameA(ATOM nAtom,LPSTR lpBuffer,int nSize); 2011 WINBASEAPI UINT WINAPI GetAtomNameW(ATOM nAtom,LPWSTR lpBuffer,int nSize); 2012 WINBASEAPI UINT WINAPI GetProfileIntA(LPCSTR lpAppName,LPCSTR lpKeyName,INT nDefault); 2013 WINBASEAPI UINT WINAPI GetProfileIntW(LPCWSTR lpAppName,LPCWSTR lpKeyName,INT nDefault); 2014 WINBASEAPI DWORD WINAPI GetProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpDefault,LPSTR lpReturnedString,DWORD nSize); 2015 WINBASEAPI DWORD WINAPI GetProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpDefault,LPWSTR lpReturnedString,DWORD nSize); 2016 WINBASEAPI WINBOOL WINAPI WriteProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpString); 2017 WINBASEAPI WINBOOL WINAPI WriteProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpString); 2018 WINBASEAPI DWORD WINAPI GetProfileSectionA(LPCSTR lpAppName,LPSTR lpReturnedString,DWORD nSize); 2019 WINBASEAPI DWORD WINAPI GetProfileSectionW(LPCWSTR lpAppName,LPWSTR lpReturnedString,DWORD nSize); 2020 WINBASEAPI WINBOOL WINAPI WriteProfileSectionA(LPCSTR lpAppName,LPCSTR lpString); 2021 WINBASEAPI WINBOOL WINAPI WriteProfileSectionW(LPCWSTR lpAppName,LPCWSTR lpString); 2022 WINBASEAPI UINT WINAPI GetPrivateProfileIntA(LPCSTR lpAppName,LPCSTR lpKeyName,INT nDefault,LPCSTR lpFileName); 2023 WINBASEAPI UINT WINAPI GetPrivateProfileIntW(LPCWSTR lpAppName,LPCWSTR lpKeyName,INT nDefault,LPCWSTR lpFileName); 2024 WINBASEAPI DWORD WINAPI GetPrivateProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpDefault,LPSTR lpReturnedString,DWORD nSize,LPCSTR lpFileName); 2025 WINBASEAPI DWORD WINAPI GetPrivateProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpDefault,LPWSTR lpReturnedString,DWORD nSize,LPCWSTR lpFileName); 2026 WINBASEAPI WINBOOL WINAPI WritePrivateProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpString,LPCSTR lpFileName); 2027 WINBASEAPI WINBOOL WINAPI WritePrivateProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpString,LPCWSTR lpFileName); 2028 WINBASEAPI DWORD WINAPI GetPrivateProfileSectionA(LPCSTR lpAppName,LPSTR lpReturnedString,DWORD nSize,LPCSTR lpFileName); 2029 WINBASEAPI DWORD WINAPI GetPrivateProfileSectionW(LPCWSTR lpAppName,LPWSTR lpReturnedString,DWORD nSize,LPCWSTR lpFileName); 2030 WINBASEAPI WINBOOL WINAPI WritePrivateProfileSectionA(LPCSTR lpAppName,LPCSTR lpString,LPCSTR lpFileName); 2031 WINBASEAPI WINBOOL WINAPI WritePrivateProfileSectionW(LPCWSTR lpAppName,LPCWSTR lpString,LPCWSTR lpFileName); 2032 WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR lpszReturnBuffer,DWORD nSize,LPCSTR lpFileName); 2033 WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR lpszReturnBuffer,DWORD nSize,LPCWSTR lpFileName); 2034 WINBASEAPI WINBOOL WINAPI GetPrivateProfileStructA(LPCSTR lpszSection,LPCSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCSTR szFile); 2035 WINBASEAPI WINBOOL WINAPI GetPrivateProfileStructW(LPCWSTR lpszSection,LPCWSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCWSTR szFile); 2036 WINBASEAPI WINBOOL WINAPI WritePrivateProfileStructA(LPCSTR lpszSection,LPCSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCSTR szFile); 2037 WINBASEAPI WINBOOL WINAPI WritePrivateProfileStructW(LPCWSTR lpszSection,LPCWSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCWSTR szFile); 2038 WINBASEAPI UINT WINAPI GetDriveTypeA(LPCSTR lpRootPathName); 2039 WINBASEAPI UINT WINAPI GetDriveTypeW(LPCWSTR lpRootPathName); 2040 WINBASEAPI UINT WINAPI GetSystemDirectoryA(LPSTR lpBuffer,UINT uSize); 2041 WINBASEAPI UINT WINAPI GetSystemDirectoryW(LPWSTR lpBuffer,UINT uSize); 2042 WINBASEAPI DWORD WINAPI GetTempPathA(DWORD nBufferLength,LPSTR lpBuffer); 2043 WINBASEAPI DWORD WINAPI GetTempPathW(DWORD nBufferLength,LPWSTR lpBuffer); 2044 WINBASEAPI UINT WINAPI GetTempFileNameA(LPCSTR lpPathName,LPCSTR lpPrefixString,UINT uUnique,LPSTR lpTempFileName); 2045 WINBASEAPI UINT WINAPI GetTempFileNameW(LPCWSTR lpPathName,LPCWSTR lpPrefixString,UINT uUnique,LPWSTR lpTempFileName); 2046 WINBASEAPI UINT WINAPI GetWindowsDirectoryA(LPSTR lpBuffer,UINT uSize); 2047 WINBASEAPI UINT WINAPI GetWindowsDirectoryW(LPWSTR lpBuffer,UINT uSize); 2048 WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryA(LPSTR lpBuffer,UINT uSize); 2049 WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR lpBuffer,UINT uSize); 2050 2051 #ifndef RC_INVOKED 2052 #define GetSystemWow64Directory __MINGW_NAME_AW(GetSystemWow64Directory) 2053 2054 WINBASEAPI UINT WINAPI GetSystemWow64DirectoryA(LPSTR lpBuffer,UINT uSize); 2055 WINBASEAPI UINT WINAPI GetSystemWow64DirectoryW(LPWSTR lpBuffer,UINT uSize); 2056 WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN Wow64FsEnableRedirection); 2057 WINBASEAPI WINBOOL WINAPI Wow64DisableWow64FsRedirection(PVOID *OldValue); 2058 WINBASEAPI WINBOOL WINAPI Wow64RevertWow64FsRedirection(PVOID OlValue); 2059 2060 typedef UINT (WINAPI *PGET_SYSTEM_WOW64_DIRECTORY_A)(LPSTR lpBuffer,UINT uSize); 2061 typedef UINT (WINAPI *PGET_SYSTEM_WOW64_DIRECTORY_W)(LPWSTR lpBuffer,UINT uSize); 2062 2063 #define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A "GetSystemWow64DirectoryA" 2064 #define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W L"GetSystemWow64DirectoryA" 2065 #define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T TEXT("GetSystemWow64DirectoryA") 2066 #define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A "GetSystemWow64DirectoryW" 2067 #define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W L"GetSystemWow64DirectoryW" 2068 #define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T TEXT("GetSystemWow64DirectoryW") 2069 2070 #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A __MINGW_NAME_UAW_EXT(GET_SYSTEM_WOW64_DIRECTORY_NAME,A) 2071 #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W __MINGW_NAME_UAW_EXT(GET_SYSTEM_WOW64_DIRECTORY_NAME,W) 2072 #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T __MINGW_NAME_UAW_EXT(GET_SYSTEM_WOW64_DIRECTORY_NAME,T) 2073 2074 #endif 2075 2076 #define SetCurrentDirectory __MINGW_NAME_AW(SetCurrentDirectory) 2077 #define GetCurrentDirectory __MINGW_NAME_AW(GetCurrentDirectory) 2078 #define SetDllDirectory __MINGW_NAME_AW(SetDllDirectory) 2079 #define GetDllDirectory __MINGW_NAME_AW(GetDllDirectory) 2080 #define GetDiskFreeSpace __MINGW_NAME_AW(GetDiskFreeSpace) 2081 #define GetDiskFreeSpaceEx __MINGW_NAME_AW(GetDiskFreeSpaceEx) 2082 #define CreateDirectory __MINGW_NAME_AW(CreateDirectory) 2083 #define CreateDirectoryEx __MINGW_NAME_AW(CreateDirectoryEx) 2084 #define RemoveDirectory __MINGW_NAME_AW(RemoveDirectory) 2085 #define GetFullPathName __MINGW_NAME_AW(GetFullPathName) 2086 #define DefineDosDevice __MINGW_NAME_AW(DefineDosDevice) 2087 #define QueryDosDevice __MINGW_NAME_AW(QueryDosDevice) 2088 #define CreateFile __MINGW_NAME_AW(CreateFile) 2089 #define SetFileAttributes __MINGW_NAME_AW(SetFileAttributes) 2090 #define GetFileAttributes __MINGW_NAME_AW(GetFileAttributes) 2091 2092 WINBASEAPI WINBOOL WINAPI SetCurrentDirectoryA(LPCSTR lpPathName); 2093 WINBASEAPI WINBOOL WINAPI SetCurrentDirectoryW(LPCWSTR lpPathName); 2094 WINBASEAPI DWORD WINAPI GetCurrentDirectoryA(DWORD nBufferLength,LPSTR lpBuffer); 2095 WINBASEAPI DWORD WINAPI GetCurrentDirectoryW(DWORD nBufferLength,LPWSTR lpBuffer); 2096 WINBASEAPI WINBOOL WINAPI SetDllDirectoryA(LPCSTR lpPathName); 2097 WINBASEAPI WINBOOL WINAPI SetDllDirectoryW(LPCWSTR lpPathName); 2098 WINBASEAPI DWORD WINAPI GetDllDirectoryA(DWORD nBufferLength,LPSTR lpBuffer); 2099 WINBASEAPI DWORD WINAPI GetDllDirectoryW(DWORD nBufferLength,LPWSTR lpBuffer); 2100 WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceA(LPCSTR lpRootPathName,LPDWORD lpSectorsPerCluster,LPDWORD lpBytesPerSector,LPDWORD lpNumberOfFreeClusters,LPDWORD lpTotalNumberOfClusters); 2101 WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceW(LPCWSTR lpRootPathName,LPDWORD lpSectorsPerCluster,LPDWORD lpBytesPerSector,LPDWORD lpNumberOfFreeClusters,LPDWORD lpTotalNumberOfClusters); 2102 WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceExA(LPCSTR lpDirectoryName,PULARGE_INTEGER lpFreeBytesAvailableToCaller,PULARGE_INTEGER lpTotalNumberOfBytes,PULARGE_INTEGER lpTotalNumberOfFreeBytes); 2103 WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR lpDirectoryName,PULARGE_INTEGER lpFreeBytesAvailableToCaller,PULARGE_INTEGER lpTotalNumberOfBytes,PULARGE_INTEGER lpTotalNumberOfFreeBytes); 2104 WINBASEAPI WINBOOL WINAPI CreateDirectoryA(LPCSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 2105 WINBASEAPI WINBOOL WINAPI CreateDirectoryW(LPCWSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 2106 WINBASEAPI WINBOOL WINAPI CreateDirectoryExA(LPCSTR lpTemplateDirectory,LPCSTR lpNewDirectory,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 2107 WINBASEAPI WINBOOL WINAPI CreateDirectoryExW(LPCWSTR lpTemplateDirectory,LPCWSTR lpNewDirectory,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 2108 WINBASEAPI WINBOOL WINAPI RemoveDirectoryA(LPCSTR lpPathName); 2109 WINBASEAPI WINBOOL WINAPI RemoveDirectoryW(LPCWSTR lpPathName); 2110 WINBASEAPI DWORD WINAPI GetFullPathNameA(LPCSTR lpFileName,DWORD nBufferLength,LPSTR lpBuffer,LPSTR *lpFilePart); 2111 WINBASEAPI DWORD WINAPI GetFullPathNameW(LPCWSTR lpFileName,DWORD nBufferLength,LPWSTR lpBuffer,LPWSTR *lpFilePart); 2112 2113 #define DDD_RAW_TARGET_PATH 0x1 2114 #define DDD_REMOVE_DEFINITION 0x2 2115 #define DDD_EXACT_MATCH_ON_REMOVE 0x4 2116 #define DDD_NO_BROADCAST_SYSTEM 0x8 2117 #define DDD_LUID_BROADCAST_DRIVE 0x10 2118 2119 WINBASEAPI WINBOOL WINAPI DefineDosDeviceA(DWORD dwFlags,LPCSTR lpDeviceName,LPCSTR lpTargetPath); 2120 WINBASEAPI WINBOOL WINAPI DefineDosDeviceW(DWORD dwFlags,LPCWSTR lpDeviceName,LPCWSTR lpTargetPath); 2121 WINBASEAPI DWORD WINAPI QueryDosDeviceA(LPCSTR lpDeviceName,LPSTR lpTargetPath,DWORD ucchMax); 2122 WINBASEAPI DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName,LPWSTR lpTargetPath,DWORD ucchMax); 2123 2124 #define EXPAND_LOCAL_DRIVES 2125 2126 WINBASEAPI HANDLE WINAPI CreateFileA(LPCSTR lpFileName,DWORD dwDesiredAccess,DWORD dwShareMode,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD dwCreationDisposition,DWORD dwFlagsAndAttributes,HANDLE hTemplateFile); 2127 WINBASEAPI HANDLE WINAPI CreateFileW(LPCWSTR lpFileName,DWORD dwDesiredAccess,DWORD dwShareMode,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD dwCreationDisposition,DWORD dwFlagsAndAttributes,HANDLE hTemplateFile); 2128 WINBASEAPI HANDLE WINAPI ReOpenFile(HANDLE hOriginalFile,DWORD dwDesiredAccess,DWORD dwShareMode,DWORD dwFlagsAndAttributes); 2129 WINBASEAPI WINBOOL WINAPI SetFileAttributesA(LPCSTR lpFileName,DWORD dwFileAttributes); 2130 WINBASEAPI WINBOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName,DWORD dwFileAttributes); 2131 WINBASEAPI DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName); 2132 WINBASEAPI DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName); 2133 2134 typedef enum _GET_FILEEX_INFO_LEVELS { 2135 GetFileExInfoStandard,GetFileExMaxInfoLevel 2136 } GET_FILEEX_INFO_LEVELS; 2137 2138 #define GetFileAttributesEx __MINGW_NAME_AW(GetFileAttributesEx) 2139 #define GetCompressedFileSize __MINGW_NAME_AW(GetCompressedFileSize) 2140 #define DeleteFile __MINGW_NAME_AW(DeleteFile) 2141 #define CheckNameLegalDOS8Dot3 __MINGW_NAME_AW(CheckNameLegalDOS8Dot3) 2142 2143 WINBASEAPI WINBOOL WINAPI GetFileAttributesExA(LPCSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,LPVOID lpFileInformation); 2144 WINBASEAPI WINBOOL WINAPI GetFileAttributesExW(LPCWSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,LPVOID lpFileInformation); 2145 WINBASEAPI DWORD WINAPI GetCompressedFileSizeA(LPCSTR lpFileName,LPDWORD lpFileSizeHigh); 2146 WINBASEAPI DWORD WINAPI GetCompressedFileSizeW(LPCWSTR lpFileName,LPDWORD lpFileSizeHigh); 2147 WINBASEAPI WINBOOL WINAPI DeleteFileA(LPCSTR lpFileName); 2148 WINBASEAPI WINBOOL WINAPI DeleteFileW(LPCWSTR lpFileName); 2149 WINBASEAPI WINBOOL WINAPI CheckNameLegalDOS8Dot3A(LPCSTR lpName,LPSTR lpOemName,DWORD OemNameSize,PBOOL pbNameContainsSpaces,PBOOL pbNameLegal); 2150 WINBASEAPI WINBOOL WINAPI CheckNameLegalDOS8Dot3W(LPCWSTR lpName,LPSTR lpOemName,DWORD OemNameSize,PBOOL pbNameContainsSpaces,PBOOL pbNameLegal); 2151 2152 typedef enum _FINDEX_INFO_LEVELS { 2153 FindExInfoStandard,FindExInfoMaxInfoLevel 2154 } FINDEX_INFO_LEVELS; 2155 2156 typedef enum _FINDEX_SEARCH_OPS { 2157 FindExSearchNameMatch,FindExSearchLimitToDirectories,FindExSearchLimitToDevices,FindExSearchMaxSearchOp 2158 } FINDEX_SEARCH_OPS; 2159 2160 #define FIND_FIRST_EX_CASE_SENSITIVE 0x1 2161 2162 #define FindFirstFileEx __MINGW_NAME_AW(FindFirstFileEx) 2163 #define FindFirstFile __MINGW_NAME_AW(FindFirstFile) 2164 #define FindNextFile __MINGW_NAME_AW(FindNextFile) 2165 #define SearchPath __MINGW_NAME_AW(SearchPath) 2166 #define CopyFile __MINGW_NAME_AW(CopyFile) 2167 #define CopyFileEx __MINGW_NAME_AW(CopyFileEx) 2168 #define MoveFile __MINGW_NAME_AW(MoveFile) 2169 #define MoveFileEx __MINGW_NAME_AW(MoveFileEx) 2170 #define MoveFileWithProgress __MINGW_NAME_AW(MoveFileWithProgress) 2171 #define ReplaceFile __MINGW_NAME_AW(ReplaceFile) 2172 #define CreateHardLink __MINGW_NAME_AW(CreateHardLink) 2173 #define CreateNamedPipe __MINGW_NAME_AW(CreateNamedPipe) 2174 #define GetNamedPipeHandleState __MINGW_NAME_AW(GetNamedPipeHandleState) 2175 #define CallNamedPipe __MINGW_NAME_AW(CallNamedPipe) 2176 #define WaitNamedPipe __MINGW_NAME_AW(WaitNamedPipe) 2177 #define SetVolumeLabel __MINGW_NAME_AW(SetVolumeLabel) 2178 #define GetVolumeInformation __MINGW_NAME_AW(GetVolumeInformation) 2179 #define ClearEventLog __MINGW_NAME_AW(ClearEventLog) 2180 #define BackupEventLog __MINGW_NAME_AW(BackupEventLog) 2181 #define OpenEventLog __MINGW_NAME_AW(OpenEventLog) 2182 #define RegisterEventSource __MINGW_NAME_AW(RegisterEventSource) 2183 #define OpenBackupEventLog __MINGW_NAME_AW(OpenBackupEventLog) 2184 #define ReadEventLog __MINGW_NAME_AW(ReadEventLog) 2185 #define ReportEvent __MINGW_NAME_AW(ReportEvent) 2186 #define AccessCheckAndAuditAlarm __MINGW_NAME_AW(AccessCheckAndAuditAlarm) 2187 #define AccessCheckByTypeAndAuditAlarm __MINGW_NAME_AW(AccessCheckByTypeAndAuditAlarm) 2188 #define AccessCheckByTypeResultListAndAuditAlarm __MINGW_NAME_AW(AccessCheckByTypeResultListAndAuditAlarm) 2189 #define AccessCheckByTypeResultListAndAuditAlarmByHandle __MINGW_NAME_AW(AccessCheckByTypeResultListAndAuditAlarmByHandle) 2190 #define ObjectOpenAuditAlarm __MINGW_NAME_AW(ObjectOpenAuditAlarm) 2191 #define ObjectPrivilegeAuditAlarm __MINGW_NAME_AW(ObjectPrivilegeAuditAlarm) 2192 #define ObjectCloseAuditAlarm __MINGW_NAME_AW(ObjectCloseAuditAlarm) 2193 #define ObjectDeleteAuditAlarm __MINGW_NAME_AW(ObjectDeleteAuditAlarm) 2194 #define PrivilegedServiceAuditAlarm __MINGW_NAME_AW(PrivilegedServiceAuditAlarm) 2195 #define SetFileSecurity __MINGW_NAME_AW(SetFileSecurity) 2196 #define GetFileSecurity __MINGW_NAME_AW(GetFileSecurity) 2197 #define FindFirstChangeNotification __MINGW_NAME_AW(FindFirstChangeNotification) 2198 #define IsBadStringPtr __MINGW_NAME_AW(IsBadStringPtr) 2199 #define LookupAccountSid __MINGW_NAME_AW(LookupAccountSid) 2200 #define LookupAccountName __MINGW_NAME_AW(LookupAccountName) 2201 #define LookupPrivilegeValue __MINGW_NAME_AW(LookupPrivilegeValue) 2202 #define LookupPrivilegeName __MINGW_NAME_AW(LookupPrivilegeName) 2203 #define LookupPrivilegeDisplayName __MINGW_NAME_AW(LookupPrivilegeDisplayName) 2204 #define BuildCommDCB __MINGW_NAME_AW(BuildCommDCB) 2205 #define BuildCommDCBAndTimeouts __MINGW_NAME_AW(BuildCommDCBAndTimeouts) 2206 #define CommConfigDialog __MINGW_NAME_AW(CommConfigDialog) 2207 #define GetDefaultCommConfig __MINGW_NAME_AW(GetDefaultCommConfig) 2208 #define SetDefaultCommConfig __MINGW_NAME_AW(SetDefaultCommConfig) 2209 #define GetComputerName __MINGW_NAME_AW(GetComputerName) 2210 #define SetComputerName __MINGW_NAME_AW(SetComputerName) 2211 #define GetComputerNameEx __MINGW_NAME_AW(GetComputerNameEx) 2212 #define SetComputerNameEx __MINGW_NAME_AW(SetComputerNameEx) 2213 #define DnsHostnameToComputerName __MINGW_NAME_AW(DnsHostnameToComputerName) 2214 #define GetUserName __MINGW_NAME_AW(GetUserName) 2215 2216 WINBASEAPI HANDLE WINAPI FindFirstFileExA(LPCSTR lpFileName,FINDEX_INFO_LEVELS fInfoLevelId,LPVOID lpFindFileData,FINDEX_SEARCH_OPS fSearchOp,LPVOID lpSearchFilter,DWORD dwAdditionalFlags); 2217 WINBASEAPI HANDLE WINAPI FindFirstFileExW(LPCWSTR lpFileName,FINDEX_INFO_LEVELS fInfoLevelId,LPVOID lpFindFileData,FINDEX_SEARCH_OPS fSearchOp,LPVOID lpSearchFilter,DWORD dwAdditionalFlags); 2218 WINBASEAPI HANDLE WINAPI FindFirstFileA(LPCSTR lpFileName,LPWIN32_FIND_DATAA lpFindFileData); 2219 WINBASEAPI HANDLE WINAPI FindFirstFileW(LPCWSTR lpFileName,LPWIN32_FIND_DATAW lpFindFileData); 2220 WINBASEAPI WINBOOL WINAPI FindNextFileA(HANDLE hFindFile,LPWIN32_FIND_DATAA lpFindFileData); 2221 WINBASEAPI WINBOOL WINAPI FindNextFileW(HANDLE hFindFile,LPWIN32_FIND_DATAW lpFindFileData); 2222 WINBASEAPI DWORD WINAPI SearchPathA(LPCSTR lpPath,LPCSTR lpFileName,LPCSTR lpExtension,DWORD nBufferLength,LPSTR lpBuffer,LPSTR *lpFilePart); 2223 WINBASEAPI DWORD WINAPI SearchPathW(LPCWSTR lpPath,LPCWSTR lpFileName,LPCWSTR lpExtension,DWORD nBufferLength,LPWSTR lpBuffer,LPWSTR *lpFilePart); 2224 WINBASEAPI WINBOOL WINAPI CopyFileA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,WINBOOL bFailIfExists); 2225 WINBASEAPI WINBOOL WINAPI CopyFileW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,WINBOOL bFailIfExists); 2226 2227 typedef DWORD (WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER TotalFileSize,LARGE_INTEGER TotalBytesTransferred,LARGE_INTEGER StreamSize,LARGE_INTEGER StreamBytesTransferred,DWORD dwStreamNumber,DWORD dwCallbackReason,HANDLE hSourceFile,HANDLE hDestinationFile,LPVOID lpData); 2228 2229 WINBASEAPI WINBOOL WINAPI CopyFileExA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,LPBOOL pbCancel,DWORD dwCopyFlags); 2230 WINBASEAPI WINBOOL WINAPI CopyFileExW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,LPBOOL pbCancel,DWORD dwCopyFlags); 2231 WINBASEAPI WINBOOL WINAPI MoveFileA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName); 2232 WINBASEAPI WINBOOL WINAPI MoveFileW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName); 2233 WINBASEAPI WINBOOL WINAPI MoveFileExA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,DWORD dwFlags); 2234 WINBASEAPI WINBOOL WINAPI MoveFileExW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,DWORD dwFlags); 2235 WINBASEAPI WINBOOL WINAPI MoveFileWithProgressA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,DWORD dwFlags); 2236 WINBASEAPI WINBOOL WINAPI MoveFileWithProgressW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,DWORD dwFlags); 2237 2238 #define MOVEFILE_REPLACE_EXISTING 0x1 2239 #define MOVEFILE_COPY_ALLOWED 0x2 2240 #define MOVEFILE_DELAY_UNTIL_REBOOT 0x4 2241 #define MOVEFILE_WRITE_THROUGH 0x8 2242 #define MOVEFILE_CREATE_HARDLINK 0x10 2243 #define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x20 2244 2245 WINBASEAPI WINBOOL WINAPI ReplaceFileA(LPCSTR lpReplacedFileName,LPCSTR lpReplacementFileName,LPCSTR lpBackupFileName,DWORD dwReplaceFlags,LPVOID lpExclude,LPVOID lpReserved); 2246 WINBASEAPI WINBOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName,LPCWSTR lpReplacementFileName,LPCWSTR lpBackupFileName,DWORD dwReplaceFlags,LPVOID lpExclude,LPVOID lpReserved); 2247 WINBASEAPI WINBOOL WINAPI CreateHardLinkA(LPCSTR lpFileName,LPCSTR lpExistingFileName,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 2248 WINBASEAPI WINBOOL WINAPI CreateHardLinkW(LPCWSTR lpFileName,LPCWSTR lpExistingFileName,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 2249 2250 typedef enum _STREAM_INFO_LEVELS { 2251 FindStreamInfoStandard,FindStreamInfoMaxInfoLevel 2252 } STREAM_INFO_LEVELS; 2253 2254 typedef struct _WIN32_FIND_STREAM_DATA { 2255 LARGE_INTEGER StreamSize; 2256 WCHAR cStreamName[MAX_PATH + 36]; 2257 } WIN32_FIND_STREAM_DATA,*PWIN32_FIND_STREAM_DATA; 2258 2259 HANDLE WINAPI FindFirstStreamW(LPCWSTR lpFileName,STREAM_INFO_LEVELS InfoLevel,LPVOID lpFindStreamData,DWORD dwFlags); 2260 WINBOOL WINAPI FindNextStreamW(HANDLE hFindStream,LPVOID lpFindStreamData); 2261 WINBASEAPI HANDLE WINAPI CreateNamedPipeA(LPCSTR lpName,DWORD dwOpenMode,DWORD dwPipeMode,DWORD nMaxInstances,DWORD nOutBufferSize,DWORD nInBufferSize,DWORD nDefaultTimeOut,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 2262 WINBASEAPI HANDLE WINAPI CreateNamedPipeW(LPCWSTR lpName,DWORD dwOpenMode,DWORD dwPipeMode,DWORD nMaxInstances,DWORD nOutBufferSize,DWORD nInBufferSize,DWORD nDefaultTimeOut,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 2263 WINBASEAPI WINBOOL WINAPI GetNamedPipeHandleStateA(HANDLE hNamedPipe,LPDWORD lpState,LPDWORD lpCurInstances,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout,LPSTR lpUserName,DWORD nMaxUserNameSize); 2264 WINBASEAPI WINBOOL WINAPI GetNamedPipeHandleStateW(HANDLE hNamedPipe,LPDWORD lpState,LPDWORD lpCurInstances,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout,LPWSTR lpUserName,DWORD nMaxUserNameSize); 2265 WINBASEAPI WINBOOL WINAPI CallNamedPipeA(LPCSTR lpNamedPipeName,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,DWORD nTimeOut); 2266 WINBASEAPI WINBOOL WINAPI CallNamedPipeW(LPCWSTR lpNamedPipeName,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,DWORD nTimeOut); 2267 WINBASEAPI WINBOOL WINAPI WaitNamedPipeA(LPCSTR lpNamedPipeName,DWORD nTimeOut); 2268 WINBASEAPI WINBOOL WINAPI WaitNamedPipeW(LPCWSTR lpNamedPipeName,DWORD nTimeOut); 2269 WINBASEAPI WINBOOL WINAPI SetVolumeLabelA(LPCSTR lpRootPathName,LPCSTR lpVolumeName); 2270 WINBASEAPI WINBOOL WINAPI SetVolumeLabelW(LPCWSTR lpRootPathName,LPCWSTR lpVolumeName); 2271 WINBASEAPI VOID WINAPI SetFileApisToOEM(VOID); 2272 WINBASEAPI VOID WINAPI SetFileApisToANSI(VOID); 2273 WINBASEAPI WINBOOL WINAPI AreFileApisANSI(VOID); 2274 WINBASEAPI WINBOOL WINAPI GetVolumeInformationA(LPCSTR lpRootPathName,LPSTR lpVolumeNameBuffer,DWORD nVolumeNameSize,LPDWORD lpVolumeSerialNumber,LPDWORD lpMaximumComponentLength,LPDWORD lpFileSystemFlags,LPSTR lpFileSystemNameBuffer,DWORD nFileSystemNameSize); 2275 WINBASEAPI WINBOOL WINAPI GetVolumeInformationW(LPCWSTR lpRootPathName,LPWSTR lpVolumeNameBuffer,DWORD nVolumeNameSize,LPDWORD lpVolumeSerialNumber,LPDWORD lpMaximumComponentLength,LPDWORD lpFileSystemFlags,LPWSTR lpFileSystemNameBuffer,DWORD nFileSystemNameSize); 2276 WINBASEAPI WINBOOL WINAPI CancelIo(HANDLE hFile); 2277 WINADVAPI WINBOOL WINAPI ClearEventLogA(HANDLE hEventLog,LPCSTR lpBackupFileName); 2278 WINADVAPI WINBOOL WINAPI ClearEventLogW(HANDLE hEventLog,LPCWSTR lpBackupFileName); 2279 WINADVAPI WINBOOL WINAPI BackupEventLogA(HANDLE hEventLog,LPCSTR lpBackupFileName); 2280 WINADVAPI WINBOOL WINAPI BackupEventLogW(HANDLE hEventLog,LPCWSTR lpBackupFileName); 2281 WINADVAPI WINBOOL WINAPI CloseEventLog(HANDLE hEventLog); 2282 WINADVAPI WINBOOL WINAPI DeregisterEventSource(HANDLE hEventLog); 2283 WINADVAPI WINBOOL WINAPI NotifyChangeEventLog(HANDLE hEventLog,HANDLE hEvent); 2284 WINADVAPI WINBOOL WINAPI GetNumberOfEventLogRecords(HANDLE hEventLog,PDWORD NumberOfRecords); 2285 WINADVAPI WINBOOL WINAPI GetOldestEventLogRecord(HANDLE hEventLog,PDWORD OldestRecord); 2286 WINADVAPI HANDLE WINAPI OpenEventLogA(LPCSTR lpUNCServerName,LPCSTR lpSourceName); 2287 WINADVAPI HANDLE WINAPI OpenEventLogW(LPCWSTR lpUNCServerName,LPCWSTR lpSourceName); 2288 WINADVAPI HANDLE WINAPI RegisterEventSourceA(LPCSTR lpUNCServerName,LPCSTR lpSourceName); 2289 WINADVAPI HANDLE WINAPI RegisterEventSourceW(LPCWSTR lpUNCServerName,LPCWSTR lpSourceName); 2290 WINADVAPI HANDLE WINAPI OpenBackupEventLogA(LPCSTR lpUNCServerName,LPCSTR lpFileName); 2291 WINADVAPI HANDLE WINAPI OpenBackupEventLogW(LPCWSTR lpUNCServerName,LPCWSTR lpFileName); 2292 WINADVAPI WINBOOL WINAPI ReadEventLogA(HANDLE hEventLog,DWORD dwReadFlags,DWORD dwRecordOffset,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,DWORD *pnBytesRead,DWORD *pnMinNumberOfBytesNeeded); 2293 WINADVAPI WINBOOL WINAPI ReadEventLogW(HANDLE hEventLog,DWORD dwReadFlags,DWORD dwRecordOffset,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,DWORD *pnBytesRead,DWORD *pnMinNumberOfBytesNeeded); 2294 WINADVAPI WINBOOL WINAPI ReportEventA(HANDLE hEventLog,WORD wType,WORD wCategory,DWORD dwEventID,PSID lpUserSid,WORD wNumStrings,DWORD dwDataSize,LPCSTR *lpStrings,LPVOID lpRawData); 2295 WINADVAPI WINBOOL WINAPI ReportEventW(HANDLE hEventLog,WORD wType,WORD wCategory,DWORD dwEventID,PSID lpUserSid,WORD wNumStrings,DWORD dwDataSize,LPCWSTR *lpStrings,LPVOID lpRawData); 2296 2297 #define EVENTLOG_FULL_INFO 0 2298 2299 typedef struct _EVENTLOG_FULL_INFORMATION { 2300 DWORD dwFull; 2301 } EVENTLOG_FULL_INFORMATION,*LPEVENTLOG_FULL_INFORMATION; 2302 2303 WINADVAPI WINBOOL WINAPI GetEventLogInformation(HANDLE hEventLog,DWORD dwInfoLevel,LPVOID lpBuffer,DWORD cbBufSize,LPDWORD pcbBytesNeeded); 2304 WINADVAPI WINBOOL WINAPI DuplicateToken(HANDLE ExistingTokenHandle,SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,PHANDLE DuplicateTokenHandle); 2305 WINADVAPI WINBOOL WINAPI GetKernelObjectSecurity(HANDLE Handle,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded); 2306 WINADVAPI WINBOOL WINAPI ImpersonateNamedPipeClient(HANDLE hNamedPipe); 2307 WINADVAPI WINBOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel); 2308 WINADVAPI WINBOOL WINAPI RevertToSelf(VOID); 2309 WINADVAPI WINBOOL WINAPI SetThreadToken (PHANDLE Thread,HANDLE Token); 2310 WINADVAPI WINBOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccess,LPBOOL AccessStatus); 2311 WINADVAPI WINBOOL WINAPI AccessCheckByType(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID PrincipalSelfSid,HANDLE ClientToken,DWORD DesiredAccess,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccess,LPBOOL AccessStatus); 2312 WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultList(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID PrincipalSelfSid,HANDLE ClientToken,DWORD DesiredAccess,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccessList,LPDWORD AccessStatusList); 2313 WINADVAPI WINBOOL WINAPI OpenProcessToken(HANDLE ProcessHandle,DWORD DesiredAccess,PHANDLE TokenHandle); 2314 WINADVAPI WINBOOL WINAPI OpenThreadToken(HANDLE ThreadHandle,DWORD DesiredAccess,WINBOOL OpenAsSelf,PHANDLE TokenHandle); 2315 WINADVAPI WINBOOL WINAPI GetTokenInformation(HANDLE TokenHandle,TOKEN_INFORMATION_CLASS TokenInformationClass,LPVOID TokenInformation,DWORD TokenInformationLength,PDWORD ReturnLength); 2316 WINADVAPI WINBOOL WINAPI SetTokenInformation(HANDLE TokenHandle,TOKEN_INFORMATION_CLASS TokenInformationClass,LPVOID TokenInformation,DWORD TokenInformationLength); 2317 WINADVAPI WINBOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle,WINBOOL DisableAllPrivileges,PTOKEN_PRIVILEGES NewState,DWORD BufferLength,PTOKEN_PRIVILEGES PreviousState,PDWORD ReturnLength); 2318 WINADVAPI WINBOOL WINAPI AdjustTokenGroups(HANDLE TokenHandle,WINBOOL ResetToDefault,PTOKEN_GROUPS NewState,DWORD BufferLength,PTOKEN_GROUPS PreviousState,PDWORD ReturnLength); 2319 WINADVAPI WINBOOL WINAPI PrivilegeCheck(HANDLE ClientToken,PPRIVILEGE_SET RequiredPrivileges,LPBOOL pfResult); 2320 WINADVAPI WINBOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPSTR ObjectTypeName,LPSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose); 2321 WINADVAPI WINBOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPWSTR ObjectTypeName,LPWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose); 2322 WINADVAPI WINBOOL WINAPI AccessCheckByTypeAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose); 2323 WINADVAPI WINBOOL WINAPI AccessCheckByTypeAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose); 2324 WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose); 2325 WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose); 2326 WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmByHandleA(LPCSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose); 2327 WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmByHandleW(LPCWSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose); 2328 WINADVAPI WINBOOL WINAPI ObjectOpenAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPSTR ObjectTypeName,LPSTR ObjectName,PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,DWORD GrantedAccess,PPRIVILEGE_SET Privileges,WINBOOL ObjectCreation,WINBOOL AccessGranted,LPBOOL GenerateOnClose); 2329 WINADVAPI WINBOOL WINAPI ObjectOpenAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPWSTR ObjectTypeName,LPWSTR ObjectName,PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,DWORD GrantedAccess,PPRIVILEGE_SET Privileges,WINBOOL ObjectCreation,WINBOOL AccessGranted,LPBOOL GenerateOnClose); 2330 WINADVAPI WINBOOL WINAPI ObjectPrivilegeAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,DWORD DesiredAccess,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted); 2331 WINADVAPI WINBOOL WINAPI ObjectPrivilegeAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,DWORD DesiredAccess,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted); 2332 WINADVAPI WINBOOL WINAPI ObjectCloseAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose); 2333 WINADVAPI WINBOOL WINAPI ObjectCloseAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose); 2334 WINADVAPI WINBOOL WINAPI ObjectDeleteAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose); 2335 WINADVAPI WINBOOL WINAPI ObjectDeleteAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose); 2336 WINADVAPI WINBOOL WINAPI PrivilegedServiceAuditAlarmA(LPCSTR SubsystemName,LPCSTR ServiceName,HANDLE ClientToken,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted); 2337 WINADVAPI WINBOOL WINAPI PrivilegedServiceAuditAlarmW(LPCWSTR SubsystemName,LPCWSTR ServiceName,HANDLE ClientToken,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted); 2338 WINADVAPI WINBOOL WINAPI IsWellKnownSid(PSID pSid,WELL_KNOWN_SID_TYPE WellKnownSidType); 2339 WINADVAPI WINBOOL WINAPI CreateWellKnownSid(WELL_KNOWN_SID_TYPE WellKnownSidType,PSID DomainSid,PSID pSid,DWORD *cbSid); 2340 WINADVAPI WINBOOL WINAPI EqualDomainSid(PSID pSid1,PSID pSid2,WINBOOL *pfEqual); 2341 WINADVAPI WINBOOL WINAPI GetWindowsAccountDomainSid(PSID pSid,PSID pDomainSid,DWORD *cbDomainSid); 2342 WINADVAPI WINBOOL WINAPI IsValidSid(PSID pSid); 2343 WINADVAPI WINBOOL WINAPI EqualSid(PSID pSid1,PSID pSid2); 2344 WINADVAPI WINBOOL WINAPI EqualPrefixSid(PSID pSid1,PSID pSid2); 2345 WINADVAPI DWORD WINAPI GetSidLengthRequired (UCHAR nSubAuthorityCount); 2346 WINADVAPI WINBOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,BYTE nSubAuthorityCount,DWORD nSubAuthority0,DWORD nSubAuthority1,DWORD nSubAuthority2,DWORD nSubAuthority3,DWORD nSubAuthority4,DWORD nSubAuthority5,DWORD nSubAuthority6,DWORD nSubAuthority7,PSID *pSid); 2347 WINADVAPI PVOID WINAPI FreeSid(PSID pSid); 2348 WINADVAPI WINBOOL WINAPI InitializeSid(PSID Sid,PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,BYTE nSubAuthorityCount); 2349 WINADVAPI PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID pSid); 2350 WINADVAPI PDWORD WINAPI GetSidSubAuthority(PSID pSid,DWORD nSubAuthority); 2351 WINADVAPI PUCHAR WINAPI GetSidSubAuthorityCount(PSID pSid); 2352 WINADVAPI DWORD WINAPI GetLengthSid(PSID pSid); 2353 WINADVAPI WINBOOL WINAPI CopySid(DWORD nDestinationSidLength,PSID pDestinationSid,PSID pSourceSid); 2354 WINADVAPI WINBOOL WINAPI AreAllAccessesGranted(DWORD GrantedAccess,DWORD DesiredAccess); 2355 WINADVAPI WINBOOL WINAPI AreAnyAccessesGranted(DWORD GrantedAccess,DWORD DesiredAccess); 2356 WINADVAPI VOID WINAPI MapGenericMask(PDWORD AccessMask,PGENERIC_MAPPING GenericMapping); 2357 WINADVAPI WINBOOL WINAPI IsValidAcl(PACL pAcl); 2358 WINADVAPI WINBOOL WINAPI InitializeAcl(PACL pAcl,DWORD nAclLength,DWORD dwAclRevision); 2359 WINADVAPI WINBOOL WINAPI GetAclInformation(PACL pAcl,LPVOID pAclInformation,DWORD nAclInformationLength,ACL_INFORMATION_CLASS dwAclInformationClass); 2360 WINADVAPI WINBOOL WINAPI SetAclInformation(PACL pAcl,LPVOID pAclInformation,DWORD nAclInformationLength,ACL_INFORMATION_CLASS dwAclInformationClass); 2361 WINADVAPI WINBOOL WINAPI AddAce(PACL pAcl,DWORD dwAceRevision,DWORD dwStartingAceIndex,LPVOID pAceList,DWORD nAceListLength); 2362 WINADVAPI WINBOOL WINAPI DeleteAce(PACL pAcl,DWORD dwAceIndex); 2363 WINADVAPI WINBOOL WINAPI GetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce); 2364 WINADVAPI WINBOOL WINAPI AddAccessAllowedAce(PACL pAcl,DWORD dwAceRevision,DWORD AccessMask,PSID pSid); 2365 WINADVAPI WINBOOL WINAPI AddAccessAllowedAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,PSID pSid); 2366 WINADVAPI WINBOOL WINAPI AddAccessDeniedAce(PACL pAcl,DWORD dwAceRevision,DWORD AccessMask,PSID pSid); 2367 WINADVAPI WINBOOL WINAPI AddAccessDeniedAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,PSID pSid); 2368 WINADVAPI WINBOOL WINAPI AddAuditAccessAce(PACL pAcl,DWORD dwAceRevision,DWORD dwAccessMask,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure); 2369 WINADVAPI WINBOOL WINAPI AddAuditAccessAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD dwAccessMask,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure); 2370 WINADVAPI WINBOOL WINAPI AddAccessAllowedObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid); 2371 WINADVAPI WINBOOL WINAPI AddAccessDeniedObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid); 2372 WINADVAPI WINBOOL WINAPI AddAuditAccessObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure); 2373 WINADVAPI WINBOOL WINAPI FindFirstFreeAce(PACL pAcl,LPVOID *pAce); 2374 WINADVAPI WINBOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD dwRevision); 2375 WINADVAPI WINBOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor); 2376 WINADVAPI DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor); 2377 WINADVAPI WINBOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSECURITY_DESCRIPTOR_CONTROL pControl,LPDWORD lpdwRevision); 2378 WINADVAPI WINBOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor,SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet); 2379 WINADVAPI WINBOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,WINBOOL bDaclPresent,PACL pDacl,WINBOOL bDaclDefaulted); 2380 WINADVAPI WINBOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,LPBOOL lpbDaclPresent,PACL *pDacl,LPBOOL lpbDaclDefaulted); 2381 WINADVAPI WINBOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,WINBOOL bSaclPresent,PACL pSacl,WINBOOL bSaclDefaulted); 2382 WINADVAPI WINBOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,LPBOOL lpbSaclPresent,PACL *pSacl,LPBOOL lpbSaclDefaulted); 2383 WINADVAPI WINBOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID pOwner,WINBOOL bOwnerDefaulted); 2384 WINADVAPI WINBOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID *pOwner,LPBOOL lpbOwnerDefaulted); 2385 WINADVAPI WINBOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID pGroup,WINBOOL bGroupDefaulted); 2386 WINADVAPI WINBOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID *pGroup,LPBOOL lpbGroupDefaulted); 2387 WINADVAPI DWORD WINAPI SetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,PUCHAR RMControl); 2388 WINADVAPI DWORD WINAPI GetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,PUCHAR RMControl); 2389 WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,WINBOOL IsDirectoryObject,HANDLE Token,PGENERIC_MAPPING GenericMapping); 2390 WINADVAPI WINBOOL WINAPI ConvertToAutoInheritPrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CurrentSecurityDescriptor,PSECURITY_DESCRIPTOR *NewSecurityDescriptor,GUID *ObjectType,BOOLEAN IsDirectoryObject,PGENERIC_MAPPING GenericMapping); 2391 WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurityEx(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,GUID *ObjectType,WINBOOL IsContainerObject,ULONG AutoInheritFlags,HANDLE Token,PGENERIC_MAPPING GenericMapping); 2392 WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurityWithMultipleInheritance(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,GUID **ObjectTypes,ULONG GuidCount,WINBOOL IsContainerObject,ULONG AutoInheritFlags,HANDLE Token,PGENERIC_MAPPING GenericMapping); 2393 WINADVAPI WINBOOL WINAPI SetPrivateObjectSecurity (SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ModificationDescriptor,PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,PGENERIC_MAPPING GenericMapping,HANDLE Token); 2394 WINADVAPI WINBOOL WINAPI SetPrivateObjectSecurityEx (SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ModificationDescriptor,PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,ULONG AutoInheritFlags,PGENERIC_MAPPING GenericMapping,HANDLE Token); 2395 WINADVAPI WINBOOL WINAPI GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR ObjectDescriptor,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ResultantDescriptor,DWORD DescriptorLength,PDWORD ReturnLength); 2396 WINADVAPI WINBOOL WINAPI DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR *ObjectDescriptor); 2397 WINADVAPI WINBOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,LPDWORD lpdwBufferLength); 2398 WINADVAPI WINBOOL WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,LPDWORD lpdwAbsoluteSecurityDescriptorSize,PACL pDacl,LPDWORD lpdwDaclSize,PACL pSacl,LPDWORD lpdwSaclSize,PSID pOwner,LPDWORD lpdwOwnerSize,PSID pPrimaryGroup,LPDWORD lpdwPrimaryGroupSize); 2399 WINADVAPI WINBOOL WINAPI MakeAbsoluteSD2(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,LPDWORD lpdwBufferSize); 2400 WINADVAPI WINBOOL WINAPI SetFileSecurityA(LPCSTR lpFileName,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor); 2401 WINADVAPI WINBOOL WINAPI SetFileSecurityW(LPCWSTR lpFileName,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor); 2402 WINADVAPI WINBOOL WINAPI GetFileSecurityA(LPCSTR lpFileName,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded); 2403 WINADVAPI WINBOOL WINAPI GetFileSecurityW(LPCWSTR lpFileName,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded); 2404 WINADVAPI WINBOOL WINAPI SetKernelObjectSecurity(HANDLE Handle,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR SecurityDescriptor); 2405 WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR lpPathName,WINBOOL bWatchSubtree,DWORD dwNotifyFilter); 2406 WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR lpPathName,WINBOOL bWatchSubtree,DWORD dwNotifyFilter); 2407 WINBASEAPI WINBOOL WINAPI FindNextChangeNotification(HANDLE hChangeHandle); 2408 WINBASEAPI WINBOOL WINAPI FindCloseChangeNotification(HANDLE hChangeHandle); 2409 WINBASEAPI WINBOOL WINAPI ReadDirectoryChangesW(HANDLE hDirectory,LPVOID lpBuffer,DWORD nBufferLength,WINBOOL bWatchSubtree,DWORD dwNotifyFilter,LPDWORD lpBytesReturned,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine); 2410 WINBASEAPI WINBOOL WINAPI VirtualLock(LPVOID lpAddress,SIZE_T dwSize); 2411 WINBASEAPI WINBOOL WINAPI VirtualUnlock(LPVOID lpAddress,SIZE_T dwSize); 2412 WINBASEAPI LPVOID WINAPI MapViewOfFileEx(HANDLE hFileMappingObject,DWORD dwDesiredAccess,DWORD dwFileOffsetHigh,DWORD dwFileOffsetLow,SIZE_T dwNumberOfBytesToMap,LPVOID lpBaseAddress); 2413 WINBASEAPI WINBOOL WINAPI SetPriorityClass(HANDLE hProcess,DWORD dwPriorityClass); 2414 WINBASEAPI DWORD WINAPI GetPriorityClass(HANDLE hProcess); 2415 WINBASEAPI WINBOOL WINAPI IsBadReadPtr(CONST VOID *lp,UINT_PTR ucb); 2416 WINBASEAPI WINBOOL WINAPI IsBadWritePtr(LPVOID lp,UINT_PTR ucb); 2417 WINBASEAPI WINBOOL WINAPI IsBadHugeReadPtr(CONST VOID *lp,UINT_PTR ucb); 2418 WINBASEAPI WINBOOL WINAPI IsBadHugeWritePtr(LPVOID lp,UINT_PTR ucb); 2419 WINBASEAPI WINBOOL WINAPI IsBadCodePtr(FARPROC lpfn); 2420 WINBASEAPI WINBOOL WINAPI IsBadStringPtrA(LPCSTR lpsz,UINT_PTR ucchMax); 2421 WINBASEAPI WINBOOL WINAPI IsBadStringPtrW(LPCWSTR lpsz,UINT_PTR ucchMax); 2422 WINADVAPI WINBOOL WINAPI LookupAccountSidA(LPCSTR lpSystemName,PSID Sid,LPSTR Name,LPDWORD cchName,LPSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse); 2423 WINADVAPI WINBOOL WINAPI LookupAccountSidW(LPCWSTR lpSystemName,PSID Sid,LPWSTR Name,LPDWORD cchName,LPWSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse); 2424 WINADVAPI WINBOOL WINAPI LookupAccountNameA(LPCSTR lpSystemName,LPCSTR lpAccountName,PSID Sid,LPDWORD cbSid,LPSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse); 2425 WINADVAPI WINBOOL WINAPI LookupAccountNameW(LPCWSTR lpSystemName,LPCWSTR lpAccountName,PSID Sid,LPDWORD cbSid,LPWSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse); 2426 WINADVAPI WINBOOL WINAPI LookupPrivilegeValueA(LPCSTR lpSystemName,LPCSTR lpName,PLUID lpLuid); 2427 WINADVAPI WINBOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName,LPCWSTR lpName,PLUID lpLuid); 2428 WINADVAPI WINBOOL WINAPI LookupPrivilegeNameA(LPCSTR lpSystemName,PLUID lpLuid,LPSTR lpName,LPDWORD cchName); 2429 WINADVAPI WINBOOL WINAPI LookupPrivilegeNameW(LPCWSTR lpSystemName,PLUID lpLuid,LPWSTR lpName,LPDWORD cchName); 2430 WINADVAPI WINBOOL WINAPI LookupPrivilegeDisplayNameA(LPCSTR lpSystemName,LPCSTR lpName,LPSTR lpDisplayName,LPDWORD cchDisplayName,LPDWORD lpLanguageId); 2431 WINADVAPI WINBOOL WINAPI LookupPrivilegeDisplayNameW(LPCWSTR lpSystemName,LPCWSTR lpName,LPWSTR lpDisplayName,LPDWORD cchDisplayName,LPDWORD lpLanguageId); 2432 WINADVAPI WINBOOL WINAPI AllocateLocallyUniqueId(PLUID Luid); 2433 WINBASEAPI WINBOOL WINAPI BuildCommDCBA(LPCSTR lpDef,LPDCB lpDCB); 2434 WINBASEAPI WINBOOL WINAPI BuildCommDCBW(LPCWSTR lpDef,LPDCB lpDCB); 2435 WINBASEAPI WINBOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR lpDef,LPDCB lpDCB,LPCOMMTIMEOUTS lpCommTimeouts); 2436 WINBASEAPI WINBOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR lpDef,LPDCB lpDCB,LPCOMMTIMEOUTS lpCommTimeouts); 2437 WINBASEAPI WINBOOL WINAPI CommConfigDialogA(LPCSTR lpszName,HWND hWnd,LPCOMMCONFIG lpCC); 2438 WINBASEAPI WINBOOL WINAPI CommConfigDialogW(LPCWSTR lpszName,HWND hWnd,LPCOMMCONFIG lpCC); 2439 WINBASEAPI WINBOOL WINAPI GetDefaultCommConfigA(LPCSTR lpszName,LPCOMMCONFIG lpCC,LPDWORD lpdwSize); 2440 WINBASEAPI WINBOOL WINAPI GetDefaultCommConfigW(LPCWSTR lpszName,LPCOMMCONFIG lpCC,LPDWORD lpdwSize); 2441 WINBASEAPI WINBOOL WINAPI SetDefaultCommConfigA(LPCSTR lpszName,LPCOMMCONFIG lpCC,DWORD dwSize); 2442 WINBASEAPI WINBOOL WINAPI SetDefaultCommConfigW(LPCWSTR lpszName,LPCOMMCONFIG lpCC,DWORD dwSize); 2443 2444 #define MAX_COMPUTERNAME_LENGTH 15 2445 2446 WINBASEAPI WINBOOL WINAPI GetComputerNameA(LPSTR lpBuffer,LPDWORD nSize); 2447 WINBASEAPI WINBOOL WINAPI GetComputerNameW(LPWSTR lpBuffer,LPDWORD nSize); 2448 WINBASEAPI WINBOOL WINAPI SetComputerNameA(LPCSTR lpComputerName); 2449 WINBASEAPI WINBOOL WINAPI SetComputerNameW(LPCWSTR lpComputerName); 2450 2451 typedef enum _COMPUTER_NAME_FORMAT { 2452 ComputerNameNetBIOS,ComputerNameDnsHostname,ComputerNameDnsDomain,ComputerNameDnsFullyQualified,ComputerNamePhysicalNetBIOS,ComputerNamePhysicalDnsHostname,ComputerNamePhysicalDnsDomain,ComputerNamePhysicalDnsFullyQualified,ComputerNameMax 2453 } COMPUTER_NAME_FORMAT; 2454 2455 WINBASEAPI WINBOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT NameType,LPSTR lpBuffer,LPDWORD nSize); 2456 WINBASEAPI WINBOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT NameType,LPWSTR lpBuffer,LPDWORD nSize); 2457 WINBASEAPI WINBOOL WINAPI SetComputerNameExA(COMPUTER_NAME_FORMAT NameType,LPCSTR lpBuffer); 2458 WINBASEAPI WINBOOL WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT NameType,LPCWSTR lpBuffer); 2459 WINBASEAPI WINBOOL WINAPI DnsHostnameToComputerNameA(LPCSTR Hostname,LPSTR ComputerName,LPDWORD nSize); 2460 WINBASEAPI WINBOOL WINAPI DnsHostnameToComputerNameW(LPCWSTR Hostname,LPWSTR ComputerName,LPDWORD nSize); 2461 WINADVAPI WINBOOL WINAPI GetUserNameA(LPSTR lpBuffer,LPDWORD pcbBuffer); 2462 WINADVAPI WINBOOL WINAPI GetUserNameW(LPWSTR lpBuffer,LPDWORD pcbBuffer); 2463 2464 #define LOGON32_LOGON_INTERACTIVE 2 2465 #define LOGON32_LOGON_NETWORK 3 2466 #define LOGON32_LOGON_BATCH 4 2467 #define LOGON32_LOGON_SERVICE 5 2468 #define LOGON32_LOGON_UNLOCK 7 2469 #define LOGON32_LOGON_NETWORK_CLEARTEXT 8 2470 #define LOGON32_LOGON_NEW_CREDENTIALS 9 2471 2472 #define LOGON32_PROVIDER_DEFAULT 0 2473 #define LOGON32_PROVIDER_WINNT35 1 2474 #define LOGON32_PROVIDER_WINNT40 2 2475 #define LOGON32_PROVIDER_WINNT50 3 2476 2477 #define LogonUser __MINGW_NAME_AW(LogonUser) 2478 #define LogonUserEx __MINGW_NAME_AW(LogonUserEx) 2479 #define CreateProcessAsUser __MINGW_NAME_AW(CreateProcessAsUser) 2480 2481 WINADVAPI WINBOOL WINAPI LogonUserA(LPCSTR lpszUsername,LPCSTR lpszDomain,LPCSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken); 2482 WINADVAPI WINBOOL WINAPI LogonUserW(LPCWSTR lpszUsername,LPCWSTR lpszDomain,LPCWSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken); 2483 WINADVAPI WINBOOL WINAPI LogonUserExA(LPCSTR lpszUsername,LPCSTR lpszDomain,LPCSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken,PSID *ppLogonSid,PVOID *ppProfileBuffer,LPDWORD pdwProfileLength,PQUOTA_LIMITS pQuotaLimits); 2484 WINADVAPI WINBOOL WINAPI LogonUserExW(LPCWSTR lpszUsername,LPCWSTR lpszDomain,LPCWSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken,PSID *ppLogonSid,PVOID *ppProfileBuffer,LPDWORD pdwProfileLength,PQUOTA_LIMITS pQuotaLimits); 2485 WINADVAPI WINBOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken); 2486 WINADVAPI WINBOOL WINAPI CreateProcessAsUserA(HANDLE hToken,LPCSTR lpApplicationName,LPSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCSTR lpCurrentDirectory,LPSTARTUPINFOA lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); 2487 WINADVAPI WINBOOL WINAPI CreateProcessAsUserW(HANDLE hToken,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); 2488 2489 #define LOGON_WITH_PROFILE 0x00000001 2490 #define LOGON_NETCREDENTIALS_ONLY 0x00000002 2491 #define LOGON_ZERO_PASSWORD_BUFFER 0x80000000 2492 2493 WINADVAPI WINBOOL WINAPI CreateProcessWithLogonW(LPCWSTR lpUsername,LPCWSTR lpDomain,LPCWSTR lpPassword,DWORD dwLogonFlags,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); 2494 WINADVAPI WINBOOL WINAPI CreateProcessWithTokenW(HANDLE hToken,DWORD dwLogonFlags,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation); 2495 WINADVAPI WINBOOL WINAPI ImpersonateAnonymousToken(HANDLE ThreadHandle); 2496 WINADVAPI WINBOOL WINAPI DuplicateTokenEx(HANDLE hExistingToken,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpTokenAttributes,SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,TOKEN_TYPE TokenType,PHANDLE phNewToken); 2497 WINADVAPI WINBOOL WINAPI CreateRestrictedToken(HANDLE ExistingTokenHandle,DWORD Flags,DWORD DisableSidCount,PSID_AND_ATTRIBUTES SidsToDisable,DWORD DeletePrivilegeCount,PLUID_AND_ATTRIBUTES PrivilegesToDelete,DWORD RestrictedSidCount,PSID_AND_ATTRIBUTES SidsToRestrict,PHANDLE NewTokenHandle); 2498 WINADVAPI WINBOOL WINAPI IsTokenRestricted(HANDLE TokenHandle); 2499 WINADVAPI WINBOOL WINAPI IsTokenUntrusted(HANDLE TokenHandle); 2500 WINADVAPI WINBOOL WINAPI CheckTokenMembership(HANDLE TokenHandle,PSID SidToCheck,PBOOL IsMember); 2501 2502 typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK; 2503 2504 WINBASEAPI WINBOOL WINAPI RegisterWaitForSingleObject(PHANDLE phNewWaitObject,HANDLE hObject,WAITORTIMERCALLBACK Callback,PVOID Context,ULONG dwMilliseconds,ULONG dwFlags); 2505 WINBASEAPI HANDLE WINAPI RegisterWaitForSingleObjectEx(HANDLE hObject,WAITORTIMERCALLBACK Callback,PVOID Context,ULONG dwMilliseconds,ULONG dwFlags); 2506 WINBASEAPI WINBOOL WINAPI UnregisterWait(HANDLE WaitHandle); 2507 WINBASEAPI WINBOOL WINAPI UnregisterWaitEx(HANDLE WaitHandle,HANDLE CompletionEvent); 2508 WINBASEAPI WINBOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE Function,PVOID Context,ULONG Flags); 2509 WINBASEAPI WINBOOL WINAPI BindIoCompletionCallback(HANDLE FileHandle,LPOVERLAPPED_COMPLETION_ROUTINE Function,ULONG Flags); 2510 WINBASEAPI HANDLE WINAPI CreateTimerQueue(VOID); 2511 WINBASEAPI WINBOOL WINAPI CreateTimerQueueTimer(PHANDLE phNewTimer,HANDLE TimerQueue,WAITORTIMERCALLBACK Callback,PVOID Parameter,DWORD DueTime,DWORD Period,ULONG Flags); 2512 WINBASEAPI WINBOOL WINAPI ChangeTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer,ULONG DueTime,ULONG Period); 2513 WINBASEAPI WINBOOL WINAPI DeleteTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer,HANDLE CompletionEvent); 2514 WINBASEAPI WINBOOL WINAPI DeleteTimerQueueEx(HANDLE TimerQueue,HANDLE CompletionEvent); 2515 WINBASEAPI HANDLE WINAPI SetTimerQueueTimer(HANDLE TimerQueue,WAITORTIMERCALLBACK Callback,PVOID Parameter,DWORD DueTime,DWORD Period,WINBOOL PreferIo); 2516 WINBASEAPI WINBOOL WINAPI CancelTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer); 2517 WINBASEAPI WINBOOL WINAPI DeleteTimerQueue(HANDLE TimerQueue); 2518 2519 #define HW_PROFILE_GUIDLEN 39 2520 #define MAX_PROFILE_LEN 80 2521 2522 #define DOCKINFO_UNDOCKED (0x1) 2523 #define DOCKINFO_DOCKED (0x2) 2524 #define DOCKINFO_USER_SUPPLIED (0x4) 2525 #define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_UNDOCKED) 2526 #define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_DOCKED) 2527 2528 typedef struct tagHW_PROFILE_INFOA { 2529 DWORD dwDockInfo; 2530 CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN]; 2531 CHAR szHwProfileName[MAX_PROFILE_LEN]; 2532 } HW_PROFILE_INFOA,*LPHW_PROFILE_INFOA; 2533 2534 typedef struct tagHW_PROFILE_INFOW { 2535 DWORD dwDockInfo; 2536 WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN]; 2537 WCHAR szHwProfileName[MAX_PROFILE_LEN]; 2538 } HW_PROFILE_INFOW,*LPHW_PROFILE_INFOW; 2539 2540 __MINGW_TYPEDEF_AW(HW_PROFILE_INFO) 2541 __MINGW_TYPEDEF_AW(LPHW_PROFILE_INFO) 2542 2543 #define GetCurrentHwProfile __MINGW_NAME_AW(GetCurrentHwProfile) 2544 #define GetVersionEx __MINGW_NAME_AW(GetVersionEx) 2545 #define VerifyVersionInfo __MINGW_NAME_AW(VerifyVersionInfo) 2546 2547 WINADVAPI WINBOOL WINAPI GetCurrentHwProfileA (LPHW_PROFILE_INFOA lpHwProfileInfo); 2548 WINADVAPI WINBOOL WINAPI GetCurrentHwProfileW (LPHW_PROFILE_INFOW lpHwProfileInfo); 2549 WINBASEAPI WINBOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount); 2550 WINBASEAPI WINBOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency); 2551 WINBASEAPI WINBOOL WINAPI GetVersionExA(LPOSVERSIONINFOA lpVersionInformation); 2552 WINBASEAPI WINBOOL WINAPI GetVersionExW(LPOSVERSIONINFOW lpVersionInformation); 2553 WINBASEAPI WINBOOL WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA lpVersionInformation,DWORD dwTypeMask,DWORDLONG dwlConditionMask); 2554 WINBASEAPI WINBOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW lpVersionInformation,DWORD dwTypeMask,DWORDLONG dwlConditionMask); 2555 2556 #include <winerror.h> 2557 2558 #define TC_NORMAL 0 2559 #define TC_HARDERR 1 2560 #define TC_GP_TRAP 2 2561 #define TC_SIGNAL 3 2562 2563 #define AC_LINE_OFFLINE 0x0 2564 #define AC_LINE_ONLINE 0x1 2565 #define AC_LINE_BACKUP_POWER 0x2 2566 #define AC_LINE_UNKNOWN 0xff 2567 2568 #define BATTERY_FLAG_HIGH 0x1 2569 #define BATTERY_FLAG_LOW 0x2 2570 #define BATTERY_FLAG_CRITICAL 0x4 2571 #define BATTERY_FLAG_CHARGING 0x8 2572 #define BATTERY_FLAG_NO_BATTERY 0x80 2573 #define BATTERY_FLAG_UNKNOWN 0xff 2574 2575 #define BATTERY_PERCENTAGE_UNKNOWN 0xff 2576 2577 #define BATTERY_LIFE_UNKNOWN 0xffffffff 2578 2579 typedef struct _SYSTEM_POWER_STATUS { 2580 BYTE ACLineStatus; 2581 BYTE BatteryFlag; 2582 BYTE BatteryLifePercent; 2583 BYTE Reserved1; 2584 DWORD BatteryLifeTime; 2585 DWORD BatteryFullLifeTime; 2586 } SYSTEM_POWER_STATUS,*LPSYSTEM_POWER_STATUS; 2587 2588 #define CreateJobObject __MINGW_NAME_AW(CreateJobObject) 2589 #define OpenJobObject __MINGW_NAME_AW(OpenJobObject) 2590 #define FindFirstVolume __MINGW_NAME_AW(FindFirstVolume) 2591 #define FindNextVolume __MINGW_NAME_AW(FindNextVolume) 2592 #define FindFirstVolumeMountPoint __MINGW_NAME_AW(FindFirstVolumeMountPoint) 2593 #define FindNextVolumeMountPoint __MINGW_NAME_AW(FindNextVolumeMountPoint) 2594 #define SetVolumeMountPoint __MINGW_NAME_AW(SetVolumeMountPoint) 2595 #define DeleteVolumeMountPoint __MINGW_NAME_AW(DeleteVolumeMountPoint) 2596 #define GetVolumeNameForVolumeMountPoint __MINGW_NAME_AW(GetVolumeNameForVolumeMountPoint) 2597 #define GetVolumePathName __MINGW_NAME_AW(GetVolumePathName) 2598 #define GetVolumePathNamesForVolumeName __MINGW_NAME_AW(GetVolumePathNamesForVolumeName) 2599 2600 WINBOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS lpSystemPowerStatus); 2601 WINBOOL WINAPI SetSystemPowerState(WINBOOL fSuspend,WINBOOL fForce); 2602 WINBASEAPI WINBOOL WINAPI AllocateUserPhysicalPages(HANDLE hProcess,PULONG_PTR NumberOfPages,PULONG_PTR PageArray); 2603 WINBASEAPI WINBOOL WINAPI FreeUserPhysicalPages(HANDLE hProcess,PULONG_PTR NumberOfPages,PULONG_PTR PageArray); 2604 WINBASEAPI WINBOOL WINAPI MapUserPhysicalPages(PVOID VirtualAddress,ULONG_PTR NumberOfPages,PULONG_PTR PageArray); 2605 WINBASEAPI WINBOOL WINAPI MapUserPhysicalPagesScatter(PVOID *VirtualAddresses,ULONG_PTR NumberOfPages,PULONG_PTR PageArray); 2606 WINBASEAPI HANDLE WINAPI CreateJobObjectA(LPSECURITY_ATTRIBUTES lpJobAttributes,LPCSTR lpName); 2607 WINBASEAPI HANDLE WINAPI CreateJobObjectW(LPSECURITY_ATTRIBUTES lpJobAttributes,LPCWSTR lpName); 2608 WINBASEAPI HANDLE WINAPI OpenJobObjectA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName); 2609 WINBASEAPI HANDLE WINAPI OpenJobObjectW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName); 2610 WINBASEAPI WINBOOL WINAPI AssignProcessToJobObject(HANDLE hJob,HANDLE hProcess); 2611 WINBASEAPI WINBOOL WINAPI TerminateJobObject(HANDLE hJob,UINT uExitCode); 2612 WINBASEAPI WINBOOL WINAPI QueryInformationJobObject(HANDLE hJob,JOBOBJECTINFOCLASS JobObjectInformationClass,LPVOID lpJobObjectInformation,DWORD cbJobObjectInformationLength,LPDWORD lpReturnLength); 2613 WINBASEAPI WINBOOL WINAPI SetInformationJobObject(HANDLE hJob,JOBOBJECTINFOCLASS JobObjectInformationClass,LPVOID lpJobObjectInformation,DWORD cbJobObjectInformationLength); 2614 WINBASEAPI WINBOOL WINAPI IsProcessInJob(HANDLE ProcessHandle,HANDLE JobHandle,PBOOL Result); 2615 WINBASEAPI WINBOOL WINAPI CreateJobSet(ULONG NumJob,PJOB_SET_ARRAY UserJobSet,ULONG Flags); 2616 WINBASEAPI PVOID WINAPI AddVectoredExceptionHandler (ULONG First,PVECTORED_EXCEPTION_HANDLER Handler); 2617 WINBASEAPI ULONG WINAPI RemoveVectoredExceptionHandler(PVOID Handle); 2618 WINBASEAPI PVOID WINAPI AddVectoredContinueHandler (ULONG First,PVECTORED_EXCEPTION_HANDLER Handler); 2619 WINBASEAPI ULONG WINAPI RemoveVectoredContinueHandler(PVOID Handle); 2620 WINBASEAPI HANDLE WINAPI FindFirstVolumeA(LPSTR lpszVolumeName,DWORD cchBufferLength); 2621 WINBASEAPI HANDLE WINAPI FindFirstVolumeW(LPWSTR lpszVolumeName,DWORD cchBufferLength); 2622 WINBASEAPI WINBOOL WINAPI FindNextVolumeA(HANDLE hFindVolume,LPSTR lpszVolumeName,DWORD cchBufferLength); 2623 WINBASEAPI WINBOOL WINAPI FindNextVolumeW(HANDLE hFindVolume,LPWSTR lpszVolumeName,DWORD cchBufferLength); 2624 WINBASEAPI WINBOOL WINAPI FindVolumeClose(HANDLE hFindVolume); 2625 WINBASEAPI HANDLE WINAPI FindFirstVolumeMountPointA(LPCSTR lpszRootPathName,LPSTR lpszVolumeMountPoint,DWORD cchBufferLength); 2626 WINBASEAPI HANDLE WINAPI FindFirstVolumeMountPointW(LPCWSTR lpszRootPathName,LPWSTR lpszVolumeMountPoint,DWORD cchBufferLength); 2627 WINBASEAPI WINBOOL WINAPI FindNextVolumeMountPointA(HANDLE hFindVolumeMountPoint,LPSTR lpszVolumeMountPoint,DWORD cchBufferLength); 2628 WINBASEAPI WINBOOL WINAPI FindNextVolumeMountPointW(HANDLE hFindVolumeMountPoint,LPWSTR lpszVolumeMountPoint,DWORD cchBufferLength); 2629 WINBASEAPI WINBOOL WINAPI FindVolumeMountPointClose(HANDLE hFindVolumeMountPoint); 2630 WINBASEAPI WINBOOL WINAPI SetVolumeMountPointA(LPCSTR lpszVolumeMountPoint,LPCSTR lpszVolumeName); 2631 WINBASEAPI WINBOOL WINAPI SetVolumeMountPointW(LPCWSTR lpszVolumeMountPoint,LPCWSTR lpszVolumeName); 2632 WINBASEAPI WINBOOL WINAPI DeleteVolumeMountPointA(LPCSTR lpszVolumeMountPoint); 2633 WINBASEAPI WINBOOL WINAPI DeleteVolumeMountPointW(LPCWSTR lpszVolumeMountPoint); 2634 WINBASEAPI WINBOOL WINAPI GetVolumeNameForVolumeMountPointA(LPCSTR lpszVolumeMountPoint,LPSTR lpszVolumeName,DWORD cchBufferLength); 2635 WINBASEAPI WINBOOL WINAPI GetVolumeNameForVolumeMountPointW(LPCWSTR lpszVolumeMountPoint,LPWSTR lpszVolumeName,DWORD cchBufferLength); 2636 WINBASEAPI WINBOOL WINAPI GetVolumePathNameA(LPCSTR lpszFileName,LPSTR lpszVolumePathName,DWORD cchBufferLength); 2637 WINBASEAPI WINBOOL WINAPI GetVolumePathNameW(LPCWSTR lpszFileName,LPWSTR lpszVolumePathName,DWORD cchBufferLength); 2638 WINBASEAPI WINBOOL WINAPI GetVolumePathNamesForVolumeNameA(LPCSTR lpszVolumeName,LPCH lpszVolumePathNames,DWORD cchBufferLength,PDWORD lpcchReturnLength); 2639 WINBASEAPI WINBOOL WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR lpszVolumeName,LPWCH lpszVolumePathNames,DWORD cchBufferLength,PDWORD lpcchReturnLength); 2640 2641 #define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID 0x1 2642 #define ACTCTX_FLAG_LANGID_VALID 0x2 2643 #define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID 0x4 2644 #define ACTCTX_FLAG_RESOURCE_NAME_VALID 0x8 2645 #define ACTCTX_FLAG_SET_PROCESS_DEFAULT 0x10 2646 #define ACTCTX_FLAG_APPLICATION_NAME_VALID 0x20 2647 #define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF 0x40 2648 #define ACTCTX_FLAG_HMODULE_VALID 0x80 2649 2650 typedef struct tagACTCTXA { 2651 ULONG cbSize; 2652 DWORD dwFlags; 2653 LPCSTR lpSource; 2654 USHORT wProcessorArchitecture; 2655 LANGID wLangId; 2656 LPCSTR lpAssemblyDirectory; 2657 LPCSTR lpResourceName; 2658 LPCSTR lpApplicationName; 2659 HMODULE hModule; 2660 } ACTCTXA,*PACTCTXA; 2661 2662 typedef struct tagACTCTXW { 2663 ULONG cbSize; 2664 DWORD dwFlags; 2665 LPCWSTR lpSource; 2666 USHORT wProcessorArchitecture; 2667 LANGID wLangId; 2668 LPCWSTR lpAssemblyDirectory; 2669 LPCWSTR lpResourceName; 2670 LPCWSTR lpApplicationName; 2671 HMODULE hModule; 2672 } ACTCTXW,*PACTCTXW; 2673 2674 typedef const ACTCTXA *PCACTCTXA; 2675 typedef const ACTCTXW *PCACTCTXW; 2676 2677 __MINGW_TYPEDEF_AW(ACTCTX) 2678 __MINGW_TYPEDEF_AW(PACTCTX) 2679 __MINGW_TYPEDEF_AW(PCACTCTX) 2680 2681 #define CreateActCtx __MINGW_NAME_AW(CreateActCtx) 2682 2683 WINBASEAPI HANDLE WINAPI CreateActCtxA(PCACTCTXA pActCtx); 2684 WINBASEAPI HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx); 2685 WINBASEAPI VOID WINAPI AddRefActCtx(HANDLE hActCtx); 2686 WINBASEAPI VOID WINAPI ReleaseActCtx(HANDLE hActCtx); 2687 WINBASEAPI WINBOOL WINAPI ZombifyActCtx(HANDLE hActCtx); 2688 WINBASEAPI WINBOOL WINAPI ActivateActCtx(HANDLE hActCtx,ULONG_PTR *lpCookie); 2689 2690 #define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION (0x1) 2691 2692 WINBASEAPI WINBOOL WINAPI DeactivateActCtx(DWORD dwFlags,ULONG_PTR ulCookie); 2693 WINBASEAPI WINBOOL WINAPI GetCurrentActCtx(HANDLE *lphActCtx); 2694 2695 typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 { 2696 ULONG cbSize; 2697 ULONG ulDataFormatVersion; 2698 PVOID lpData; 2699 ULONG ulLength; 2700 PVOID lpSectionGlobalData; 2701 ULONG ulSectionGlobalDataLength; 2702 PVOID lpSectionBase; 2703 ULONG ulSectionTotalLength; 2704 HANDLE hActCtx; 2705 ULONG ulAssemblyRosterIndex; 2706 } ACTCTX_SECTION_KEYED_DATA_2600,*PACTCTX_SECTION_KEYED_DATA_2600; 2707 2708 typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600; 2709 2710 typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA { 2711 PVOID lpInformation; 2712 PVOID lpSectionBase; 2713 ULONG ulSectionLength; 2714 PVOID lpSectionGlobalDataBase; 2715 ULONG ulSectionGlobalDataLength; 2716 } ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA,*PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA; 2717 2718 typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA; 2719 2720 typedef struct tagACTCTX_SECTION_KEYED_DATA { 2721 ULONG cbSize; 2722 ULONG ulDataFormatVersion; 2723 PVOID lpData; 2724 ULONG ulLength; 2725 PVOID lpSectionGlobalData; 2726 ULONG ulSectionGlobalDataLength; 2727 PVOID lpSectionBase; 2728 ULONG ulSectionTotalLength; 2729 HANDLE hActCtx; 2730 ULONG ulAssemblyRosterIndex; 2731 2732 ULONG ulFlags; 2733 ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata; 2734 } ACTCTX_SECTION_KEYED_DATA,*PACTCTX_SECTION_KEYED_DATA; 2735 2736 typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA; 2737 2738 #define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX 0x1 2739 #define FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS 0x2 2740 #define FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA 0x4 2741 2742 #define FindActCtxSectionString __MINGW_NAME_AW(FindActCtxSectionString) 2743 2744 WINBASEAPI WINBOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,LPCSTR lpStringToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData); 2745 WINBASEAPI WINBOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,LPCWSTR lpStringToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData); 2746 WINBASEAPI WINBOOL WINAPI FindActCtxSectionGuid(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,const GUID *lpGuidToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData); 2747 2748 #ifndef RC_INVOKED 2749 #ifndef ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED 2750 2751 typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION { 2752 HANDLE hActCtx; 2753 DWORD dwFlags; 2754 } ACTIVATION_CONTEXT_BASIC_INFORMATION,*PACTIVATION_CONTEXT_BASIC_INFORMATION; 2755 2756 typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION; 2757 2758 #define ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED 1 2759 #endif 2760 #endif 2761 2762 #define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX 0x4 2763 #define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE 0x8 2764 #define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS 0x10 2765 #define QUERY_ACTCTX_FLAG_NO_ADDREF 0x80000000 2766 2767 WINBASEAPI WINBOOL WINAPI QueryActCtxW(DWORD dwFlags,HANDLE hActCtx,PVOID pvSubInstance,ULONG ulInfoClass,PVOID pvBuffer,SIZE_T cbBuffer,SIZE_T *pcbWrittenOrRequired); 2768 2769 typedef WINBOOL (WINAPI *PQUERYACTCTXW_FUNC)(DWORD dwFlags,HANDLE hActCtx,PVOID pvSubInstance,ULONG ulInfoClass,PVOID pvBuffer,SIZE_T cbBuffer,SIZE_T *pcbWrittenOrRequired); 2770 2771 WINBASEAPI WINBOOL WINAPI ProcessIdToSessionId(DWORD dwProcessId,DWORD *pSessionId); 2772 WINBASEAPI DWORD WINAPI WTSGetActiveConsoleSessionId(); 2773 WINBASEAPI WINBOOL WINAPI IsWow64Process(HANDLE hProcess,PBOOL Wow64Process); 2774 WINBASEAPI WINBOOL WINAPI GetLogicalProcessorInformation(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,PDWORD ReturnedLength); 2775 WINBASEAPI WINBOOL WINAPI GetNumaHighestNodeNumber(PULONG HighestNodeNumber); 2776 WINBASEAPI WINBOOL WINAPI GetNumaProcessorNode(UCHAR Processor,PUCHAR NodeNumber); 2777 WINBASEAPI WINBOOL WINAPI GetNumaNodeProcessorMask(UCHAR Node,PULONGLONG ProcessorMask); 2778 WINBASEAPI WINBOOL WINAPI GetNumaAvailableMemoryNode(UCHAR Node,PULONGLONG AvailableBytes); 2779 2780 /* New Windows Vista API. */ 2781 #if (_WIN32_WINNT >= 0x0600) 2782 #define SYMBOLIC_LINK_FLAG_FILE 0x0 2783 #define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1 2784 #define EXTENDED_STARTUPINFO_PRESENT 0x00080000 2785 #define CREATE_MUTEX_INITIAL_OWNER 0x00000001 2786 2787 #define CreateSymbolicLink __MINGW_NAME_AW(CreateSymbolicLink) 2788 #define CreateBoundaryDescriptor __MINGW_NAME_AW(CreateBoundaryDescriptor) 2789 #define OpenPrivateNamespace __MINGW_NAME_AW(OpenPrivateNamespace) 2790 #define CreatePrivateNamespace __MINGW_NAME_AW(CreatePrivateNamespace) 2791 #define CopyFileTransacted __MINGW_NAME_AW(CopyFileTransacted) 2792 #define CreateDirectoryTransacted __MINGW_NAME_AW(CreateDirectoryTransacted) 2793 #define CreateEventEx __MINGW_NAME_AW(CreateEventEx) 2794 #define CreateFileMappingNuma __MINGW_NAME_AW(CreateFileMappingNuma) 2795 #define CreateFileTransacted __MINGW_NAME_AW(CreateFileTransacted) 2796 #define CreateHardLinkTransacted __MINGW_NAME_AW(CreateHardLinkTransacted) 2797 #define DeleteFileTransacted __MINGW_NAME_AW(DeleteFileTransacted) 2798 #define CreateMutexEx __MINGW_NAME_AW(CreateMutexEx) 2799 #define CreateSemaphoreEx __MINGW_NAME_AW(CreateSemaphoreEx) 2800 #define CreateSymbolicLinkTransacted __MINGW_NAME_AW(CreateSymbolicLinkTransacted) 2801 #define CreateWaitableTimerEx __MINGW_NAME_AW(CreateWaitableTimerEx) 2802 #define FindFirstFileTransacted __MINGW_NAME_AW(FindFirstFileTransacted) 2803 2804 WINBASEAPI BOOLEAN WINAPI CreateSymbolicLinkA (LPSTR lpSymLinkFileName, LPSTR lpTargetFileName, DWORD dwFlags); 2805 WINBASEAPI BOOLEAN WINAPI CreateSymbolicLinkW (LPWSTR lpSymLinkFileName, LPWSTR lpTargetFileName, DWORD dwFlags); 2806 2807 /* Condition Variables http://msdn.microsoft.com/en-us/library/ms682052%28VS.85%29.aspx */ 2808 /* FIXME: These need their data types actually fixed in winnt.h !!! */ 2809 typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE; 2810 typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK; 2811 2812 WINBASEAPI VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable); 2813 WINBASEAPI WINBOOL WINAPI SleepConditionVariableCS(PCONDITION_VARIABLE ConditionVariable, PCRITICAL_SECTION CriticalSection, DWORD dwMilliseconds); 2814 WINBASEAPI WINBOOL WINAPI SleepConditionVariableSRW(PCONDITION_VARIABLE ConditionVariable, PSRWLOCK SRWLock, DWORD dwMilliseconds, ULONG Flags); 2815 WINBASEAPI VOID WINAPI WakeAllConditionVariable(PCONDITION_VARIABLE ConditionVariable); 2816 WINBASEAPI VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable); 2817 2818 /*Slim Reader/Writer (SRW) Locks http://msdn.microsoft.com/en-us/library/aa904937%28VS.85%29.aspx*/ 2819 /* FIXME: See above !!! */ 2820 WINBASEAPI VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK SRWLock); 2821 WINBASEAPI VOID WINAPI AcquireSRWLockShared(PSRWLOCK SRWLock); 2822 WINBASEAPI VOID WINAPI InitializeSRWLock(PSRWLOCK SRWLock); 2823 WINBASEAPI VOID WINAPI ReleaseSRWLockExclusive(PSRWLOCK SRWLock); 2824 WINBASEAPI VOID WINAPI ReleaseSRWLockShared(PSRWLOCK SRWLock); 2825 2826 WINBASEAPI BOOLEAN TryAcquireSRWLockExclusive(PSRWLOCK SRWLock); 2827 WINBASEAPI BOOLEAN TryAcquireSRWLockShared(PSRWLOCK SRWLock); 2828 2829 /*One-Time Initialization http://msdn.microsoft.com/en-us/library/aa363808(VS.85).aspx*/ 2830 /* FIXME: See above !!! */ 2831 #define INIT_ONCE_ASYNC __MSABI_LONG(0x00000002U) 2832 #define INIT_ONCE_INIT_FAILED __MSABI_LONG(0x00000004U) 2833 2834 typedef PRTL_RUN_ONCE PINIT_ONCE; 2835 typedef PRTL_RUN_ONCE LPINIT_ONCE; 2836 typedef WINBOOL CALLBACK (*PINIT_ONCE_FN) (PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context); 2837 2838 WINBASEAPI WINBOOL WINAPI InitOnceBeginInitialize(LPINIT_ONCE lpInitOnce, DWORD dwFlags, PBOOL fPending, LPVOID *lpContext); 2839 WINBASEAPI WINBOOL WINAPI InitOnceComplete(LPINIT_ONCE lpInitOnce, DWORD dwFlags, LPVOID lpContext); 2840 WINBASEAPI WINBOOL WINAPI InitOnceExecuteOnce(PINIT_ONCE InitOnce, PINIT_ONCE_FN InitFn, PVOID Parameter, LPVOID *Context); 2841 2842 WINBASEAPI WINBOOL WINAPI AddMandatoryAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD MandatoryPolicy,PSID pLabelSid); 2843 WINBASEAPI WINBOOL WINAPI AddSIDToBoundaryDescriptor(HANDLE *BoundaryDescriptor,PSID RequiredSid); 2844 WINBASEAPI HANDLE WINAPI CreateBoundaryDescriptorA(LPCSTR Name,ULONG Flags); 2845 WINBASEAPI HANDLE WINAPI CreateBoundaryDescriptorW(LPCWSTR Name,ULONG Flags); 2846 2847 WINBASEAPI BOOLEAN WINAPI ClosePrivateNamespace(HANDLE Handle,ULONG Flags); 2848 WINBASEAPI HANDLE WINAPI OpenPrivateNamespaceA(LPVOID lpBoundaryDescriptor,LPCSTR lpAliasPrefix); 2849 WINBASEAPI HANDLE WINAPI OpenPrivateNamespaceW(LPVOID lpBoundaryDescriptor,LPCWSTR lpAliasPrefix); 2850 WINBASEAPI VOID WINAPI DeleteBoundaryDescriptor(HANDLE BoundaryDescriptor); 2851 WINBASEAPI HANDLE WINAPI CreatePrivateNamespaceA(LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes,LPVOID lpBoundaryDescriptor,LPCSTR lpAliasPrefix); 2852 WINBASEAPI HANDLE WINAPI CreatePrivateNamespaceW(LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes,LPVOID lpBoundaryDescriptor,LPCWSTR lpAliasPrefix); 2853 2854 typedef BOOLEAN CALLBACK (*PSECURE_MEMORY_CACHE_CALLBACK) (PVOID Addr,SIZE_T Range); 2855 2856 WINBASEAPI WINBOOL WINAPI AddSecureMemoryCacheCallback(PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack); 2857 WINBASEAPI WINBOOL WINAPI RemoveSecureMemoryCacheCallback(PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack); 2858 2859 WINBASEAPI WINBOOL WINAPI AllocateUserPhysicalPagesNuma(HANDLE hProcess,PULONG_PTR NumberOfPages,PULONG_PTR PageArray,DWORD nndPreferred); 2860 2861 typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID pvParameter); 2862 WINBASEAPI HRESULT WINAPI RegisterApplicationRecoveryCallback(APPLICATION_RECOVERY_CALLBACK pRecoveryCallback,PVOID pvParameter,DWORD dwPingInterval,DWORD dwFlags); 2863 WINBASEAPI VOID WINAPI ApplicationRecoveryFinished(WINBOOL bSuccess); 2864 WINBASEAPI HRESULT WINAPI ApplicationRecoveryInProgress(PBOOL pbCanceled); 2865 2866 WINBASEAPI WINBOOL WINAPI QueryIdleProcessorCycleTime(PULONG BufferLength,PULONG64 ProcessorIdleCycleTime); 2867 WINBASEAPI WINBOOL WINAPI QueryProcessCycleTime(HANDLE ProcessHandle,PULONG64 CycleTime); 2868 WINBASEAPI WINBOOL WINAPI QueryThreadCycleTime(HANDLE ThreadHandle,PULONG64 CycleTime); 2869 #if (_WIN32_WINNT >= 0x0601) 2870 WINBASEAPI WINBOOL WINAPI QueryIdleProcessorCycleTimeEx(USHORT Group,PULONG BufferLength,PULONG64 ProcessorIdleCycleTime); 2871 #endif 2872 2873 /* THREAD POOL stuff : */ 2874 /* FIXME: These thread pool callback data types and 2875 * func. pointer types actually belong in winnt.h !!!! 2876 * Not all data types need to be opaque, either !!! */ 2877 typedef struct _TP_IO *PTP_IO; 2878 typedef struct _TP_CALLBACK_INSTANCE *PTP_CALLBACK_INSTANCE; 2879 typedef struct _TP_WIN32_IO_CALLBACK *PTP_WIN32_IO_CALLBACK; 2880 typedef struct _TP_CALLBACK_ENVIRON *PTP_CALLBACK_ENVIRON; 2881 typedef struct _TP_CLEANUP_GROUP *PTP_CLEANUP_GROUP; 2882 typedef struct _TP_TIMER *PTP_TIMER; 2883 typedef struct _TP_WAIT *PTP_WAIT; 2884 typedef struct _TP_WORK *PTP_WORK; 2885 typedef struct _TP_POOL *PTP_POOL; 2886 2887 typedef DWORD TP_WAIT_RESULT; 2888 2889 typedef VOID (CALLBACK *PTP_WAIT_CALLBACK)(PTP_CALLBACK_INSTANCE Instance, PVOID Context, PTP_WAIT Wait, TP_WAIT_RESULT WaitResult); 2890 typedef VOID (CALLBACK *PTP_WORK_CALLBACK)(PTP_CALLBACK_INSTANCE Instance, PVOID Context, PTP_WORK Work); 2891 typedef VOID (CALLBACK *PTP_TIMER_CALLBACK)(PTP_CALLBACK_INSTANCE Instance, PVOID Context, PTP_TIMER Timer); 2892 typedef VOID (CALLBACK *PTP_SIMPLE_CALLBACK)(PTP_CALLBACK_INSTANCE Instance, PVOID Context); 2893 2894 #define PRIVATE_NAMESPACE_FLAG_DESTROY 0x00000001 2895 2896 WINBASEAPI WINBOOL WINAPI CallbackMayRunLong(PTP_CALLBACK_INSTANCE pci); 2897 WINBASEAPI WINBOOL WINAPI CancelIoEx(HANDLE hFile,LPOVERLAPPED lpOverlapped); 2898 WINBASEAPI WINBOOL WINAPI CancelSynchronousIo(HANDLE hThread); 2899 WINBASEAPI VOID WINAPI CancelThreadpoolIo(PTP_IO pio); 2900 WINBASEAPI PTP_IO WINAPI CreateThreadpoolIo(HANDLE fl,PTP_WIN32_IO_CALLBACK pfnio,PVOID pv,PTP_CALLBACK_ENVIRON pcbe); 2901 WINBASEAPI VOID WINAPI CloseThreadpool(PTP_POOL ptpp); 2902 WINBASEAPI PTP_POOL WINAPI CreateThreadpool(PVOID reserved); 2903 WINBASEAPI VOID WINAPI CloseThreadpoolCleanupGroup(PTP_CLEANUP_GROUP ptpcg); 2904 WINBASEAPI VOID WINAPI CloseThreadpoolCleanupGroupMembers(PTP_CLEANUP_GROUP ptpcg,WINBOOL fCancelPendingCallbacks,PVOID pvCleanupContext); 2905 WINBASEAPI VOID WINAPI CloseThreadpoolIo(PTP_IO pio); 2906 WINBASEAPI VOID WINAPI CloseThreadpoolTimer(PTP_TIMER pti); 2907 WINBASEAPI VOID WINAPI CloseThreadpoolWait(PTP_WAIT pwa); 2908 WINBASEAPI VOID WINAPI CloseThreadpoolWork(PTP_WORK pwk); 2909 2910 WINBASEAPI PTP_CLEANUP_GROUP WINAPI CreateThreadpoolCleanupGroup(void); 2911 WINBASEAPI PTP_WAIT WINAPI CreateThreadpoolWait(PTP_WAIT_CALLBACK pfnwa,PVOID pv,PTP_CALLBACK_ENVIRON pcbe); 2912 WINBASEAPI PTP_WORK WINAPI CreateThreadpoolWork(PTP_WORK_CALLBACK pfnwk,PVOID pv,PTP_CALLBACK_ENVIRON pcbe); 2913 WINBASEAPI PTP_TIMER WINAPI CreateThreadpoolTimer(PTP_TIMER_CALLBACK pfnti,PVOID pv,PTP_CALLBACK_ENVIRON pcbe); 2914 WINBASEAPI LPVOID WINAPI ConvertThreadToFiberEx(LPVOID lpParameter, DWORD dwFlags); 2915 WINBASEAPI VOID WINAPI SubmitThreadpoolWork(PTP_WORK pwk); 2916 2917 /* FIXME: These must be inlines and must call something 2918 * proper from winnt.h !!!! See above for more 2919 * thread pool fixme notes. */ 2920 2921 /* INLINE - http://msdn.microsoft.com/en-us/library/ms686255%28v=VS.85%29.aspx */ 2922 VOID SetThreadpoolCallbackCleanupGroup(PTP_CALLBACK_ENVIRON pcbe, PTP_CLEANUP_GROUP ptpcg, PTP_CLEANUP_GROUP_CANCEL_CALLBACK pfng); 2923 /* INLINE - http://msdn.microsoft.com/en-us/library/ms686258%28v=VS.85%29.aspx */ 2924 VOID SetThreadpoolCallbackLibrary(PTP_CALLBACK_ENVIRON pcbe, PVOID mod); 2925 /* INLINE - http://msdn.microsoft.com/en-us/library/ms686261%28v=VS.85%29.aspx */ 2926 VOID SetThreadpoolCallbackPool(PTP_CALLBACK_ENVIRON pcbe, PTP_POOL ptpp); 2927 /* INLINE - http://msdn.microsoft.com/en-us/library/ms686263%28v=VS.85%29.aspx */ 2928 VOID SetThreadpoolCallbackRunsLong(PTP_CALLBACK_ENVIRON pcbe); 2929 2930 WINBASEAPI VOID WINAPI SetThreadpoolThreadMaximum(PTP_POOL ptpp, DWORD cthrdMost); 2931 WINBASEAPI WINBOOL WINAPI SetThreadpoolThreadMinimum(PTP_POOL ptpp, DWORD cthrdMic); 2932 WINBASEAPI VOID WINAPI SetThreadpoolTimer(PTP_TIMER pti, PFILETIME pftDueTime, DWORD msPeriod, DWORD msWindowLength); 2933 WINBASEAPI VOID WINAPI SetThreadpoolWait(PTP_WAIT pwa, HANDLE h, PFILETIME pftTimeout); 2934 WINBASEAPI VOID WINAPI StartThreadpoolIo(PTP_IO pio); 2935 2936 /* End of THREAD POOL stuff */ 2937 2938 2939 WINBASEAPI WINBOOL WINAPI CopyFileTransactedA( 2940 LPCSTR lpExistingFileName, 2941 LPCSTR lpNewFileName, 2942 LPPROGRESS_ROUTINE lpProgressRoutine, 2943 LPVOID lpData, 2944 LPBOOL pbCancel, 2945 DWORD dwCopyFlags, 2946 HANDLE hTransaction 2947 ); 2948 2949 WINBASEAPI WINBOOL WINAPI CopyFileTransactedW( 2950 LPCWSTR lpExistingFileName, 2951 LPCWSTR lpNewFileName, 2952 LPPROGRESS_ROUTINE lpProgressRoutine, 2953 LPVOID lpData, 2954 LPBOOL pbCancel, 2955 DWORD dwCopyFlags, 2956 HANDLE hTransaction 2957 ); 2958 2959 WINBASEAPI WINBOOL WINAPI CreateDirectoryTransactedA( 2960 LPCSTR lpTemplateDirectory, 2961 LPCSTR lpNewDirectory, 2962 LPSECURITY_ATTRIBUTES lpSecurityAttributes, 2963 HANDLE hTransaction 2964 ); 2965 2966 WINBASEAPI WINBOOL WINAPI CreateDirectoryTransactedW( 2967 LPCWSTR lpTemplateDirectory, 2968 LPCWSTR lpNewDirectory, 2969 LPSECURITY_ATTRIBUTES lpSecurityAttributes, 2970 HANDLE hTransaction 2971 ); 2972 2973 #define CREATE_EVENT_INITIAL_SET 0x00000002 2974 #define CREATE_EVENT_MANUAL_RESET 0x00000001 2975 2976 WINBASEAPI HANDLE WINAPI CreateEventExA( 2977 LPSECURITY_ATTRIBUTES lpEventAttributes, 2978 LPCSTR lpName, 2979 DWORD dwFlags, 2980 DWORD dwDesiredAccess 2981 ); 2982 2983 WINBASEAPI HANDLE WINAPI CreateEventExW( 2984 LPSECURITY_ATTRIBUTES lpEventAttributes, 2985 LPCWSTR lpName, 2986 DWORD dwFlags, 2987 DWORD dwDesiredAccess 2988 ); 2989 2990 WINBASEAPI HANDLE WINAPI CreateFileMappingNumaA( 2991 HANDLE hFile, 2992 LPSECURITY_ATTRIBUTES lpFileMappingAttributes, 2993 DWORD flProtect, 2994 DWORD dwMaximumSizeHigh, 2995 DWORD dwMaximumSizeLow, 2996 LPCSTR lpName, 2997 DWORD nndPreferred 2998 ); 2999 3000 WINBASEAPI HANDLE WINAPI CreateFileMappingNumaW( 3001 HANDLE hFile, 3002 LPSECURITY_ATTRIBUTES lpFileMappingAttributes, 3003 DWORD flProtect, 3004 DWORD dwMaximumSizeHigh, 3005 DWORD dwMaximumSizeLow, 3006 LPCWSTR lpName, 3007 DWORD nndPreferred 3008 ); 3009 3010 3011 #define TXFS_MINIVERSION_COMMITTED_VIEW 0x0000 3012 #define TXFS_MINIVERSION_DIRTY_VIEW 0xFFFE 3013 #define TXFS_MINIVERSION_DEFAULT_VIEW 0xFFFF 3014 3015 WINBASEAPI HANDLE WINAPI CreateFileTransactedA( 3016 LPCSTR lpFileName, 3017 DWORD dwDesiredAccess, 3018 DWORD dwShareMode, 3019 LPSECURITY_ATTRIBUTES lpSecurityAttributes, 3020 DWORD dwCreationDisposition, 3021 DWORD dwFlagsAndAttributes, 3022 HANDLE hTemplateFile, 3023 HANDLE hTransaction, 3024 PUSHORT pusMiniVersion, 3025 PVOID pExtendedParameter 3026 ); 3027 3028 WINBASEAPI HANDLE WINAPI CreateFileTransactedW( 3029 LPCWSTR lpFileName, 3030 DWORD dwDesiredAccess, 3031 DWORD dwShareMode, 3032 LPSECURITY_ATTRIBUTES lpSecurityAttributes, 3033 DWORD dwCreationDisposition, 3034 DWORD dwFlagsAndAttributes, 3035 HANDLE hTemplateFile, 3036 HANDLE hTransaction, 3037 PUSHORT pusMiniVersion, 3038 PVOID pExtendedParameter 3039 ); 3040 3041 WINBASEAPI WINBOOL WINAPI CreateHardLinkTransactedA( 3042 LPCSTR lpFileName, 3043 LPCSTR lpExistingFileName, 3044 LPSECURITY_ATTRIBUTES lpSecurityAttributes, 3045 HANDLE hTransaction 3046 ); 3047 3048 WINBASEAPI WINBOOL WINAPI CreateHardLinkTransactedW( 3049 LPCWSTR lpFileName, 3050 LPCWSTR lpExistingFileName, 3051 LPSECURITY_ATTRIBUTES lpSecurityAttributes, 3052 HANDLE hTransaction 3053 ); 3054 3055 WINBASEAPI HANDLE WINAPI CreateTransaction( 3056 LPSECURITY_ATTRIBUTES lpTransactionAttributes, 3057 LPGUID UOW, 3058 DWORD CreateOptions, 3059 DWORD IsolationLevel, 3060 DWORD IsolationFlags, 3061 DWORD Timeout, 3062 LPWSTR Description 3063 ); 3064 3065 WINBASEAPI WINBOOL WINAPI DeleteFileTransactedA( 3066 LPCSTR lpFileName, 3067 HANDLE hTransaction 3068 ); 3069 3070 WINBASEAPI WINBOOL WINAPI DeleteFileTransactedW( 3071 LPCWSTR lpFileName, 3072 HANDLE hTransaction 3073 ); 3074 3075 WINBASEAPI HANDLE WINAPI CreateMutexExA(LPSECURITY_ATTRIBUTES lpMutexAttributes, LPCTSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess); 3076 WINBASEAPI HANDLE WINAPI CreateMutexExW(LPSECURITY_ATTRIBUTES lpMutexAttributes, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess); 3077 3078 WINBASEAPI HANDLE WINAPI CreateSemaphoreExA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess); 3079 WINBASEAPI HANDLE WINAPI CreateSemaphoreExW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess); 3080 3081 WINBASEAPI BOOLEAN WINAPI CreateSymbolicLinkTransactedW(LPWSTR lpSymlinkFileName, LPWSTR lpTargetFileName, DWORD dwFlags, HANDLE hTransaction); 3082 WINBASEAPI BOOLEAN WINAPI CreateSymbolicLinkTransactedA(LPSTR lpSymlinkFileName, LPSTR lpTargetFileName, DWORD dwFlags, HANDLE hTransaction); 3083 3084 WINBASEAPI HANDLE WINAPI CreateWaitableTimerExA(LPSECURITY_ATTRIBUTES lpTimerAttributes, LPCSTR lpTimerName, DWORD dwFlags, DWORD dwDesiredAccess); 3085 WINBASEAPI HANDLE WINAPI CreateWaitableTimerExW(LPSECURITY_ATTRIBUTES lpTimerAttributes, LPCWSTR lpTimerName, DWORD dwFlags, DWORD dwDesiredAccess); 3086 3087 #define DeleteFileTransacted __MINGW_NAME_AW(DeleteFileTransacted) 3088 3089 WINBASEAPI WINBOOL WINAPI DeleteFileTransactedW(LPCWSTR lpFileName, HANDLE hTransaction); 3090 WINBASEAPI WINBOOL WINAPI DeleteFileTransactedA(LPCSTR lpFileName, HANDLE hTransaction); 3091 3092 WINBASEAPI VOID WINAPI DestroyThreadpoolEnvironment(PTP_CALLBACK_ENVIRON pcbe); 3093 3094 WINBASEAPI VOID WINAPI DisassociateCurrentThreadFromCallback(PTP_CALLBACK_INSTANCE pci); 3095 3096 typedef enum _FILE_ID_TYPE { 3097 FileIdType, 3098 ObjectIdType, 3099 MaximumFileIdType 3100 } FILE_ID_TYPE, *PFILE_ID_TYPE; 3101 3102 typedef struct _TIME_DYNAMIC_ZONE_INFORMATION { 3103 LONG Bias; 3104 WCHAR StandardName[32]; 3105 SYSTEMTIME StandardDate; 3106 LONG StandardBias; 3107 WCHAR DaylightName[32]; 3108 SYSTEMTIME DaylightDate; 3109 LONG DaylightBias; 3110 WCHAR TimeZoneKeyName[128]; 3111 BOOLEAN DynamicDaylightTimeDisabled; 3112 } DYNAMIC_TIME_ZONE_INFORMATION, *PDYNAMIC_TIME_ZONE_INFORMATION; 3113 3114 typedef struct _FILE_ALLOCATION_INFO { 3115 LARGE_INTEGER AllocationSize; 3116 } FILE_ALLOCATION_INFO, *PFILE_ALLOCATION_INFO; 3117 3118 typedef struct _FILE_ATTRIBUTE_TAG_INFO { 3119 DWORD FileAttributes; 3120 DWORD ReparseTag; 3121 } FILE_ATTRIBUTE_TAG_INFO, *PFILE_ATTRIBUTE_TAG_INFO; 3122 3123 typedef struct _FILE_BASIC_INFO { 3124 LARGE_INTEGER CreationTime; 3125 LARGE_INTEGER LastAccessTime; 3126 LARGE_INTEGER LastWriteTime; 3127 LARGE_INTEGER ChangeTime; 3128 DWORD FileAttributes; 3129 } FILE_BASIC_INFO, *PFILE_BASIC_INFO; 3130 3131 typedef struct _FILE_COMPRESSION_INFO { 3132 LARGE_INTEGER CompressedFileSize; 3133 WORD CompressionFormat; 3134 UCHAR CompressionUnitShift; 3135 UCHAR ChunkShift; 3136 UCHAR ClusterShift; 3137 UCHAR Reserved[3]; 3138 } FILE_COMPRESSION_INFO, *PFILE_COMPRESSION_INFO; 3139 3140 typedef struct _FILE_DISPOSITION_INFO { 3141 WINBOOL DeleteFile; 3142 } FILE_DISPOSITION_INFO, *PFILE_DISPOSITION_INFO; 3143 3144 typedef struct _FILE_END_OF_FILE_INFO { 3145 LARGE_INTEGER EndOfFile; 3146 } FILE_END_OF_FILE_INFO, *PFILE_END_OF_FILE_INFO; 3147 3148 typedef struct _FILE_ID_BOTH_DIR_INFO { 3149 DWORD NextEntryOffset; 3150 DWORD FileIndex; 3151 LARGE_INTEGER CreationTime; 3152 LARGE_INTEGER LastAccessTime; 3153 LARGE_INTEGER LastWriteTime; 3154 LARGE_INTEGER ChangeTime; 3155 LARGE_INTEGER EndOfFile; 3156 LARGE_INTEGER AllocationSize; 3157 DWORD FileAttributes; 3158 DWORD FileNameLength; 3159 DWORD EaSize; 3160 CCHAR ShortNameLength; 3161 WCHAR ShortName[12]; 3162 LARGE_INTEGER FileId; 3163 WCHAR FileName[1]; 3164 } FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO; 3165 3166 typedef struct _FILE_ID_DESCRIPTOR{ 3167 DWORD dwSize; 3168 FILE_ID_TYPE Type; 3169 __C89_NAMELESS union { 3170 LARGE_INTEGER FileId; 3171 GUID ObjectId; 3172 }; 3173 } FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR; 3174 3175 typedef enum _FILE_INFO_BY_HANDLE_CLASS { 3176 FileBasicInfo = 0, 3177 FileStandardInfo = 1, 3178 FileNameInfo = 2, 3179 FileRenameInfo = 3, 3180 FileDispositionInfo = 4, 3181 FileAllocationInfo = 5, 3182 FileEndOfFileInfo = 6, 3183 FileStreamInfo = 7, 3184 FileCompressionInfo = 8, 3185 FileAttributeTagInfo = 9, 3186 FileIdBothDirectoryInfo = 10, // 0xA 3187 FileIdBothDirectoryRestartInfo = 11, // 0xB 3188 FileIoPriorityHintInfo = 12, // 0xC 3189 FileRemoteProtocolInfo = 13, // 0xD 3190 MaximumFileInfoByHandlesClass = 14 // 0xE 3191 } FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS; 3192 3193 typedef enum _PRIORITY_HINT { 3194 IoPriorityHintVeryLow = 0, 3195 IoPriorityHintLow, 3196 IoPriorityHintNormal, 3197 MaximumIoPriorityHintType 3198 } PRIORITY_HINT; 3199 3200 typedef struct _FILE_IO_PRIORITY_HINT_INFO { 3201 PRIORITY_HINT PriorityHint; 3202 } FILE_IO_PRIORITY_HINT_INFO, *PFILE_IO_PRIORITY_HINT_INFO; 3203 3204 typedef struct _FILE_NAME_INFO { 3205 DWORD FileNameLength; 3206 WCHAR FileName[1]; 3207 } FILE_NAME_INFO, *PFILE_NAME_INFO; 3208 3209 typedef struct _FILE_RENAME_INFO { 3210 BOOL ReplaceIfExists; 3211 HANDLE RootDirectory; 3212 DWORD FileNameLength; 3213 WCHAR FileName[1]; 3214 } FILE_RENAME_INFO, *PFILE_RENAME_INFO; 3215 3216 typedef struct _FILE_STANDARD_INFO { 3217 LARGE_INTEGER AllocationSize; 3218 LARGE_INTEGER EndOfFile; 3219 DWORD NumberOfLinks; 3220 WINBOOL DeletePending; 3221 WINBOOL Directory; 3222 } FILE_STANDARD_INFO, *PFILE_STANDARD_INFO; 3223 3224 typedef struct _FILE_STREAM_INFO { 3225 DWORD NextEntryOffset; 3226 DWORD StreamNameLength; 3227 LARGE_INTEGER StreamSize; 3228 LARGE_INTEGER StreamAllocationSize; 3229 WCHAR StreamName[1]; 3230 } FILE_STREAM_INFO, *PFILE_STREAM_INFO; 3231 3232 typedef struct _OVERLAPPED_ENTRY { 3233 ULONG_PTR lpCompletionKey; 3234 LPOVERLAPPED lpOverlapped; 3235 ULONG_PTR Internal; 3236 DWORD dwNumberOfBytesTransferred; 3237 } OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY; 3238 3239 WINBASEAPI HANDLE WINAPI FindFirstFileNameTransactedW( 3240 LPCWSTR lpFileName, 3241 DWORD dwFlags, 3242 LPDWORD StringLength, 3243 PWCHAR LinkName, 3244 HANDLE hTransaction 3245 ); 3246 3247 WINBASEAPI HANDLE WINAPI FindFirstFileNameW( 3248 LPCWSTR lpFileName, 3249 DWORD dwFlags, 3250 LPDWORD StringLength, 3251 PWCHAR LinkName 3252 ); 3253 3254 WINBASEAPI HANDLE WINAPI FindFirstFileTransactedA( 3255 LPCSTR lpFileName, 3256 FINDEX_INFO_LEVELS fInfoLevelId, 3257 LPVOID lpFindFileData, 3258 FINDEX_SEARCH_OPS fSearchOp, 3259 LPVOID lpSearchFilter, 3260 DWORD dwAdditionalFlags, 3261 HANDLE hTransaction 3262 ); 3263 3264 WINBASEAPI HANDLE WINAPI FindFirstFileTransactedW( 3265 LPCWSTR lpFileName, 3266 FINDEX_INFO_LEVELS fInfoLevelId, 3267 LPVOID lpFindFileData, 3268 FINDEX_SEARCH_OPS fSearchOp, 3269 LPVOID lpSearchFilter, 3270 DWORD dwAdditionalFlags, 3271 HANDLE hTransaction 3272 ); 3273 3274 WINBASEAPI HANDLE WINAPI FindFirstStreamTransactedW( 3275 LPCWSTR lpFileName, 3276 STREAM_INFO_LEVELS InfoLevel, 3277 LPVOID lpFindStreamData, 3278 DWORD dwFlags, 3279 HANDLE hTransaction 3280 ); 3281 3282 WINBASEAPI HANDLE WINAPI FindFirstStreamW( 3283 LPCWSTR lpFileName, 3284 STREAM_INFO_LEVELS InfoLevel, 3285 LPVOID lpFindStreamData, 3286 DWORD dwFlags 3287 ); 3288 3289 WINBASEAPI WINBOOL WINAPI FindNextFileNameW( 3290 HANDLE hFindStream, 3291 LPDWORD StringLength, 3292 PWCHAR LinkName 3293 ); 3294 3295 WINBASEAPI WINBOOL WINAPI FindNextStreamW( 3296 HANDLE hFindStream, 3297 LPVOID lpFindStreamData 3298 ); 3299 3300 WINBASEAPI DWORD WINAPI FlsAlloc( 3301 PFLS_CALLBACK_FUNCTION lpCallback 3302 ); 3303 3304 WINBASEAPI WINBOOL WINAPI FlsFree( 3305 DWORD dwFlsIndex 3306 ); 3307 3308 WINBASEAPI PVOID WINAPI FlsGetValue( 3309 DWORD dwFlsIndex 3310 ); 3311 3312 WINBASEAPI WINBOOL WINAPI FlsSetValue( 3313 DWORD dwFlsIndex, 3314 PVOID lpFlsData 3315 ); 3316 3317 WINBASEAPI VOID WINAPI FlushProcessWriteBuffers(void); 3318 3319 WINBASEAPI VOID WINAPI FreeLibraryWhenCallbackReturns( 3320 PTP_CALLBACK_INSTANCE pci, 3321 HMODULE mod 3322 ); 3323 3324 WINBASEAPI HRESULT WINAPI GetApplicationRecoveryCallback( 3325 HANDLE hProcess, 3326 APPLICATION_RECOVERY_CALLBACK *pRecoveryCallback, 3327 PVOID *ppvParameter, 3328 DWORD dwPingInterval, 3329 DWORD dwFlags 3330 ); 3331 3332 WINBASEAPI HRESULT WINAPI GetApplicationRestartSettings( 3333 HANDLE hProcess, 3334 PWSTR pwzCommandline, 3335 PDWORD pcchSize, 3336 PDWORD pdwFlags 3337 ); 3338 3339 #define RESTART_NO_CRASH 1 3340 #define RESTART_NO_HANG 2 3341 #define RESTART_NO_PATCH 4 3342 #define RESTART_NO_REBOOT 8 3343 3344 #define RESTART_MAX_CMD_LINE 1024 3345 3346 WINBASEAPI HRESULT WINAPI RegisterApplicationRestart( 3347 PCWSTR pwzCommandline, 3348 DWORD dwFlags 3349 ); 3350 3351 #define GetCompressedFileSizeTransacted __MINGW_NAME_AW(GetCompressedFileSizeTransacted) 3352 3353 WINBASEAPI DWORD WINAPI GetCompressedFileSizeTransactedA( 3354 LPCTSTR lpFileName, 3355 LPDWORD lpFileSizeHigh, 3356 HANDLE hTransaction 3357 ); 3358 3359 WINBASEAPI DWORD WINAPI GetCompressedFileSizeTransactedW( 3360 LPCWSTR lpFileName, 3361 LPDWORD lpFileSizeHigh, 3362 HANDLE hTransaction 3363 ); 3364 3365 WINBASEAPI DWORD WINAPI GetDynamicTimeZoneInformation( 3366 PDYNAMIC_TIME_ZONE_INFORMATION pTimeZoneInformation 3367 ); 3368 3369 WINBASEAPI UINT WINAPI GetErrorMode(void); 3370 3371 #define GetFileAttributesTransacted __MINGW_NAME_AW(GetFileAttributesTransacted) 3372 3373 WINBASEAPI WINBOOL WINAPI GetFileAttributesTransactedA( 3374 LPCSTR lpFileName, 3375 GET_FILEEX_INFO_LEVELS fInfoLevelId, 3376 LPVOID lpFileInformation, 3377 HANDLE hTransaction 3378 ); 3379 3380 WINBASEAPI WINBOOL WINAPI GetFileAttributesTransactedW( 3381 LPCWSTR lpFileName, 3382 GET_FILEEX_INFO_LEVELS fInfoLevelId, 3383 LPVOID lpFileInformation, 3384 HANDLE hTransaction 3385 ); 3386 3387 WINBASEAPI WINBOOL WINAPI GetFileBandwidthReservation( 3388 HANDLE hFile, 3389 LPDWORD lpPeriodMilliseconds, 3390 LPDWORD lpBytesPerPeriod, 3391 LPBOOL pDiscardable, 3392 LPDWORD lpTransferSize, 3393 LPDWORD lpNumOutstandingRequests 3394 ); 3395 3396 WINBASEAPI WINBOOL WINAPI GetFileInformationByHandleEx( 3397 HANDLE hFile, 3398 FILE_INFO_BY_HANDLE_CLASS FileInformationClass, 3399 LPVOID lpFileInformation, 3400 DWORD dwBufferSize 3401 ); 3402 3403 #define GetFinalPathNameByHandle __MINGW_NAME_AW(GetFinalPathNameByHandle) 3404 3405 #define VOLUME_NAME_DOS 0x0 3406 #define VOLUME_NAME_GUID 0x1 3407 #define VOLUME_NAME_NT 0x2 3408 #define VOLUME_NAME_NONE 0x4 3409 3410 #define FILE_NAME_NORMALIZED 0x0 3411 #define FILE_NAME_OPENED 0x8 3412 3413 WINBASEAPI DWORD WINAPI GetFinalPathNameByHandleA( 3414 HANDLE hFile, 3415 LPSTR lpszFilePath, 3416 DWORD cchFilePath, 3417 DWORD dwFlags 3418 ); 3419 3420 WINBASEAPI DWORD WINAPI GetFinalPathNameByHandleW( 3421 HANDLE hFile, 3422 LPWSTR lpszFilePath, 3423 DWORD cchFilePath, 3424 DWORD dwFlags 3425 ); 3426 3427 #define GetFullPathNameTransacted __MINGW_NAME_AW(GetFullPathNameTransacted) 3428 3429 WINBASEAPI DWORD WINAPI GetFullPathNameTransactedA( 3430 LPCSTR lpFileName, 3431 DWORD nBufferLength, 3432 LPSTR lpBuffer, 3433 LPSTR *lpFilePart, 3434 HANDLE hTransaction 3435 ); 3436 3437 WINBASEAPI DWORD WINAPI GetFullPathNameTransactedW( 3438 LPCWSTR lpFileName, 3439 DWORD nBufferLength, 3440 LPWSTR lpBuffer, 3441 LPWSTR *lpFilePart, 3442 HANDLE hTransaction 3443 ); 3444 3445 #define GetLongPathNameTransacted __MINGW_NAME_AW(GetLongPathNameTransacted) 3446 3447 WINBASEAPI DWORD WINAPI GetLongPathNameTransactedA( 3448 LPCSTR lpszShortPath, 3449 LPSTR lpszLongPath, 3450 DWORD cchBuffer, 3451 HANDLE hTransaction 3452 ); 3453 3454 WINBASEAPI DWORD WINAPI GetLongPathNameTransactedW( 3455 LPCWSTR lpszShortPath, 3456 LPWSTR lpszLongPath, 3457 DWORD cchBuffer, 3458 HANDLE hTransaction 3459 ); 3460 3461 #define GetNamedPipeClientComputerName __MINGW_NAME_AW(GetNamedPipeClientComputerName) 3462 3463 WINBASEAPI WINBOOL WINAPI GetNamedPipeClientComputerNameA( 3464 HANDLE Pipe, 3465 LPSTR ClientComputerName, 3466 ULONG ClientComputerNameLength 3467 ); 3468 3469 WINBASEAPI WINBOOL WINAPI GetNamedPipeClientComputerNameW( 3470 HANDLE Pipe, 3471 LPWSTR ClientComputerName, 3472 ULONG ClientComputerNameLength 3473 ); 3474 3475 WINBASEAPI WINBOOL WINAPI GetNamedPipeClientProcessId( 3476 HANDLE Pipe, 3477 PULONG ClientProcessId 3478 ); 3479 3480 WINBASEAPI WINBOOL WINAPI GetNamedPipeClientSessionId( 3481 HANDLE Pipe, 3482 PULONG ClientSessionId 3483 ); 3484 3485 WINBASEAPI WINBOOL WINAPI GetNamedPipeServerProcessId( 3486 HANDLE Pipe, 3487 PULONG ServerProcessId 3488 ); 3489 3490 WINBASEAPI WINBOOL WINAPI GetNamedPipeServerSessionId( 3491 HANDLE Pipe, 3492 PULONG ServerSessionId 3493 ); 3494 3495 WINBASEAPI WINBOOL WINAPI GetNumaProximityNode( 3496 ULONG ProximityId, 3497 PUCHAR NodeNumber 3498 ); 3499 3500 WINBOOL WINAPI GetPhysicallyInstalledSystemMemory( 3501 PULONGLONG TotalMemoryInKilobytes 3502 ); 3503 3504 typedef LPVOID PPROC_THREAD_ATTRIBUTE_LIST, LPPROC_THREAD_ATTRIBUTE_LIST; 3505 3506 WINBASEAPI WINBOOL WINAPI UpdateProcThreadAttribute( 3507 LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, 3508 DWORD dwFlags, 3509 DWORD_PTR Attribute, 3510 PVOID lpValue, 3511 SIZE_T cbSize, 3512 PVOID lpPreviousValue, 3513 PSIZE_T lpReturnSize 3514 ); 3515 3516 WINBASEAPI WINBOOL WINAPI GetProductInfo( 3517 DWORD dwOSMajorVersion, 3518 DWORD dwOSMinorVersion, 3519 DWORD dwSpMajorVersion, 3520 DWORD dwSpMinorVersion, 3521 PDWORD pdwReturnedProductType 3522 ); 3523 3524 WINBASEAPI WINBOOL WINAPI GetQueuedCompletionStatusEx( 3525 HANDLE CompletionPort, 3526 LPOVERLAPPED_ENTRY lpCompletionPortEntries, 3527 ULONG ulCount, 3528 PULONG ulNumEntriesRemoved, 3529 DWORD dwMilliseconds, 3530 WINBOOL fAlertable 3531 ); 3532 3533 WINBASEAPI WINBOOL WINAPI GetSystemRegistryQuota( 3534 PDWORD pdwQuotaAllowed, 3535 PDWORD pdwQuotaUsed 3536 ); 3537 3538 WINBASEAPI WINBOOL WINAPI GetSystemTimes( 3539 LPFILETIME lpIdleTime, 3540 LPFILETIME lpKernelTime, 3541 LPFILETIME lpUserTime 3542 ); 3543 3544 WINBASEAPI ULONGLONG WINAPI GetTickCount64(void); 3545 3546 WINBASEAPI WINBOOL WINAPI GetTimeZoneInformationForYear( 3547 USHORT wYear, 3548 PDYNAMIC_TIME_ZONE_INFORMATION pdtzi, 3549 LPTIME_ZONE_INFORMATION ptzi 3550 ); 3551 3552 WINBASEAPI WINBOOL WINAPI GetVolumeInformationByHandleW( 3553 HANDLE hFile, 3554 LPWSTR lpVolumeNameBuffer, 3555 DWORD nVolumeNameSize, 3556 LPDWORD lpVolumeSerialNumber, 3557 LPDWORD lpMaximumComponentLength, 3558 LPDWORD lpFileSystemFlags, 3559 LPWSTR lpFileSystemNameBuffer, 3560 DWORD nFileSystemNameSize 3561 ); 3562 3563 WINBASEAPI WINBOOL WINAPI InitializeCriticalSectionEx( 3564 LPCRITICAL_SECTION lpCriticalSection, 3565 DWORD dwSpinCount, 3566 DWORD Flags 3567 ); 3568 3569 WINBASEAPI VOID WINAPI LeaveCriticalSectionWhenCallbackReturns( 3570 PTP_CALLBACK_INSTANCE pci, 3571 PCRITICAL_SECTION pcs 3572 ); 3573 3574 WINBASEAPI LPVOID WINAPI MapViewOfFileExNuma( 3575 HANDLE hFileMappingObject, 3576 DWORD dwDesiredAccess, 3577 DWORD dwFileOffsetHigh, 3578 DWORD dwFileOffsetLow, 3579 SIZE_T dwNumberOfBytesToMap, 3580 LPVOID lpBaseAddress, 3581 DWORD nndPreferred 3582 ); 3583 3584 #define MoveFileTransacted __MINGW_NAME_AW(MoveFileTransacted) 3585 3586 WINBASEAPI WINBOOL WINAPI MoveFileTransactedA( 3587 LPCSTR lpExistingFileName, 3588 LPCSTR lpNewFileName, 3589 LPPROGRESS_ROUTINE lpProgressRoutine, 3590 LPVOID lpData, 3591 DWORD dwFlags, 3592 HANDLE hTransaction 3593 ); 3594 3595 WINBASEAPI WINBOOL WINAPI MoveFileTransactedW( 3596 LPCWSTR lpExistingFileName, 3597 LPCWSTR lpNewFileName, 3598 LPPROGRESS_ROUTINE lpProgressRoutine, 3599 LPVOID lpData, 3600 DWORD dwFlags, 3601 HANDLE hTransaction 3602 ); 3603 3604 WINBASEAPI HANDLE WINAPI OpenFileById( 3605 HANDLE hFile, 3606 LPFILE_ID_DESCRIPTOR lpFileID, 3607 DWORD dwDesiredAccess, 3608 DWORD dwShareMode, 3609 LPSECURITY_ATTRIBUTES lpSecurityAttributes, 3610 DWORD dwFlags 3611 ); 3612 3613 WINBASEAPI WINBOOL WINAPI QueryActCtxSettingsW( 3614 DWORD dwFlags, 3615 HANDLE hActCtx, 3616 PCWSTR settingsNameSpace, 3617 PCWSTR settingName, 3618 PWSTR pvBuffer, 3619 SIZE_T dwBuffer, 3620 SIZE_T *pdwWrittenOrRequired 3621 ); 3622 3623 WINBASEAPI WINBOOL WINAPI QueryFullProcessImageNameA( 3624 HANDLE hProcess, 3625 DWORD dwFlags, 3626 LPSTR lpExeName, 3627 PDWORD lpdwSize 3628 ); 3629 3630 WINBASEAPI WINBOOL WINAPI QueryFullProcessImageNameW( 3631 HANDLE hProcess, 3632 DWORD dwFlags, 3633 LPWSTR lpExeName, 3634 PDWORD lpdwSize 3635 ); 3636 #define QueryFullProcessImageName __MINGW_NAME_AW(QueryFullProcessImageName) 3637 3638 WINBASEAPI WINBOOL WINAPI QueryProcessAffinityUpdateMode( 3639 HANDLE ProcessHandle, 3640 DWORD lpdwFlags 3641 ); 3642 3643 WINADVAPI VOID WINAPI QuerySecurityAccessMask( 3644 SECURITY_INFORMATION SecurityInformation, 3645 LPDWORD DesiredAccess 3646 ); 3647 3648 WINADVAPI VOID WINAPI ReleaseMutexWhenCallbackReturns( 3649 PTP_CALLBACK_INSTANCE pci, 3650 HANDLE mut 3651 ); 3652 3653 #define RemoveDirectoryTransacted __MINGW_NAME_AW(RemoveDirectoryTransacted) 3654 3655 WINBASEAPI WINBOOL WINAPI RemoveDirectoryTransactedA( 3656 LPCSTR lpPathName, 3657 HANDLE hTransaction 3658 ); 3659 3660 WINBASEAPI WINBOOL WINAPI RemoveDirectoryTransactedW( 3661 LPCWSTR lpPathName, 3662 HANDLE hTransaction 3663 ); 3664 3665 WINBASEAPI HANDLE WINAPI ReOpenFile( 3666 HANDLE hOriginalFile, 3667 DWORD dwDesiredAccess, 3668 DWORD dwShareMode, 3669 DWORD dwFlags 3670 ); 3671 3672 WINBASEAPI WINBOOL WINAPI SetDynamicTimeZoneInformation( 3673 const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation 3674 ); 3675 3676 WINBASEAPI VOID WINAPI SetEventWhenCallbackReturns( 3677 PTP_CALLBACK_INSTANCE pci, 3678 HANDLE evt 3679 ); 3680 3681 WINBASEAPI WINBOOL WINAPI SetFileAttributesTransactedA( 3682 LPCSTR lpFileName, 3683 DWORD dwFileAttributes, 3684 HANDLE hTransaction 3685 ); 3686 3687 WINBASEAPI WINBOOL WINAPI SetFileAttributesTransactedW( 3688 LPCWSTR lpFileName, 3689 DWORD dwFileAttributes, 3690 HANDLE hTransaction 3691 ); 3692 3693 #define SetFileAttributesTransacted __MINGW_NAME_AW(SetFileAttributesTransacted) 3694 3695 WINBASEAPI WINBOOL WINAPI SetFileBandwidthReservation( 3696 HANDLE hFile, 3697 DWORD nPeriodMilliseconds, 3698 DWORD nBytesPerPeriod, 3699 WINBOOL bDiscardable, 3700 LPDWORD lpTransferSize, 3701 LPDWORD lpNumOutstandingRequests 3702 ); 3703 3704 WINBASEAPI WINBOOL WINAPI SetFileCompletionNotificationModes( 3705 HANDLE FileHandle, 3706 UCHAR Flags 3707 ); 3708 3709 WINBASEAPI WINBOOL WINAPI SetFileInformationByHandle( 3710 HANDLE hFile, 3711 FILE_INFO_BY_HANDLE_CLASS FileInformationClass, 3712 LPVOID lpFileInformation, 3713 DWORD dwBufferSize 3714 ); 3715 3716 WINBASEAPI WINBOOL WINAPI SetFileIoOverlappedRange( 3717 HANDLE FileHandle, 3718 PUCHAR OverlappedRangeStart, 3719 ULONG Length 3720 ); 3721 3722 #define PROCESS_AFFINITY_ENABLE_AUTO_UPDATE __MSABI_LONG(0x00000001U) 3723 3724 WINBASEAPI WINBOOL WINAPI SetProcessAffinityUpdateMode( 3725 HANDLE ProcessHandle, 3726 DWORD dwFlags 3727 ); 3728 3729 WINBASEAPI WINBOOL WINAPI SetProcessWorkingSetSizeEx( 3730 HANDLE hProcess, 3731 SIZE_T dwMinimumWorkingSetSize, 3732 SIZE_T dwMaximumWorkingSetSize, 3733 DWORD Flags 3734 ); 3735 3736 WINADVAPI VOID WINAPI SetSecurityAccessMask( 3737 SECURITY_INFORMATION SecurityInformation, 3738 LPDWORD DesiredAccess 3739 ); 3740 3741 typedef struct _STARTUPINFOEXA { 3742 STARTUPINFOA StartupInfo; 3743 PPROC_THREAD_ATTRIBUTE_LIST lpAttributeList; 3744 } STARTUPINFOEXA, *LPSTARTUPINFOEXA; 3745 3746 typedef struct _STARTUPINFOEXAW { 3747 STARTUPINFOW StartupInfo; 3748 PPROC_THREAD_ATTRIBUTE_LIST lpAttributeList; 3749 } STARTUPINFOEXW, *LPSTARTUPINFOEXW; 3750 3751 __MINGW_TYPEDEF_AW(STARTUPINFOEX) 3752 __MINGW_TYPEDEF_AW(LPSTARTUPINFOEX) 3753 3754 WINBASEAPI WINBOOL WINAPI TrySubmitThreadpoolCallback( 3755 PTP_SIMPLE_CALLBACK pfns, 3756 PVOID pv, 3757 PTP_CALLBACK_ENVIRON pcbe 3758 ); 3759 3760 WINBASEAPI HRESULT WINAPI UnregisterApplicationRestart(void); 3761 3762 WINBASEAPI HRESULT WINAPI UnregisterApplicationRecoveryCallback(void); 3763 3764 WINBASEAPI LPVOID WINAPI VirtualAllocExNuma( 3765 HANDLE hProcess, 3766 LPVOID lpAddress, 3767 SIZE_T dwSize, 3768 DWORD flAllocationType, 3769 DWORD flProtect, 3770 DWORD nndPreferred 3771 ); 3772 3773 WINBASEAPI VOID WINAPI WaitForThreadpoolIoCallbacks( 3774 PTP_IO pio, 3775 WINBOOL fCancelPendingCallbacks 3776 ); 3777 3778 WINBASEAPI VOID WINAPI WaitForThreadpoolTimerCallbacks( 3779 PTP_TIMER pti, 3780 WINBOOL fCancelPendingCallbacks 3781 ); 3782 3783 WINBASEAPI VOID WINAPI WaitForThreadpoolWaitCallbacks( 3784 PTP_WAIT pwa, 3785 WINBOOL fCancelPendingCallbacks 3786 ); 3787 3788 WINBASEAPI VOID WINAPI WaitForThreadpoolWorkCallbacks( 3789 PTP_WORK pwk, 3790 WINBOOL fCancelPendingCallbacks 3791 ); 3792 3793 WINBASEAPI WINBOOL WINAPI Wow64GetThreadContext( 3794 HANDLE hThread, 3795 PWOW64_CONTEXT lpContext 3796 ); 3797 3798 WINBASEAPI WINBOOL WINAPI Wow64RevertWow64FsRedirection( 3799 PVOID OldValue 3800 ); 3801 3802 WINBASEAPI WINBOOL WINAPI Wow64SetThreadContext( 3803 HANDLE hThread, 3804 const WOW64_CONTEXT *lpContext 3805 ); 3806 3807 WINBASEAPI DWORD WINAPI Wow64SuspendThread( 3808 HANDLE hThread 3809 ); 3810 3811 #endif /*(_WIN32_WINNT >= 0x0600)*/ 3812 3813 #if (_WIN32_WINNT >= 0x0601) 3814 WINBASEAPI VOID WINAPI GetCurrentProcessorNumberEx( 3815 PPROCESSOR_NUMBER ProcNumber 3816 ); 3817 3818 WINBASEAPI WINBOOL WINAPI GetLogicalProcessorInformationEx( 3819 LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType, 3820 PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX Buffer, 3821 PDWORD ReturnedLength 3822 ); 3823 3824 WINBASEAPI WINBOOL WINAPI GetNumaAvailableMemoryNodeEx( 3825 USHORT Node, 3826 PULONGLONG AvailableBytes 3827 ); 3828 3829 WINBASEAPI WINBOOL WINAPI GetNumaNodeNumberFromHandle( 3830 HANDLE hFile, 3831 PUSHORT NodeNumber 3832 ); 3833 3834 WINBASEAPI WINBOOL WINAPI GetNumaNodeProcessorMaskEx( 3835 USHORT Node, 3836 PGROUP_AFFINITY ProcessorMask 3837 ); 3838 3839 WINBASEAPI WINBOOL WINAPI GetNumaProcessorNodeEx( 3840 PPROCESSOR_NUMBER Processor, 3841 PUSHORT NodeNumber 3842 ); 3843 3844 WINBASEAPI WINBOOL WINAPI GetNumaProximityNodeEx( 3845 ULONG ProximityId, 3846 PUSHORT NodeNumber 3847 ); 3848 3849 WINBASEAPI WINBOOL WINAPI GetProcessGroupAffinity( 3850 HANDLE hProcess, 3851 PUSHORT GroupCount, 3852 PUSHORT GroupArray 3853 ); 3854 3855 WINBASEAPI WINBOOL WINAPI GetProcessorSystemCycleTime( 3856 USHORT Group, 3857 PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION Buffer, 3858 PDWORD ReturnedLength 3859 ); 3860 3861 WINBASEAPI DWORD WINAPI GetThreadErrorMode(void); 3862 3863 WINBASEAPI DWORD WINAPI GetThreadGroupAffinity( 3864 HANDLE hThread, 3865 PGROUP_AFFINITY GroupAffinity 3866 ); 3867 3868 WINBASEAPI WINBOOL WINAPI GetThreadIdealProcessorEx( 3869 HANDLE hThread, 3870 PPROCESSOR_NUMBER lpIdealProcessor 3871 ); 3872 3873 WINBASEAPI HANDLE WINAPI CreateRemoteThreadEx( 3874 HANDLE hProcess, 3875 LPSECURITY_ATTRIBUTES lpThreadAttributes, 3876 SIZE_T dwStackSize, 3877 LPTHREAD_START_ROUTINE lpStartAddress, 3878 LPVOID lpParameter, 3879 DWORD dwCreationFlags, 3880 LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, 3881 LPDWORD lpThreadId 3882 ); 3883 3884 WINBASEAPI WINBOOL WINAPI QueryUnbiasedInterruptTime( 3885 PULONGLONG UnbiasedTime 3886 ); 3887 3888 WINBASEAPI WINBOOL WINAPI AddConditionalAce( 3889 PACL pAcl, 3890 DWORD dwAceRevision, 3891 DWORD AceFlags, 3892 UCHAR AceType, 3893 DWORD AccessMask, 3894 PSID pSid, 3895 PWCHAR ConditionStr, 3896 DWORD *ReturnLength 3897 ); 3898 3899 WINBASEAPI DWORD WINAPI GetActiveProcessorCount( 3900 WORD GroupNumber 3901 ); 3902 3903 WINBASEAPI WORD WINAPI GetActiveProcessorGroupCount(void); 3904 3905 WINBASEAPI VOID WINAPI GetCurrentProcessorNumberEx( 3906 PPROCESSOR_NUMBER ProcNumber 3907 ); 3908 3909 WINBASEAPI DWORD WINAPI GetMaximumProcessorCount( 3910 WORD GroupNumber 3911 ); 3912 3913 WINBASEAPI WORD WINAPI GetMaximumProcessorGroupCount(void); 3914 3915 #ifdef _WIN64 3916 typedef struct _UMS_COMPLETION_LIST *PUMS_COMPLETION_LIST; 3917 typedef struct _UMS_CONTEXT *PUMS_CONTEXT; 3918 3919 typedef enum _UMS_SCHEDULER_REASON { 3920 UmsSchedulerStartup = 0, 3921 UmsSchedulerThreadBlocked = 1, 3922 UmsSchedulerThreadYield = 2 3923 } UMS_SCHEDULER_REASON; 3924 3925 typedef VOID (*PUMS_SCHEDULER_ENTRY_POINT)( 3926 UMS_SCHEDULER_REASON Reason, 3927 ULONG_PTR ActivationPayload, 3928 PVOID SchedulerParam 3929 ); 3930 3931 typedef enum _UMS_THREAD_INFO_CLASS { 3932 UmsThreadInvalidInfoClass = 0, 3933 UmsThreadUserContext = 1, 3934 UmsThreadPriority = 2, 3935 UmsThreadAffinity = 3, 3936 UmsThreadTeb = 4, 3937 UmsThreadIsSuspended = 5, 3938 UmsThreadIsTerminated = 6, 3939 UmsThreadMaxInfoClass = 7 3940 } UMS_THREAD_INFO_CLASS, *PUMS_THREAD_INFO_CLASS; 3941 3942 typedef struct _UMS_SCHEDULER_STARTUP_INFO { 3943 ULONG UmsVersion; 3944 PUMS_COMPLETION_LIST CompletionList; 3945 PUMS_SCHEDULER_ENTRY_POINT SchedulerProc; 3946 PVOID SchedulerParam; 3947 } UMS_SCHEDULER_STARTUP_INFO, *PUMS_SCHEDULER_STARTUP_INFO; 3948 3949 WINBASEAPI WINBOOL CreateUmsCompletionList( 3950 PUMS_COMPLETION_LIST *UmsCompletionList 3951 ); 3952 3953 WINBASEAPI WINBOOL CreateUmsThreadContext( 3954 PUMS_CONTEXT *lpUmsThread 3955 ); 3956 3957 WINBASEAPI WINBOOL EnterUmsSchedulingMode( 3958 PUMS_SCHEDULER_STARTUP_INFO SchedulerStartupInfo 3959 ); 3960 3961 WINBASEAPI WINBOOL DequeueUmsCompletionListItems( 3962 PUMS_COMPLETION_LIST UmsCompletionList, 3963 DWORD WaitTimeOut, 3964 PUMS_CONTEXT *UmsThreadList 3965 ); 3966 3967 WINBASEAPI WINBOOL GetUmsCompletionListEvent( 3968 PUMS_COMPLETION_LIST UmsCompletionList, 3969 PHANDLE UmsCompletionEvent 3970 ); 3971 3972 WINBASEAPI WINBOOL DeleteUmsCompletionList( 3973 PUMS_COMPLETION_LIST UmsCompletionList 3974 ); 3975 3976 WINBASEAPI WINBOOL DeleteUmsThreadContext( 3977 PUMS_CONTEXT UmsThread 3978 ); 3979 3980 WINBASEAPI WINBOOL QueryUmsThreadInformation( 3981 PUMS_CONTEXT UmsThread, 3982 UMS_THREAD_INFO_CLASS UmsThreadInfoClass, 3983 PVOID UmsThreadInformation, 3984 ULONG UmsThreadInformationLength, 3985 PULONG ReturnLength 3986 ); 3987 3988 WINBASEAPI WINBOOL SetUmsThreadInformation( 3989 PUMS_CONTEXT UmsThread, 3990 UMS_THREAD_INFO_CLASS UmsThreadInfoClass, 3991 PVOID UmsThreadInformation, 3992 ULONG UmsThreadInformationLength 3993 ); 3994 3995 WINBASEAPI WINBOOL ExecuteUmsThread( 3996 PUMS_CONTEXT UmsThread 3997 ); 3998 3999 WINBASEAPI WINBOOL UmsThreadYield( 4000 PVOID SchedulerParam 4001 ); 4002 4003 WINBASEAPI PUMS_CONTEXT GetNextUmsListItem( 4004 PUMS_CONTEXT UmsContext 4005 ); 4006 4007 WINBASEAPI PUMS_CONTEXT GetCurrentUmsThread(void); 4008 4009 4010 #endif /* _WIN64 */ 4011 #endif /*(_WIN32_WINNT >= 0x0601)*/ 4012 4013 #if (_WIN32_WINNT >= 0x0602) 4014 typedef struct _CREATEFILE2_EXTENDED_PARAMETERS { 4015 DWORD dwSize; 4016 DWORD dwFileAttributes; 4017 DWORD dwFileFlags; 4018 DWORD dwSecurityQosFlags; 4019 LPSECURITY_ATTRIBUTES lpSecurityAttributes; 4020 HANDLE hTemplateFile; 4021 } CREATEFILE2_EXTENDED_PARAMETERS, *PCREATEFILE2_EXTENDED_PARAMETERS, *LPCREATEFILE2_EXTENDED_PARAMETERS; 4022 4023 WINBASEAPI HANDLE WINAPI CreateFile2(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, DWORD dwCreationDisposition, LPCREATEFILE2_EXTENDED_PARAMETERS pCreateExParams); 4024 4025 HMODULE WINAPI LoadPackagedLibrary(LPCWSTR lpwLibFileName, DWORD Reserved); 4026 4027 WINBASEAPI VOID WINAPI GetSystemTimePreciseAsFileTime(LPFILETIME lpSystemTimeAsFileTime); 4028 4029 #endif /*(_WIN32_WINNT >= 0x0602)*/ 4030 4031 #ifdef __cplusplus 4032 } 4033 #endif 4034 4035 #endif /* _WINBASE_ */ 4036 4037 #if !defined(NOWINBASEINTERLOCK) && !defined(MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED) 4038 #define MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED 4039 4040 #ifdef __cplusplus 4041 4042 extern "C++" { 4043 FORCEINLINE unsigned InterlockedIncrement(unsigned volatile *Addend) { 4044 return (unsigned)InterlockedIncrement((volatile LONG*)Addend); 4045 } 4046 4047 FORCEINLINE unsigned long InterlockedIncrement(unsigned long volatile *Addend) { 4048 return (unsigned long)InterlockedIncrement((volatile LONG*)Addend); 4049 } 4050 4051 FORCEINLINE unsigned __int64 InterlockedIncrement(unsigned __int64 volatile *Addend) { 4052 return (unsigned __int64)InterlockedIncrement64((volatile LONGLONG*)Addend); 4053 } 4054 4055 FORCEINLINE unsigned InterlockedDecrement(unsigned volatile *Addend) { 4056 return (unsigned long)InterlockedDecrement((volatile LONG*)Addend); 4057 } 4058 4059 FORCEINLINE unsigned long InterlockedDecrement(unsigned long volatile *Addend) { 4060 return (unsigned long)InterlockedDecrement((volatile LONG*)Addend); 4061 } 4062 4063 FORCEINLINE unsigned __int64 InterlockedDecrement(unsigned __int64 volatile *Addend) { 4064 return (unsigned __int64)InterlockedDecrement64((volatile LONGLONG*)Addend); 4065 } 4066 4067 FORCEINLINE unsigned InterlockedExchange(unsigned volatile *Target, unsigned Value) { 4068 return (unsigned)InterlockedExchange((volatile LONG*) Target, (LONG)Value); 4069 } 4070 4071 FORCEINLINE unsigned long InterlockedExchange(unsigned long volatile *Target, unsigned long Value) { 4072 return (unsigned long)InterlockedExchange((volatile LONG*)Target, (LONG)Value); 4073 } 4074 4075 FORCEINLINE unsigned __int64 InterlockedExchange(unsigned __int64 volatile *Target, unsigned __int64 Value) { 4076 return (unsigned __int64)InterlockedExchange64((volatile LONGLONG*)Target, (LONGLONG)Value); 4077 } 4078 4079 FORCEINLINE unsigned InterlockedExchangeAdd(unsigned volatile *Addend, unsigned Value) { 4080 return (unsigned)InterlockedExchangeAdd((volatile LONG*)Addend, (LONG)Value); 4081 } 4082 4083 FORCEINLINE unsigned InterlockedExchangeSubtract(unsigned volatile *Addend, unsigned Value) { 4084 return (unsigned)InterlockedExchangeAdd((volatile LONG*)Addend, -(LONG)Value); 4085 } 4086 4087 FORCEINLINE unsigned long InterlockedExchangeAdd(unsigned long volatile *Addend, unsigned long Value) { 4088 return (unsigned long)InterlockedExchangeAdd((volatile LONG*)Addend, (LONG)Value); 4089 } 4090 4091 FORCEINLINE unsigned long InterlockedExchangeSubtract(unsigned long volatile *Addend, unsigned long Value) { 4092 return (unsigned long)InterlockedExchangeAdd((volatile LONG*)Addend, -(LONG)Value); 4093 } 4094 4095 FORCEINLINE unsigned __int64 InterlockedExchangeAdd(unsigned __int64 volatile *Addend, unsigned __int64 Value) { 4096 return (unsigned __int64)InterlockedExchangeAdd64((volatile LONGLONG*)Addend, (LONGLONG)Value); 4097 } 4098 4099 FORCEINLINE unsigned __int64 InterlockedExchangeSubtract(unsigned __int64 volatile *Addend, unsigned __int64 Value) { 4100 return (unsigned __int64)InterlockedExchangeAdd64((volatile LONGLONG*)Addend, -(LONGLONG)Value); 4101 } 4102 4103 FORCEINLINE unsigned InterlockedCompareExchange(unsigned volatile *Destination, unsigned Exchange, unsigned Comperand) { 4104 return (unsigned)InterlockedCompareExchange((volatile LONG*)Destination, (LONG)Exchange, (LONG)Comperand); 4105 } 4106 4107 FORCEINLINE unsigned long InterlockedCompareExchange(unsigned long volatile *Destination, unsigned long Exchange, 4108 unsigned long Comperand) { 4109 return (unsigned long)InterlockedCompareExchange((volatile LONG*)Destination, (LONG)Exchange, (LONG)Comperand); 4110 } 4111 4112 FORCEINLINE unsigned __int64 InterlockedAnd(unsigned __int64 volatile *Destination, unsigned __int64 Value) { 4113 return (unsigned __int64)InterlockedAnd64((volatile LONGLONG*)Destination, (LONGLONG)Value); 4114 } 4115 4116 FORCEINLINE unsigned __int64 InterlockedOr(unsigned __int64 volatile *Destination, unsigned __int64 Value) { 4117 return (unsigned __int64)InterlockedOr64((volatile LONGLONG*)Destination, (LONGLONG)Value); 4118 } 4119 4120 FORCEINLINE unsigned __int64 InterlockedXor(unsigned __int64 volatile *Destination, unsigned __int64 Value) { 4121 return (unsigned __int64)InterlockedXor64((volatile LONGLONG*)Destination, (LONGLONG)Value); 4122 } 4123 4124 FORCEINLINE unsigned __int64 InterlockedCompareExchange(unsigned __int64 volatile *Destination, unsigned __int64 Exchange, 4125 unsigned __int64 Comperand) { 4126 return (unsigned __int64)InterlockedCompareExchange64((volatile LONGLONG*)Destination, (LONGLONG)Exchange, 4127 (LONGLONG)Comperand); 4128 } 4129 } 4130 4131 #endif /* __cplusplus */ 4132 4133 #endif /* !defined(NOWINBASEINTERLOCK) && !defined(MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED) */ 4134