Data Structures | Defines | Enumerations | Functions

Windows Management Instrumentation (WMI) APIs

Data Structures

struct  BIOSINFO
struct  VIRTUALMEMORYINFO
struct  OPTICALDRIVEINFO
struct  PHYSDISKINFO
struct  PHYSDISKINFOSUMMARY
struct  PHYSICALDRIVEINFO
struct  DISKVOLUMEINFO
struct  RAMINFO_WMI
struct  COMPUTERMODELINFO
struct  BASEBOARDINFO
struct  SERIALPORTINFO
struct  PARALLELPORTINFO
struct  NETWORKADAPTERINFO
struct  PORTCONNECTORINFO
struct  DISKPARTITIONINFO
struct  SYSINFO_WMI

Defines

#define WMISI_VSHORTSTRING   25
#define WMISI_SHORTSTRING   50
#define WMISI_INFO_VSHORTSTRING   100
#define WMISI_INFO_SHORTSTRING   200
#define MAXBIOSMODULES   1
#define MAXBIOSCHARACTERISTICS   100
#define MAXPROCSOCKETS   8
 Max processor sockets.
#define MAXNUMCDDVD   20
 Max number of CD/DVD drives.
#define WMISI_MAXPAGEFILES   2
 Max number of page files.
#define MAX_FILENAME   512
#define SYSINFO_MAXNUMDISKS   200
 Max number of disks that can be tested at the same time.
#define MAXLOGICALDISKS   26
#define MAXRAMMODULES   64
#define MAXCOMPUTERSYSTEMS   1
#define MAXBASEBOARDS   1
#define MAXSERIALPORTS   64
#define MAXSPARALLELPORTS   10
#define MAXNETWORKADAPTERS   20
#define MAXPORTCONNECTORS   50
#define MAXSYSTEMSLOTS   20
#define Win32_PortConnector_PortType_PS2   2
 PortType.
#define Win32_PortConnector_PortType_Keyboard   13
#define Win32_PortConnector_PortType_Mouse   14
#define Win32_PortConnector_PortType_USB   16
#define Win32_PortConnector_PortType_Firewire   17
#define Win32_PortConnector_PortType_Audio   29
#define Win32_PortConnector_PortType_NUM   33

Enumerations

enum  RAMTYPE {
  RAMTYPE_UNDEFINED = 0, RAMTYPE_OTHER, RAMTYPE_UNKNOWN, RAMTYPE_DRAM,
  RAMTYPE_EDRAM, RAMTYPE_VRAM, RAMTYPE_SRAM, RAMTYPE_RAM,
  RAMTYPE_ROM, RAMTYPE_FLASH, RAMTYPE_EEPROM, RAMTYPE_FEPROM,
  RAMTYPE_EPROM, RAMTYPE_CDRAM, RAMTYPE_3DRAM, RAMTYPE_SDRAM,
  RAMTYPE_SGRAM, RAMTYPE_RDRAM, RAMTYPE_DDR, RAMTYPE_DDR2,
  RAMTYPE_DDR2_FB_DIMM, RAMTYPE_DDR3 = 0x18, RAMTYPE_FBD2, RAMTYPE_DDR4,
  RAMTYPE_LPDDR, RAMTYPE_LPDDR2, RAMTYPE_LPDDR3, RAMTYPE_LPDDR4,
  RAMTYPE_LNVD, RAMTYPE_HBM, RAMTYPE_HBM2, RAMTYPE_DDR5,
  RAMTYPE_LPDDR5, RAMTYPE_HBM3, RAMTYPE_TERMINATOR
}

Functions

SYSINFO_API BOOL SysInfoDll_GetSystemInfo_WMI (SYSINFO_WMI *SysInfo)
 Call this function to return system information via WMI (Windows Management Information).
SYSINFO_API BOOL SysInfoDll_GetSystemInfo_WMI_async (SYSINFO_WMI *SysInfo_WMI)
 Call this function to return system information via WMI (Windows Management Information).
SYSINFO_API BOOL SysInfoDll_GetSystemInfo_WMI_async_complete (SYSINFO_WMI *SysInfo, int *iProgressPercent)
 Call this function to check whether the system information from a previous call to SysInfoDll_GetSystemInfo_WMI_async is available.
int SysInfoDll_GetHDDetails (PHYSICALDRIVEINFO *PhyscialDriveInfo)
 Call this function to return system physcial disk information via WMI (Windows Management Information). This is a subset of the SysInfoDll_GetSystemInfo_WMI API. The call is synchronous.
int SysInfoDll_GetBaseBoardDetails (BASEBOARDINFO *BaseBoardInfo)
 Call this function to return system baseboard via WMI (Windows Management Information). This is a subset of the SysInfoDll_GetSystemInfo_WMI API. The call is synchronous.
SYSINFO_API wchar_t * SysInfoDll_GetHDDSummaryLine (SYSINFO_WMI *SysInfo_WMI, wchar_t *line, int iLen)
 Call this function to get the physical disk system information. This is a subset of the SysInfoDll_GetSystemInfo_WMI() API.

Define Documentation

#define WMISI_VSHORTSTRING   25
#define WMISI_SHORTSTRING   50
#define WMISI_INFO_VSHORTSTRING   100
#define WMISI_INFO_SHORTSTRING   200
#define MAXBIOSMODULES   1
#define MAXBIOSCHARACTERISTICS   100
#define MAXPROCSOCKETS   8

Max processor sockets.

#define MAXNUMCDDVD   20

Max number of CD/DVD drives.

#define WMISI_MAXPAGEFILES   2

Max number of page files.

#define MAX_FILENAME   512
#define SYSINFO_MAXNUMDISKS   200

Max number of disks that can be tested at the same time.

