File Index Symbol Index

/******************************************************************************** * * * sysinfoapi.h -- ApiSet Contract for api-ms-win-core-sysinfo-l1 * * * * Copyright (c) Microsoft Corporation. All rights reserved. * * * ********************************************************************************/
#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
_SYSTEM_INFO
{
union
{
DWORD
dwOemId
;
// Obsolete field...do not use
struct
{
WORD
wProcessorArchitecture
;
WORD
wReserved
;
DWORD
dwPageSize
;
LPVOID
lpMinimumApplicationAddress
;
LPVOID
lpMaximumApplicationAddress
;
DWORD_PTR
dwActiveProcessorMask
;
DWORD
dwNumberOfProcessors
;
DWORD
dwProcessorType
;
DWORD
dwAllocationGranularity
;
WORD
wProcessorLevel
;
WORD
wProcessorRevision
; }
SYSTEM_INFO
, *
LPSYSTEM_INFO
;
#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
_MEMORYSTATUSEX
{
DWORD
dwLength
;
DWORD
dwMemoryLoad
;
DWORDLONG
ullTotalPhys
;
DWORDLONG
ullAvailPhys
;
DWORDLONG
ullTotalPageFile
;
DWORDLONG
ullAvailPageFile
;
DWORDLONG
ullTotalVirtual
;
DWORDLONG
ullAvailVirtual
;
DWORDLONG
ullAvailExtendedVirtual
; }
MEMORYSTATUSEX
, *
LPMEMORYSTATUSEX
;
BOOL
GlobalMemoryStatusEx
( );
GetSystemInfo
( );
GetSystemTime
( );
GetSystemTimeAsFileTime
( );
GetLocalTime
( );
#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)
__drv_preferredFunction("IsWindows*", "Deprecated. Use VerifyVersionInfo* or IsWindows* macros from VersionHelpers.")
DWORD
GetVersion
( );
BOOL
SetLocalTime
( );
#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")
DWORD
GetTickCount
( );
#if (_WIN32_WINNT >= 0x0600)
ULONGLONG
GetTickCount64
( );
#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)
BOOL
GetSystemTimeAdjustment
( );
_Success_(return != FALSE)
BOOL
GetSystemTimeAdjustmentPrecise
( );
#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)
UINT
GetSystemDirectoryA
( );
_Success_(return != 0 && return < uSize)
UINT
GetSystemDirectoryW
( );
#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)
UINT
GetWindowsDirectoryA
( );
_Must_inspect_result_
_Success_(return != 0 && return < uSize)
UINT
GetWindowsDirectoryW
( );
#ifdef UNICODE
#define GetWindowsDirectory GetWindowsDirectoryW
#else
#define GetWindowsDirectory GetWindowsDirectoryA #endif // !UNICODE
_Success_(return != 0 && return < uSize)
UINT
GetSystemWindowsDirectoryA
( );
_Success_(return != 0 && return < uSize)
UINT
GetSystemWindowsDirectoryW
( );
#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
_COMPUTER_NAME_FORMAT
{
ComputerNameNetBIOS
,
ComputerNameDnsHostname
,
ComputerNameDnsDomain
,
ComputerNameDnsFullyQualified
,
ComputerNamePhysicalNetBIOS
,
ComputerNamePhysicalDnsHostname
,
ComputerNamePhysicalDnsDomain
,
ComputerNamePhysicalDnsFullyQualified
,
ComputerNameMax
}
COMPUTER_NAME_FORMAT
;
#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)
BOOL
GetComputerNameExA
( );
_Success_(return != FALSE)
BOOL
GetComputerNameExW
( );
#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)
BOOL
SetComputerNameExW
( );
#ifdef UNICODE
#define SetComputerNameEx SetComputerNameExW #endif
BOOL
SetSystemTime
( );
#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("IsWindows*", "Deprecated. Use VerifyVersionInfo* or IsWindows* macros from VersionHelpers.")
BOOL
GetVersionExA
( );
__drv_preferredFunction("IsWindows*", "Deprecated. Use VerifyVersionInfo* or IsWindows* macros from VersionHelpers.")
BOOL
GetVersionExW
( );
#ifdef UNICODE
#define GetVersionEx GetVersionExW
#else
#define GetVersionEx GetVersionExA #endif // !UNICODE
BOOL
GetLogicalProcessorInformation
( );
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
BOOL
GetLogicalProcessorInformationEx
( );
#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)
GetNativeSystemInfo
( );
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
GetSystemTimePreciseAsFileTime
( );
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
BOOL
GetProductInfo
( );
#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)
ULONGLONG
VerSetConditionMask
( );
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
BOOL
GetOsSafeBootMode
( );
#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)
UINT
EnumSystemFirmwareTables
( );
UINT
GetSystemFirmwareTable
( );
#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)
BOOL
DnsHostnameToComputerNameExW
( );
_Success_(return != FALSE)
BOOL
GetPhysicallyInstalledSystemMemory
( );
#define SCEX2_ALT_NETBIOS_NAME 0x00000001
BOOL
SetComputerNameEx2W
( );
#ifdef UNICODE
#define SetComputerNameEx2 SetComputerNameEx2W #endif
_Success_(return != FALSE)
BOOL
SetSystemTimeAdjustment
( );
_Success_(return != FALSE)
BOOL
SetSystemTimeAdjustmentPrecise
( );
BOOL
InstallELAMCertificateInfo
( );
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
BOOL
GetProcessorSystemCycleTime
( );
#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)
BOOL
GetOsManufacturingMode
( );
#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)
HRESULT
GetIntegratedDisplaySize
( );
#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)
BOOL
SetComputerNameA
( );
BOOL
SetComputerNameW
( );
#ifdef UNICODE
#define SetComputerName SetComputerNameW
#else
#define SetComputerName SetComputerNameA #endif // !UNICODE
BOOL
SetComputerNameExA
( );
#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_