#ifdef _MSC_VER
#pragma once
#endif // _MSC_VER
#ifndef _SYSINFOAPI_H_
#define _SYSINFOAPI_H_
#include <apiset.h>
#include <apisetcconv.h>
#include <minwindef.h>
#include <minwinbase.h>
#if (_MSC_VER >= 800)
#pragma warning(disable:
4514
)
#ifndef __WINDOWS_DONT_DISABLE_PRAGMA_PACK_WARNING__
#pragma warning(disable:
4103
)
#endif
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning(disable:
4001
)
#pragma warning(disable:
4201
)
#pragma warning(disable:
4214
)
#endif
#if defined(FKG_FORCED_USAGE) || defined(WINPHONE) || defined(BUILD_WINDOWS)
# define NOT_BUILD_WINDOWS_DEPRECATE
#else
# define NOT_BUILD_WINDOWS_DEPRECATE __declspec(deprecated)
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
typedef
struct
{
union
{
;
struct
{
;
;
;
lpMinimumApplicationAddress
;
lpMaximumApplicationAddress
;
;
;
;
;
;
;
}
, *
;
#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
typedef
struct
{
;
;
;
;
;
;
;
;
;
}
, *
;
(
_Out_ LPMEMORYSTATUSEX lpBuffer
);
(
_Out_ LPSYSTEM_INFO lpSystemInfo
);
(
_Out_ LPSYSTEMTIME lpSystemTime
);
(
_Out_ LPFILETIME lpSystemTimeAsFileTime
);
(
_Out_ LPSYSTEMTIME lpSystemTime
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
NOT_BUILD_WINDOWS_DEPRECATE
__drv_preferredFunction("IsWindows*", "Deprecated. Use VerifyVersionInfo* or IsWindows* macros from VersionHelpers.")
(
);
(
_In_ CONST SYSTEMTIME* lpSystemTime
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
__drv_preferredFunction("GetTickCount64", "GetTickCount overflows roughly every 49 days. Code that does not take that into account can loop indefinitely. GetTickCount64 operates on 64 bit values and does not have that problem")
(
);
#if (_WIN32_WINNT >= 0x0600)
(
);
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Success_(return != FALSE)
(
_Out_ PDWORD lpTimeAdjustment,
_Out_ PDWORD lpTimeIncrement,
_Out_ PBOOL lpTimeAdjustmentDisabled
);
_Success_(return != FALSE)
GetSystemTimeAdjustmentPrecise
(
_Out_ PDWORD64 lpTimeAdjustment,
_Out_ PDWORD64 lpTimeIncrement,
_Out_ PBOOL lpTimeAdjustmentDisabled
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
_Success_(return != 0 && return < uSize)
(
_Out_writes_to_opt_(uSize,return + 1) LPSTR lpBuffer,
);
_Success_(return != 0 && return < uSize)
(
_Out_writes_to_opt_(uSize,return + 1) LPWSTR lpBuffer,
);
#ifdef UNICODE
#define GetSystemDirectory GetSystemDirectoryW
#else
#define GetSystemDirectory GetSystemDirectoryA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Must_inspect_result_
_Success_(return != 0 && return < uSize)
(
_Out_writes_to_opt_(uSize,return + 1) LPSTR lpBuffer,
);
_Must_inspect_result_
_Success_(return != 0 && return < uSize)
(
_Out_writes_to_opt_(uSize,return + 1) LPWSTR lpBuffer,
);
#ifdef UNICODE
#define GetWindowsDirectory GetWindowsDirectoryW
#else
#define GetWindowsDirectory GetWindowsDirectoryA
#endif // !UNICODE
_Success_(return != 0 && return < uSize)
GetSystemWindowsDirectoryA
(
_Out_writes_to_opt_(uSize,return + 1) LPSTR lpBuffer,
);
_Success_(return != 0 && return < uSize)
GetSystemWindowsDirectoryW
(
_Out_writes_to_opt_(uSize,return + 1) LPWSTR lpBuffer,
);
#ifdef UNICODE
#define GetSystemWindowsDirectory GetSystemWindowsDirectoryW
#else
#define GetSystemWindowsDirectory GetSystemWindowsDirectoryA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
typedef
enum
{
,
,
,
,
,
,
ComputerNamePhysicalDnsDomain
,
,
}
;
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Success_(return != FALSE)
(
_In_ COMPUTER_NAME_FORMAT NameType,
_Out_writes_to_opt_(*nSize,*nSize + 1) LPSTR lpBuffer,
);
_Success_(return != FALSE)
(
_In_ COMPUTER_NAME_FORMAT NameType,
_Out_writes_to_opt_(*nSize,*nSize + 1) LPWSTR lpBuffer,
);
#ifdef UNICODE
#define GetComputerNameEx GetComputerNameExW
#else
#define GetComputerNameEx GetComputerNameExA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_In_ COMPUTER_NAME_FORMAT NameType,
);
#ifdef UNICODE
#define SetComputerNameEx SetComputerNameExW
#endif
(
_In_ CONST SYSTEMTIME* lpSystemTime
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
NOT_BUILD_WINDOWS_DEPRECATE
__drv_preferredFunction("IsWindows*", "Deprecated. Use VerifyVersionInfo* or IsWindows* macros from VersionHelpers.")
(
_Inout_ LPOSVERSIONINFOA lpVersionInformation
);
NOT_BUILD_WINDOWS_DEPRECATE
__drv_preferredFunction("IsWindows*", "Deprecated. Use VerifyVersionInfo* or IsWindows* macros from VersionHelpers.")
(
_Inout_ LPOSVERSIONINFOW lpVersionInformation
);
#ifdef UNICODE
#define GetVersionEx GetVersionExW
#else
#define GetVersionEx GetVersionExA
#endif // !UNICODE
(
_Out_writes_bytes_to_opt_(*ReturnedLength,*ReturnedLength) PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION
,
_Inout_ PDWORD ReturnedLength
);
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
(
_In_ LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType,
LOGICAL_PROCESSOR_RELATIONSHIP
,
_Out_writes_bytes_to_opt_(*ReturnedLength,*ReturnedLength) PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX Buffer,
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
,
_Inout_ PDWORD ReturnedLength
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
(
_Out_ LPSYSTEM_INFO lpSystemInfo
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
GetSystemTimePreciseAsFileTime
(
_Out_ LPFILETIME lpSystemTimeAsFileTime
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
(
_In_ DWORD dwOSMajorVersion,
_In_ DWORD dwOSMinorVersion,
_In_ DWORD dwSpMajorVersion,
_In_ DWORD dwSpMinorVersion,
_Out_ PDWORD pdwReturnedProductType
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if (NTDDI_VERSION >= NTDDI_WIN2K)
(
_In_ ULONGLONG ConditionMask,
);
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
(
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region OneCore Family or App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_APP)
(
_In_ DWORD FirmwareTableProviderSignature,
FirmwareTableProviderSignature
,
_Out_writes_bytes_to_opt_(BufferSize,return) PVOID pFirmwareTableEnumBuffer,
);
(
_In_ DWORD FirmwareTableProviderSignature,
FirmwareTableProviderSignature
,
_In_ DWORD FirmwareTableID,
_Out_writes_bytes_to_opt_(BufferSize,return) PVOID pFirmwareTableBuffer,
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_APP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Success_(return != FALSE)
DnsHostnameToComputerNameExW
(
_Out_writes_to_opt_(*nSize,*nSize + 1) LPWSTR ComputerName,
);
_Success_(return != FALSE)
GetPhysicallyInstalledSystemMemory
(
_Out_ PULONGLONG TotalMemoryInKilobytes
);
#define SCEX2_ALT_NETBIOS_NAME 0x00000001
(
_In_ COMPUTER_NAME_FORMAT NameType,
);
#ifdef UNICODE
#define SetComputerNameEx2 SetComputerNameEx2W
#endif
_Success_(return != FALSE)
(
_In_ DWORD dwTimeAdjustment,
_In_ BOOL bTimeAdjustmentDisabled
);
_Success_(return != FALSE)
SetSystemTimeAdjustmentPrecise
(
_In_ DWORD64 dwTimeAdjustment,
_In_ BOOL bTimeAdjustmentDisabled
);
InstallELAMCertificateInfo
(
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
(
_Out_writes_bytes_to_opt_(*ReturnedLength,*ReturnedLength) PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION Buffer,
PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION
,
_Inout_ PDWORD ReturnedLength
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
(
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region App Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
(
_Out_ double* sizeInInches
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_In_ LPCSTR lpComputerName
);
(
_In_ LPCWSTR lpComputerName
);
#ifdef UNICODE
#define SetComputerName SetComputerNameW
#else
#define SetComputerName SetComputerNameA
#endif // !UNICODE
(
_In_ COMPUTER_NAME_FORMAT NameType,
);
#ifndef UNICODE
#define SetComputerNameEx SetComputerNameExA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#ifdef __cplusplus
}
#endif
#if (_MSC_VER >= 800)
#if _MSC_VER >= 1200
#pragma warning(pop)
#else
#pragma warning(default:4001)
#pragma warning(default:4201)
#pragma warning(default:4214)
/* Leave 4514 disabled. It's an unneeded warning anyway. */
#endif
#endif
#endif // _SYSINFOAPI_H_