13 #if defined(WIN32) && !defined(_USE_MSI_COM) 19 #include "ProtectedSource/UndefineWin32APIAliases.h" 32 #include "../../../../3rdParty/BaseTsd.h" 35 #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100 36 #define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200 37 #define FORMAT_MESSAGE_FROM_STRING 0x00000400 38 #define FORMAT_MESSAGE_FROM_HMODULE 0x00000800 39 #define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000 40 #define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000 41 #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF 43 #define WAIT_TIMEOUT STATUS_TIMEOUT 44 #define WAIT_IO_COMPLETION STATUS_USER_APC 45 #define STILL_ACTIVE STATUS_PENDING 46 #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION 47 #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT 48 #define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT 49 #define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP 50 #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED 51 #define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND 52 #define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO 53 #define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT 54 #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION 55 #define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW 56 #define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK 57 #define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW 58 #define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO 59 #define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW 60 #define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION 61 #define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR 62 #define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION 63 #define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION 64 #define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW 65 #define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION 66 #define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION 67 #define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE 68 #define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT 70 #define FILE_MAP_COPY SECTION_QUERY 71 #define FILE_MAP_WRITE SECTION_MAP_WRITE 72 #define FILE_MAP_READ SECTION_MAP_READ 73 #define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS 74 #define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT // not included in FILE_MAP_ALL_ACCESS 80 #define IGNORE 0 // Ignore signal 81 #define INFINITE 0xFFFFFFFF // Infinite timeout 86 #define FILE_FLAG_WRITE_THROUGH 0x80000000 87 #define FILE_FLAG_OVERLAPPED 0x40000000 88 #define FILE_FLAG_NO_BUFFERING 0x20000000 89 #define FILE_FLAG_RANDOM_ACCESS 0x10000000 90 #define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000 91 #define FILE_FLAG_DELETE_ON_CLOSE 0x04000000 92 #define FILE_FLAG_BACKUP_SEMANTICS 0x02000000 93 #define FILE_FLAG_POSIX_SEMANTICS 0x01000000 94 #define FILE_FLAG_OPEN_REPARSE_POINT 0x00200000 95 #define FILE_FLAG_OPEN_NO_RECALL 0x00100000 96 #define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000 100 #define CREATE_ALWAYS 2 101 #define OPEN_EXISTING 3 102 #define OPEN_ALWAYS 4 103 #define TRUNCATE_EXISTING 5 105 typedef struct _WIN32_FIND_DATAA {
106 DWORD dwFileAttributes;
115 CHAR cAlternateFileName[ 14 ];
121 } WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
123 typedef struct _WIN32_FIND_DATAW {
124 DWORD dwFileAttributes;
133 WCHAR cAlternateFileName[ 14 ];
134 } WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
136 typedef LPWIN32_FIND_DATAW LPWIN32_FIND_DATA;
137 typedef WIN32_FIND_DATAW WIN32_FIND_DATA;
139 typedef struct _MEMORYSTATUSEX {
149 } MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
150 #define STD_INPUT_HANDLE (DWORD)-10 151 #define STD_OUTPUT_HANDLE (DWORD)-11 152 #define STD_ERROR_HANDLE (DWORD)-12 154 #define OPEN_EXISTING 3 157 #define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1) 159 #define INVALID_HANDLE_VALUE (HANDLE)-1 163 #define WINAPI __stdcall 173 extern "C" UINT WINAPI GetSystemWindowsDirectoryW(
220 #define InterlockedExchange _InterlockedExchange 222 LONG volatile * Target,
237 DWORD dwDesiredAccess,
240 DWORD dwCreationDisposition,
241 DWORD dwFlagsAndAttributes,
272 DWORD dwDesiredAccess,
298 GetTokenInformation (
300 TOKEN_INFORMATION_CLASS TokenInformationClass,
302 DWORD TokenInformationLength,
309 GetProcessAffinityMask(
311 __out PDWORD_PTR lpProcessAffinityMask,
312 __out PDWORD_PTR lpSystemAffinityMask
318 SetProcessAffinityMask(
327 QueryPerformanceFrequency(
334 QueryPerformanceCounter(
343 __inout LPOSVERSIONINFOA lpVersionInformation
351 __inout LPOSVERSIONINFOW lpVersionInformation
354 #define GetVersionEx GetVersionExW 356 #define GetVersionEx GetVersionExA 375 __out LPMEMORYSTATUS lpBuffer
386 #define GetModuleHandle GetModuleHandleW 388 #define GetModuleHandle GetModuleHandleA 391 typedef struct _STARTUPINFOA {
402 DWORD dwFillAttribute;
410 } STARTUPINFOA, *LPSTARTUPINFOA;
411 typedef struct _STARTUPINFOW {
422 DWORD dwFillAttribute;
430 } STARTUPINFOW, *LPSTARTUPINFOW;
432 typedef STARTUPINFOW STARTUPINFO;
433 typedef LPSTARTUPINFOW LPSTARTUPINFO;
435 typedef STARTUPINFOA STARTUPINFO;
436 typedef LPSTARTUPINFOA LPSTARTUPINFO;
440 typedef struct _PROCESS_INFORMATION {
445 } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
452 __in_opt
LPCSTR lpApplicationName,
453 __inout_opt
LPSTR lpCommandLine,
456 __in
BOOL bInheritHandles,
457 __in
DWORD dwCreationFlags,
458 __in_opt
LPVOID lpEnvironment,
459 __in_opt
LPCSTR lpCurrentDirectory,
460 __in LPSTARTUPINFOA lpStartupInfo,
461 __out LPPROCESS_INFORMATION lpProcessInformation
467 __in_opt
LPCWSTR lpApplicationName,
468 __inout_opt
LPWSTR lpCommandLine,
471 __in
BOOL bInheritHandles,
472 __in
DWORD dwCreationFlags,
473 __in_opt
LPVOID lpEnvironment,
474 __in_opt
LPCWSTR lpCurrentDirectory,
475 __in LPSTARTUPINFOW lpStartupInfo,
476 __out LPPROCESS_INFORMATION lpProcessInformation
479 #define CreateProcess CreateProcessW 481 #define CreateProcess CreateProcessA 506 typedef struct _OVERLAPPED {
508 ULONG_PTR InternalHigh;
519 } OVERLAPPED, *LPOVERLAPPED;
541 __in_bcount(nNumberOfBytesToWrite)
LPCVOID lpBuffer,
542 __in
DWORD nNumberOfBytesToWrite,
543 __out_opt
LPDWORD lpNumberOfBytesWritten,
544 __inout_opt LPOVERLAPPED lpOverlapped
552 __out_bcount_part(nNumberOfBytesToRead, *lpNumberOfBytesRead)
LPVOID lpBuffer,
553 __in
DWORD nNumberOfBytesToRead,
554 __out_opt
LPDWORD lpNumberOfBytesRead,
555 __inout_opt LPOVERLAPPED lpOverlapped
573 #define lstrlen lstrlenW 575 #define lstrlen lstrlenA 583 __out_ecount(iMaxLength)
LPSTR lpString1,
594 __out_ecount(iMaxLength)
LPWSTR lpString1,
599 #define lstrcpyn lstrcpynW 601 #define lstrcpyn lstrcpynA 611 __out
LPSTR lpString1,
625 #define lstrcpy lstrcpyW 627 #define lstrcpy lstrcpyA 647 #define lstrcmpi lstrcmpiW 649 #define lstrcmpi lstrcmpiA 653 #if !defined(WINAPIV) 654 #if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) 655 #define WINAPIV __cdecl 667 __in __format_string
LPCSTR,
679 #define wsprintf wsprintfW 681 #define wsprintf wsprintfA 686 #if !defined(MIDL_PASS) 713 #define FormatMessage FormatMessageW 715 #define FormatMessage FormatMessageA 733 return FormatMessageW(
735 return FormatMessageA(
773 __in_opt
LPVOID lpAddress,
775 __in
DWORD flAllocationType,
784 __out_bcount_part(dwLength,
return) PMEMORY_BASIC_INFORMATION lpBuffer,
791 GetProcessWorkingSetSize(
793 __out PSIZE_T lpMinimumWorkingSetSize,
794 __out PSIZE_T lpMaximumWorkingSetSize
801 __in
DWORD NumberOfHeaps,
802 __out_ecount_part(NumberOfHeaps,
return)
PHANDLE ProcessHeaps
810 __in
DWORD nStdHandle
817 __in
DWORD nStdHandle,
833 #define GMEM_FIXED 0x0000 834 #define GMEM_MOVEABLE 0x0002 835 #define GMEM_NOCOMPACT 0x0010 836 #define GMEM_NODISCARD 0x0020 837 #define GMEM_ZEROINIT 0x0040 838 #define GMEM_MODIFY 0x0080 839 #define GMEM_DISCARDABLE 0x0100 840 #define GMEM_NOT_BANKED 0x1000 841 #define GMEM_SHARE 0x2000 842 #define GMEM_DDESHARE 0x2000 843 #define GMEM_NOTIFY 0x4000 844 #define GMEM_LOWER GMEM_NOT_BANKED 845 #define GMEM_VALID_FLAGS 0x7F72 846 #define GMEM_INVALID_HANDLE 0x8000 848 #define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT) 849 #define GPTR (GMEM_FIXED | GMEM_ZEROINIT) 873 __out_ecount_part(nSize,
return + 1)
char* lpFilename,
882 __out_ecount_part(nSize,
return + 1)
wchar_t* lpFilename,
886 #define GetModuleFileName GetModuleFileNameW 888 #define GetModuleFileName GetModuleFileNameA 928 #define LoadLibrary LoadLibraryW 930 #define LoadLibrary LoadLibraryA 944 __in
BOOL bInitialOwner,
953 __in
BOOL bInitialOwner,
957 #define CreateMutex CreateMutexW 959 #define CreateMutex CreateMutexA 981 __in
DWORD dwMilliseconds
991 __in
DWORD flProtect,
992 __in
DWORD dwMaximumSizeHigh,
993 __in
DWORD dwMaximumSizeLow,
1003 __in
DWORD flProtect,
1004 __in
DWORD dwMaximumSizeHigh,
1005 __in
DWORD dwMaximumSizeLow,
1009 #define CreateFileMapping CreateFileMappingW 1011 #define CreateFileMapping CreateFileMappingA 1020 __in
DWORD dwDesiredAccess,
1021 __in
BOOL bInheritHandle,
1030 __in
DWORD dwDesiredAccess,
1031 __in
BOOL bInheritHandle,
1035 #define OpenFileMapping OpenFileMappingW 1037 #define OpenFileMapping OpenFileMappingA 1046 __in
HANDLE hFileMappingObject,
1047 __in
DWORD dwDesiredAccess,
1048 __in
DWORD dwFileOffsetHigh,
1049 __in
DWORD dwFileOffsetLow,
1050 __in
SIZE_T dwNumberOfBytesToMap
1064 WaitForMultipleObjects(
1068 __in
DWORD dwMilliseconds
1074 LocalFileTimeToFileTime(
1082 SystemTimeToFileTime(
1083 __in
CONST SYSTEMTIME *lpSystemTime,
1087 #define WAIT_FAILED ((DWORD)0xFFFFFFFF) 1088 #define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 ) 1093 WritePrivateProfileStringA(
1094 __in_opt
LPCSTR lpAppName,
1095 __in_opt
LPCSTR lpKeyName,
1096 __in_opt
LPCSTR lpString,
1097 __in_opt
LPCSTR lpFileName
1103 WritePrivateProfileStringW(
1110 #define WritePrivateProfileString WritePrivateProfileStringW 1112 #define WritePrivateProfileString WritePrivateProfileStringA 1119 GetPrivateProfileIntA(
1123 __in_opt
LPCSTR lpFileName
1128 GetPrivateProfileIntW(
1135 #define GetPrivateProfileInt GetPrivateProfileIntW 1137 #define GetPrivateProfileInt GetPrivateProfileIntA 1143 GetPrivateProfileStringA(
1144 __in_opt
LPCSTR lpAppName,
1145 __in_opt
LPCSTR lpKeyName,
1146 __in_opt
LPCSTR lpDefault,
1147 __out_ecount_part_opt(nSize,
return + 1)
LPSTR lpReturnedString,
1149 __in_opt
LPCSTR lpFileName
1154 GetPrivateProfileStringW(
1158 __out_ecount_part_opt(nSize,
return + 1)
LPWSTR lpReturnedString,
1163 #define GetPrivateProfileString GetPrivateProfileStringW 1165 #define GetPrivateProfileString GetPrivateProfileStringA 1171 LookupPrivilegeValueA(
1172 __in_opt
LPCSTR lpSystemName,
1179 LookupPrivilegeValueW(
1180 __in_opt
LPCWSTR lpSystemName,
1185 #define LookupPrivilegeValue LookupPrivilegeValueW 1187 #define LookupPrivilegeValue LookupPrivilegeValueA 1194 AdjustTokenPrivileges (
1196 __in
BOOL DisableAllPrivileges,
1197 __in_opt PTOKEN_PRIVILEGES NewState,
1198 __in
DWORD BufferLength,
1199 __out_bcount_part_opt(BufferLength, *ReturnLength) PTOKEN_PRIVILEGES PreviousState,
1200 __out_opt PDWORD ReturnLength
1206 InitializeCriticalSection(
1207 __out CRITICAL_SECTION* lpCriticalSection
1213 EnterCriticalSection(
1214 __inout CRITICAL_SECTION* lpCriticalSection
1220 LeaveCriticalSection(
1221 __inout CRITICAL_SECTION* lpCriticalSection
1224 #if (_WIN32_WINNT >= 0x0403) 1228 InitializeCriticalSectionAndSpinCount(
1229 __out CRITICAL_SECTION* lpCriticalSection,
1230 __in
DWORD dwSpinCount
1236 SetCriticalSectionSpinCount(
1237 __inout CRITICAL_SECTION* lpCriticalSection,
1238 __in
DWORD dwSpinCount
1242 #if(_WIN32_WINNT >= 0x0400) 1246 TryEnterCriticalSection(
1247 __inout CRITICAL_SECTION* lpCriticalSection
1254 DeleteCriticalSection(
1255 __inout CRITICAL_SECTION* lpCriticalSection
1263 #endif // WIN32 && !_USE_MSI_COM 1268 #endif // PDCwinbase_h wchar_t WCHAR
Definition: PDCwchar.h:23
PVOID PSID
Definition: PDCwtypes.h:200
DLL_BASE_EXIM void Sleep(unsigned long inMilliseconds)
char CHAR
Definition: PDCwtypes.h:338
signed char BOOL
Definition: PDCwtypes.h:101
MIDL_uhyper DWORDLONG
Definition: PDCwtypes.h:198
DWORD dwLowDateTime
Definition: PDCwtypes.h:251
struct _FILETIME * LPFILETIME
int INT
Definition: PDCwtypes.h:96
struct _FILETIME FILETIME
HINSTANCE HMODULE
Definition: PDCwtypes.h:311
CHAR __RPC_FAR * LPSTR
Definition: PDCwtypes.h:365
#define WINAPI
Definition: PDCwindows.h:52
unsigned long SIZE_T
Definition: Msi_objidl.h:17
unsigned long DWORD_PTR
Definition: Msi_atlbase.h:34
void * LPVOID
Definition: PDCwtypes.h:136
unsigned int UINT
Definition: PDCwtypes.h:110
struct _FILETIME * PFILETIME
BYTE far * LPBYTE
Definition: PDCwtypes.h:143
Definition: PDCwtypes.h:249
void * HANDLE
Definition: PDCwtypes.h:306
const CHAR __RPC_FAR * LPCSTR
Definition: PDCwtypes.h:367
void VOID
Definition: PDCwtypes.h:157
const WCHAR __RPC_FAR * LPCWSTR
Definition: PDCwtypes.h:369
const TCHAR __RPC_FAR * LPCTSTR
Definition: PDCwtypes.h:375
CONST void * LPCVOID
Definition: PDCwtypes.h:409
#define CONST
Definition: PDCwtypes.h:408
WCHAR * LPWSTR
Definition: PDCwtypes.h:353
long LONG
Definition: PDCwtypes.h:119
void __RPC_FAR * PVOID
Definition: PDCwtypes.h:149
void __RPC_FAR * HGLOBAL
Definition: PDCwtypes.h:403
unsigned short WORD
Definition: PDCwtypes.h:109
ULONG cb
Definition: Msi_objbase.h:25
TCHAR __RPC_FAR * LPTSTR
Definition: PDCwtypes.h:371
DWORD __RPC_FAR * LPDWORD
Definition: PDCwtypes.h:125
Definition: PDCwtypes.h:202
struct _SECURITY_ATTRIBUTES __RPC_FAR * LPSECURITY_ATTRIBUTES
Definition: PDCwtypes.h:501
#define MAX_PATH
Definition: PDCwinbase.h:77
DWORD dwHighDateTime
Definition: PDCwtypes.h:252
#define FAR
Definition: PDCwtypes.h:68
unsigned long DWORD
Definition: PDCwtypes.h:121
HANDLE * PHANDLE
Definition: PDCwtypes.h:308
DLL_BASE_EXIM ErrorCode GetLastError()