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 MAXNUMCDDVD   20
 Max number of CD/DVD drives.
#define WMISI_MAXPAGEFILES   2
 Max number of page files.
#define MAX_FILENAME   512
#define MAXNUMDISKS   80
 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 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, 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.
SYSINFO_API wchar_t * SysInfoDll_GetHDDSummaryLine (SYSINFO_WMI *SysInfo_WMI, wchar_t *line, int iLen)
 Call this function to retrieve a summary string for the system disks (based on exising SysInfo_WMI infomration).

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 MAXNUMCDDVD   20

Max number of CD/DVD drives.

#define WMISI_MAXPAGEFILES   2

Max number of page files.

#define MAX_FILENAME   512
#define MAXNUMDISKS   80

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 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_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
SYSINFO_API wchar_t* SysInfoDll_GetHDDSummaryLine ( SYSINFO_WMI SysInfo_WMI,
wchar_t *  line,
int  iLen 
)

Call this function to retrieve a summary string for the system disks (based on exising SysInfo_WMI infomration).

Parameters:
[in] SysInfo_WMI Pointer to WMI System Information already retrieved.
[out] line Pointer to a string to store a summary system disks.
[in] iLen Size of the line string buffer.
Returns:
summary string
 All Data Structures Files Functions Variables Enumerations Enumerator Defines