1 /** 2 * This file is part of the mingw-w64 runtime package. 3 * No warranty is given; refer to the file DISCLAIMER within this package. 4 */ 5 #ifndef _SYSINFOAPI_H_ 6 #define _SYSINFOAPI_H_ 7 8 #include <apiset.h> 9 #include <apisetcconv.h> 10 #include <minwindef.h> 11 #include <minwinbase.h> 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 18 typedef struct _SYSTEM_INFO { 19 __C89_NAMELESS union { 20 DWORD dwOemId; 21 __C89_NAMELESS struct { 22 WORD wProcessorArchitecture; 23 WORD wReserved; 24 } DUMMYSTRUCTNAME; 25 } DUMMYUNIONNAME; 26 DWORD dwPageSize; 27 LPVOID lpMinimumApplicationAddress; 28 LPVOID lpMaximumApplicationAddress; 29 DWORD_PTR dwActiveProcessorMask; 30 DWORD dwNumberOfProcessors; 31 DWORD dwProcessorType; 32 DWORD dwAllocationGranularity; 33 WORD wProcessorLevel; 34 WORD wProcessorRevision; 35 } SYSTEM_INFO, *LPSYSTEM_INFO; 36 37 WINBASEAPI VOID WINAPI GetSystemTime (LPSYSTEMTIME lpSystemTime); 38 WINBASEAPI VOID WINAPI GetSystemTimeAsFileTime (LPFILETIME lpSystemTimeAsFileTime); 39 WINBASEAPI VOID WINAPI GetLocalTime (LPSYSTEMTIME lpSystemTime); 40 WINBASEAPI VOID WINAPI GetNativeSystemInfo (LPSYSTEM_INFO lpSystemInfo); 41 #if _WIN32_WINNT >= 0x0600 42 WINBASEAPI ULONGLONG WINAPI GetTickCount64 (VOID); 43 #endif 44 #endif 45 46 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= _WIN32_WINNT_WIN10 47 48 typedef struct _MEMORYSTATUSEX { 49 DWORD dwLength; 50 DWORD dwMemoryLoad; 51 DWORDLONG ullTotalPhys; 52 DWORDLONG ullAvailPhys; 53 DWORDLONG ullTotalPageFile; 54 DWORDLONG ullAvailPageFile; 55 DWORDLONG ullTotalVirtual; 56 DWORDLONG ullAvailVirtual; 57 DWORDLONG ullAvailExtendedVirtual; 58 } MEMORYSTATUSEX,*LPMEMORYSTATUSEX; 59 60 WINBASEAPI VOID WINAPI GetSystemInfo (LPSYSTEM_INFO lpSystemInfo); 61 WINBASEAPI WINBOOL WINAPI GlobalMemoryStatusEx (LPMEMORYSTATUSEX lpBuffer); 62 WINBASEAPI DWORD WINAPI GetTickCount (VOID); 63 WINBASEAPI VOID WINAPI GetSystemTimePreciseAsFileTime (LPFILETIME lpSystemTimeAsFileTime); 64 WINBASEAPI WINBOOL WINAPI GetVersionExA (LPOSVERSIONINFOA lpVersionInformation); 65 WINBASEAPI WINBOOL WINAPI GetVersionExW (LPOSVERSIONINFOW lpVersionInformation); 66 67 #endif 68 69 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 70 typedef enum _COMPUTER_NAME_FORMAT { 71 ComputerNameNetBIOS, 72 ComputerNameDnsHostname, 73 ComputerNameDnsDomain, 74 ComputerNameDnsFullyQualified, 75 ComputerNamePhysicalNetBIOS, 76 ComputerNamePhysicalDnsHostname, 77 ComputerNamePhysicalDnsDomain, 78 ComputerNamePhysicalDnsFullyQualified, 79 ComputerNameMax 80 } COMPUTER_NAME_FORMAT; 81 82 WINBASEAPI DWORD WINAPI GetVersion (VOID); 83 84 WINBASEAPI WINBOOL WINAPI SetLocalTime (CONST SYSTEMTIME *lpSystemTime); 85 WINBASEAPI WINBOOL WINAPI GetSystemTimeAdjustment (PDWORD lpTimeAdjustment, PDWORD lpTimeIncrement, PBOOL lpTimeAdjustmentDisabled); 86 WINBASEAPI UINT WINAPI GetSystemDirectoryA (LPSTR lpBuffer, UINT uSize); 87 WINBASEAPI UINT WINAPI GetSystemDirectoryW (LPWSTR lpBuffer, UINT uSize); 88 WINBASEAPI UINT WINAPI GetWindowsDirectoryA (LPSTR lpBuffer, UINT uSize); 89 WINBASEAPI UINT WINAPI GetWindowsDirectoryW (LPWSTR lpBuffer, UINT uSize); 90 WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryA (LPSTR lpBuffer, UINT uSize); 91 WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryW (LPWSTR lpBuffer, UINT uSize); 92 WINBASEAPI WINBOOL WINAPI GetComputerNameExA (COMPUTER_NAME_FORMAT NameType, LPSTR lpBuffer, LPDWORD nSize); 93 WINBASEAPI WINBOOL WINAPI GetComputerNameExW (COMPUTER_NAME_FORMAT NameType, LPWSTR lpBuffer, LPDWORD nSize); 94 WINBASEAPI WINBOOL WINAPI SetComputerNameExW (COMPUTER_NAME_FORMAT NameType, LPCWSTR lpBuffer); 95 WINBASEAPI WINBOOL WINAPI SetSystemTime (CONST SYSTEMTIME *lpSystemTime); 96 WINBASEAPI WINBOOL WINAPI GetLogicalProcessorInformation (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer, PDWORD ReturnedLength); 97 NTSYSAPI ULONGLONG NTAPI VerSetConditionMask (ULONGLONG ConditionMask, ULONG TypeMask, UCHAR Condition); 98 WINBASEAPI UINT WINAPI EnumSystemFirmwareTables (DWORD FirmwareTableProviderSignature, PVOID pFirmwareTableEnumBuffer, DWORD BufferSize); 99 WINBASEAPI UINT WINAPI GetSystemFirmwareTable (DWORD FirmwareTableProviderSignature, DWORD FirmwareTableID, PVOID pFirmwareTableBuffer, DWORD BufferSize); 100 #if _WIN32_WINNT >= 0x0600 101 WINBASEAPI WINBOOL WINAPI GetProductInfo (DWORD dwOSMajorVersion, DWORD dwOSMinorVersion, DWORD dwSpMajorVersion, DWORD dwSpMinorVersion, PDWORD pdwReturnedProductType); 102 #endif 103 #if _WIN32_WINNT >= 0x0601 104 WINBASEAPI WINBOOL WINAPI GetLogicalProcessorInformationEx (LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX Buffer, PDWORD ReturnedLength); 105 WINBASEAPI WINBOOL WINAPI GetOsSafeBootMode (PDWORD Flags); 106 #endif 107 108 #define GetSystemDirectory __MINGW_NAME_AW(GetSystemDirectory) 109 #define GetWindowsDirectory __MINGW_NAME_AW(GetWindowsDirectory) 110 #define GetSystemWindowsDirectory __MINGW_NAME_AW(GetSystemWindowsDirectory) 111 #define GetComputerNameEx __MINGW_NAME_AW(GetComputerNameEx) 112 #define GetVersionEx __MINGW_NAME_AW(GetVersionEx) 113 114 #ifdef UNICODE 115 #define SetComputerNameEx SetComputerNameExW 116 #endif 117 #elif defined(WINSTORECOMPAT) 118 WINBASEAPI DWORD WINAPI GetTickCount (VOID); 119 #endif 120 121 #ifdef __cplusplus 122 } 123 #endif 124 #endif 125