#define MAXLOGICALDISKS   26
#define MAXRAMMODULES   64
#define MAXCOMPUTERSYSTEMS   1
#define MAXBASEBOARDS   1
#define MAXSERIALPORTS   64
#define MAXSPARALLELPORTS   10
#define MAXNETWORKADAPTERS   20
#define MAXPORTCONNECTORS   50
#define MAXSYSTEMSLOTS   20
#define Win32_PortConnector_PortType_PS2   2

PortType.

#define Win32_PortConnector_PortType_Keyboard   13
#define Win32_PortConnector_PortType_Mouse   14
#define Win32_PortConnector_PortType_USB   16
#define Win32_PortConnector_PortType_Firewire   17
#define Win32_PortConnector_PortType_Audio   29
#define Win32_PortConnector_PortType_NUM   33

Enumeration Type Documentation

enum RAMTYPE
Enumerator:
RAMTYPE_UNDEFINED 
RAMTYPE_OTHER 
RAMTYPE_UNKNOWN 
RAMTYPE_DRAM 
RAMTYPE_EDRAM 
RAMTYPE_VRAM 
RAMTYPE_SRAM 
RAMTYPE_RAM 
RAMTYPE_ROM 
RAMTYPE_FLASH 
RAMTYPE_EEPROM 
RAMTYPE_FEPROM 
RAMTYPE_EPROM 
RAMTYPE_CDRAM 
RAMTYPE_3DRAM 
RAMTYPE_SDRAM 
RAMTYPE_SGRAM 
RAMTYPE_RDRAM 
RAMTYPE_DDR 
RAMTYPE_DDR2 
RAMTYPE_DDR2_FB_DIMM 
RAMTYPE_DDR3 
RAMTYPE_FBD2 
RAMTYPE_DDR4 
RAMTYPE_LPDDR 
RAMTYPE_LPDDR2 
RAMTYPE_LPDDR3 
RAMTYPE_LPDDR4 
RAMTYPE_LNVD 
RAMTYPE_HBM 
RAMTYPE_HBM2 
RAMTYPE_DDR5 
RAMTYPE_LPDDR5 
RAMTYPE_HBM3 
RAMTYPE_TERMINATOR 

Function Documentation

SYSINFO_API BOOL SysInfoDll_GetSystemInfo_WMI ( SYSINFO_WMI SysInfo  ) 

Call this function to return system information via WMI (Windows Management Information).

The call is synchronous and can take some time to return.

Note:
This will initialize the COM object library for the current thread. As such, if you have already initialized COM, this will fail. Either run in a thread, use the SysInfoDll_GetSystemInfo_WMI_async version, or close the currently open COM library.
Parameters:
[out] SysInfo Pointer to a structure to store the system information
Returns:
TRUE if successful, otherwise FALSE
SYSINFO_API BOOL SysInfoDll_GetSystemInfo_WMI_async ( SYSINFO_WMI SysInfo_WMI  ) 

Call this function to return system information via WMI (Windows Management Information).

The call is asynchronous as it can take some time to return.

Remarks:
After calling this function, you will need to call SysInfoDll_GetSystemInfo_WMI_async_complete to check that the system information is available. If it is complete, then the information will be returned with the call to SysInfoDll_GetSystemInfo_WMI_async_complete.
Parameters:
[out] SysInfo_WMI Pointer to a structure to store the system information
Returns:
TRUE if successful, otherwise FALSE
SYSINFO_API BOOL SysInfoDll_GetSystemInfo_WMI_async_complete ( SYSINFO_WMI SysInfo,
int *  iProgressPercent 
)

Call this function to check whether the system information from a previous call to SysInfoDll_GetSystemInfo_WMI_async is available.

If it is complete, then the information will be returned with this call.

Parameters:
[out] SysInfo Pointer to a structure to store the system information
[out] iProgressPercent Pointer to an integer to store the current percent progress
Returns:
TRUE if the system information is successfully retrieved, otherwise FALSE
int SysInfoDll_GetHDDetails ( PHYSICALDRIVEINFO PhyscialDriveInfo  ) 

Call this function to return system physcial disk information via WMI (Windows Management Information). This is a subset of the SysInfoDll_GetSystemInfo_WMI API. The call is synchronous.

Note:
This will initialize the COM object library for the current thread. As such, if you have already initialized COM, this will fail. Either run in a thread, or close the currently open COM library.
Parameters:
[out] PhyscialDriveInfo Pointer to a structure to store the physcial disk information
Returns:
TRUE if successful, otherwise FALSE
int SysInfoDll_GetBaseBoardDetails ( BASEBOARDINFO BaseBoardInfo  ) 

Call this function to return system baseboard via WMI (Windows Management Information). This is a subset of the SysInfoDll_GetSystemInfo_WMI API. The call is synchronous.

Note:
This will initialize the COM object library for the current thread. As such, if you have already initialized COM, this will fail. Either run in a thread, or close the currently open COM library.
Parameters:
[out] BaseBoardInfo Pointer to a structure to store the baseboard information
Returns:
TRUE if successful, otherwise FALSE
SYSINFO_API wchar_t* SysInfoDll_GetHDDSummaryLine ( SYSINFO_WMI SysInfo_WMI,
wchar_t *  line,
int  iLen 
)

Call this function to get the physical disk system information. This is a subset of the SysInfoDll_GetSystemInfo_WMI() API.

Parameters:
[in] SysInfo_WMI,: Pointer to the WMI system information.
[out] line,: The summary line string.
[out] iLen,: The length of the summary line string.
Returns:
TRUE if the system information is successfully retrieved, otherwise FALSE
 All Data Structures Files Functions Variables Enumerations Enumerator Defines