/mingw-w64-headers/include/sysinfoapi.h

https://gitlab.com/ubuntu-trusty/mingw-w64 · C Header · 117 lines · 102 code · 11 blank · 4 comment · 0 complexity · 6ad16780671deaf1093fae689899ffe7 MD5 · raw file

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