Data Structures | Defines | Enumerations | Functions

SysInfo.h File Reference

#include <stdio.h>
#include "SysInfoIncludes.h"

Go to the source code of this file.

Data Structures

struct  CPU_SPECIFICATION
struct  CPUMSRINFO
struct  CPU_SPECIFICATION_STEPPING
struct  CPU_GROUP_INFO
struct  CPU_GROUPS_INFO
struct  CPUINFO
struct  SPDINFO
union  SPDINFO::SPECIFICINFO
 RAM-type specific attributes. More...
struct  SPDINFO::SPECIFICINFO::SDRSDRAMINFO
 SDRAM-specific attributes. More...
struct  SPDINFO::SPECIFICINFO::DDR1SDRAMINFO
 DDR-specific attributes. More...
struct  SPDINFO::SPECIFICINFO::DDR2SDRAMINFO
 DDR2-specific attributes. More...
struct  SPDINFO::SPECIFICINFO::DDR2SDRAMINFO::EPPInfo
 EPP-specific attributes. More...
union  SPDINFO::SPECIFICINFO::DDR2SDRAMINFO::EPPInfo::PROFILEINFO
 EPP Profile attributes. More...
struct  SPDINFO::SPECIFICINFO::DDR2SDRAMINFO::EPPInfo::PROFILEINFO::ABBRPROFILEINFO
 EPP Abbreviated Profile attributes. More...
struct  SPDINFO::SPECIFICINFO::DDR2SDRAMINFO::EPPInfo::PROFILEINFO::FULLPROFILEINFO
struct  SPDINFO::SPECIFICINFO::DDR2FBSDRAMINFO
 DDR2FB-specific attributes. More...
struct  SPDINFO::SPECIFICINFO::DDR3SDRAMINFO
 DDR3-specific attributes. More...
struct  SPDINFO::SPECIFICINFO::DDR3SDRAMINFO::XMPInfo
 XMP-specific attributes. More...
struct  SPDINFO::SPECIFICINFO::DDR3SDRAMINFO::XMPInfo::XMPProfile
 XMP profile attributes. More...
struct  MEMMODULEINFO
struct  MONITOR_ATTRIBUTES
struct  MULTIMONITOR_DYN
struct  SYSINFO_DISPLAY_DEVICE
struct  DISPLAY_DEVICES
struct  USB_HOST_CONTROLLER
struct  USB_HOST_CONTROLLERS
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
struct  RAMINFO_SMBIOS
struct  SYSINFO_SMBIOS
struct  LPDEVICEINFO

Defines

#define SYSINFO_API   extern "C" __declspec(dllexport)
#define VSHORT_STRING_LEN   16
#define SHORT_STRING_LEN   64
#define LONG_STRING_LEN   256
#define VLONG_STRING_LEN   1024
#define MAX_NUM_CPUS   256
 The maxium number of logical CPUs (including physical cores) that are supported with the CPU test.
#define MAX_NUM_CPU_PACKAGES   32
 The maxium number CPU packages supported.
#define MAX_CPU_GROUPS   4
 The maxium number of CPU groups (curenly Windows 7 and 2008 support 4 groups of 64 logical CPUs).
#define MAX_CPU_IN_GROUP   64
 The maxium number of CPU in a groups (in 64-bit Windows).
#define MAX_AFFINITY_SUPPORT   MAXIMUM_PROC_PER_GROUP
 The maxium number of CPUs that you can set the CPU affinity for.
#define CPU_SPEED_STRING_LENGTH   15
#define CPU_STRING_LEN   34
#define CPUCODE_STRING_LENGTH   16
#define STEPPING_STRING_LENGTH   6
#define SOCKET_STRING_LENGTH   16
#define FAB_STRING_LENGTH   5
#define MODULE_PARTNO_LEN   18
#define MAX_MEMORY_SLOTS   16
#define SPDINFO_MEMTYPE_SDRAM   0x04
#define SPDINFO_MEMTYPE_DDR   0x07
#define SPDINFO_MEMTYPE_DDR2   0x08
#define SPDINFO_MEMTYPE_DDR2FB   0x09
#define SPDINFO_MEMTYPE_DDR2FBPROBE   0x0A
#define SPDINFO_MEMTYPE_DDR3   0x0B
#define SPDINFO_DDR2_EPP_PROFILE_ABBR   0xA1
#define SPDINFO_DDR2_EPP_PROFILE_FULL   0XB1
#define NUMMONITORS   4
 Max number of monitors supported.
#define MAX_MONITOR_INFO_LEN   256
#define MAX_DISPLAY_DEVICES   16
#define MAX_MONITORS   4
 Max number of monitors per adapter.
#define MAX_STRINGLEN   128
#define MAX_DEV_MODES   800
#define MAX_VIDEO_INFO_LEN   128
#define MAXUSBHOSTCONTROLLERS   10
#define MAXUSBDEVICES   14
 Max # of USB devices per host controller.
#define USBSTRINGLEN   128
#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
#define SMB_VSHORT_STRINGLEN   32
#define SMB_STRINGLEN   64
#define SERIAL_NUM_LEN   20
#define FIRMWARE_REV_LEN   8
#define MODEL_NUM_LEN   40
#define VENDOR_UNIQUE_LEN   3
#define WWN_LEN   8
#define MAX_PARTITIONS_PER_DEVICE   8
#define SMART_STATUS_SUCCESS   0
 No error. Function completed and returned successfully.
#define SMART_ERR_DEVICE_ID_DNE   -1000
 The device ID passed in does not exist. Please use GetSmartDeviceIDFirst and GetSmartDeviceIDNext to get the device ID.
#define SMART_ERR_DEVICE_ID_NOT_SMART   -1001
 Disk does not support S.M.A.R.T. Older disk that does not support S.M.A.R.T. will get this error.
#define SMART_ERR_DEVICE_OPEN   -1002
#define SMART_ERR_DRIVE_NUMBER_INVALID   -1100
 Valid drive numbers are from 0 ("A:\") to 25 ("Z:\"). Any number not in this range will yield this error.
#define SMART_ERR_DRIVE_NUMBER_DNE   -1101
 Drive number does not exist. This means there is not physical device that has this drive number.
#define SMART_ERR_DRIVE_NUMBER_NOT_FIXED   -1102
 Drive number is not a fixed drive. Floppies and CDROMs are not fixed drives and will get this error.
#define SMART_ERR_BUFFER_INVALID   -2000
 Buffer provided points to NULL.
#define SMART_ERR_BUFFER_TOO_SMALL   -2001
 Buffer provided is too small to hold all the data.
#define SMART_ERR_BUFFER_FAILED_ALLOCATE   -2002
 Failed to allocate buffer in function.
#define SMART_ERR_SMART_DEVICE_ID_EMPTY   -3001
 There is no S.M.A.R.T. device ID in the list.
#define SMART_ERR_SMART_DEVICE_ID_EOL   -3002
 We have reached the end of list for the S.M.A.R.T. device ID(s).
#define SMART_ERR_SMART_ATTR_ID_EMPTY   -4001
 There is no S.M.A.R.T. attribute for the drive.
#define SMART_ERR_SMART_ATTR_ID_EOL   -4002
 We have reached the end of list for the S.M.A.R.T. attribute(s) for the drive.
#define SMART_ERR_SMART_ATTR_ID_INVALID   -4003
 Smart attribute ID is invalid. Attribute ID cannot be zero.
#define SMART_WARN_SMART_ATTR_ID_UNKNOWN   -4004
 Smart attribute ID unrecognized by DLL. Possibly a new attribute implemented by certain hard disk manufacturer. The attribute value will still be valid. However, you will get "Unknown Attribute" if you try and get its description string. This is a warning rather than an error.
#define SMART_ERR_FOPEN_FAIL   -5001
 Fail to open file for reading and writing. This happens when the Windows API fopen() returned an error.
#define SMART_ERR_FWRITE_FAIL   -5002
 Fail to write to file. This happens when the number of characters written using the Windows API fwrite() is less than what we intended to write.
#define SMART_ERR_FREAD_FAIL   -5003
 Fail to read file. This happens when the Windows API fread() returned an error.
#define SMART_ERR_ACCESS_RW   -5101
 No read/write permission for file.
#define SMART_ERR_ACCESS_RO   -5102
 No read permission for file.
#define SMART_ERR_FSEEK_FAIL   -5201
 Fail to seek to a location in file. This happens when the Windows API fseek() returned an error.
#define SMART_ERR_GET_PHY_CAPACITY   -6001
 Fail to get device capacity.
#define SMART_ERR_BUILD_DRIVES_INFO_NO_ACCESS   -7001
 No access rights when trying to get info for drive.
#define SMART_ERR_NO_ADMIN_RIGHTS   -7002
 No access rights to gather drive information. In Windows Server and Vista, your application needs to "Run as administrator".
#define SMART_ERR_DLL_NOT_INIT   -10001
 Occur when you try and use SmartDisk DLL’s APIs without first calling SmartDisk Init.
#define SMART_ERR_DLL_INIT_MEMORY_ALLOC_FAIL   -10002
 SmartDisk Init failed to allocate memory.
#define SMART_ERR_FUNCTION_NOT_SUPPORTED   -10003
 This function is not supported in Windows 98/Me.
#define SMART_ERR_EMPTY_STRING   -10004
 Empty string returned from SmartDll GetXXX functions.
#define SMART_ERR_TEC_NO_ATTRIBUTES   -20001
 There are no S.M.A.R.T. attributes to record for the chosen drive number.
#define SMART_ERR_TEC_SIGNATURE_HEAD   -20002
 The TEC file does not have "SMDL" in the first 4 bytes of the file stream.
#define SMART_ERR_TEC_SIGNATURE_TAIL   -20003
 The TEC file does not have ""LDMS" in the last 4 bytes of the file stream.
#define SMART_ERR_TEC_FILE_DNE   -20004
 The TEC file for the drive number does not exist.
#define SMART_WARN_TEC_NOT_ENOUGH_DATA   -20005
 There are not enough TEC data to predict TEC. We need to have at least 3 sets of data.
#define SMART_WARN_TEC_ATTR_ID_NA   -20006
 For given attribute ID, threshold value is 0. It means we have no threshold value to work with to predict TEC.
#define SMART_WARN_TEC_UNABLE_TO_PREDICT   -20007
 No changes in attribute values have been detected, making it impossible to predict TEC.
#define SMART_ERR_UNEXPECTED   -30001
#define ATTR_INVALID   0x0
#define ATTR_READ_ERROR_RATE   0x1
 Raw Read Error Rate: Represents the rate of uncorrected read errors. Lower values indicate that there is a problem with either disk surface or read/write heads.
#define ATTR_THROUGHPUT_PERF   0x2
 Throughput Performance: Represents the throughput performance of the drive, i.e. The speed at which the drive is reading and writing data.
#define ATTR_SPIN_UP_TIME   0x3
 Spin Up Time: Represents the average amount of time required to spin up the drive spindle to operational speed from a stopped state.
#define ATTR_START_STOP_COUNT   0x4
 Start/Stop Count: Represents the number of start/stop cycles for the drive. The raw value indicates the count of start/stop cycles for the drive. The drive being powered on/off or suspended/woken up are considered as start/stop cycles.
#define ATTR_REALLOC_SECTOR_COUNT   0x5
 Reallocated Sector Count: Represents the amount of spare sector pool available. Spare sectors are used to replace sectors that became bad for some reason (for instance, if a read error occurs). Therefore the more sectors reallocated, the worse the condition of the drive. A high value represents few reallocated sectors, a low value represents a disk in poor physical condition.
#define ATTR_READ_CHANNEL_MARGIN   0x6
 Read Channel Margin: Margin of a channel while reading data. The function of this attribute is not specified.
#define ATTR_SEEK_ERROR_RATE   0x7
 Seek Error Rate: Represents the number of seek errors. Each time the drive attempts a seek operation, but fails to position its head correctly, the seek error rate increases.
#define ATTR_SEEK_TIME_PERF   0x8
 Seek Time Performance: Represents how efficiently the drive is performing seek operations. A low value indicates problems with the drive subsystem, for instance the servo responsible for positioning the head.
#define ATTR_POWER_ON_TIME   0x9
 Power On Hours Count: This is an informative attribute, the raw value of which displays the number of hours the drive has been powered on for.
#define ATTR_SPIN_RETRY_COUNT   0xA
 Spin Retry Count: Represents the number of times a drive fails to spin its spindle up to operation speed on the first attempt. The lower the value, the more retries have occurred.
#define ATTR_CALIBRATION_RETRY_COUNT   0xB
 Calibration Retry Count: Calibration is the act of repositioning the drive read/write head to cylinder 0. This value represents the number of times a calibration has failed on the first attempt.
#define ATTR_POWER_CYCLE_COUNT   0xC
 Power Cycle Count: Informative attribute, the raw value of which represents the number of drive power on/drive power off cycles for the disk.
#define ATTR_SOFT_READ_ERROR_RATE   0xD
 Soft Read Error Rate: Uncorrected read errors reported to the operating system.
#define ATTR_DOWNSHIFT_ERROR_COUNT   0xB7
#define ATTR_END_TO_END_ERROR   0xB8
#define ATTR_HEAD_STABILITY   0xB9
#define ATTR_INDUCED_OP_VIB_DETECT   0xBA
#define ATTR_UNCORRECTABLE_ERRORS   0xBB
#define ATTR_COMMAND_TIMEOUT   0xBC
#define ATTR_COMMAND_HIGH_FLY_WRITES   0xBD
#define ATTR_100_MINUS_TEMPERATURE   0xBE
 Temperature Difference from 100: The exact specification of this attribute is not quite stable. This is what it is known as on Seagate drives whereas it is called Airflow Temperature on Western Digital hard disks. In either case this attribute usually has to do with subtracting the temperature from 100 to give a value that is worse when it is lower.
#define ATTR_GSENSE_ERROR_RATE_BF   0xBF
 G-Sense Error Rate: Frequency of mistakes as a result of impact loads.
#define ATTR_POWER_OFF_RETRACT_COUNT   0xC0
 Power-off Retract Count: Number of times the heads are loaded off the media. Heads can be unloaded without actually powering off.
#define ATTR_LOAD_CYCLE_COUNT   0xC1
 Load/Unload Cycle: Count of load/unload cycles into head landing zone position.
#define ATTR_TEMPERATURE_C2   0xC2
 Temperature: Informative attribute, the raw value of which represents the current temperature in Celsius of the drive.
#define ATTR_HARDWARE_ECC_RECOVERED   0xC3
 Hardware ECC Recovered: Time between ECC-corrected errors.
#define ATTR_REALLOC_EVENT_COUNT   0xC4
 Reallocation Event Count: Represents the number of reallocation events, which have taken place. Sometimes multiple sectors are reallocated together – this corresponds to one reallocation event. (See also: Reallocated Sector Count and Current Pending Sector Count).
#define ATTR_PENDING_SECTOR_COUNT   0xC5
 Current Pending Sector Count: Represents the number of sectors currently pending reallocation.
#define ATTR_UNCORRECTABLE_SECTOR_COUNT   0xC6
 Uncorrectable Sector Count: The total number of uncorrectable errors when reading/writing a sector.
#define ATTR_ULTRADMA_CRC_ERROR_COUNT   0xC7
 Ultra ATA CRC Error Count: Represents the number of CRC error found in the Ultra DMA high-speed transfer mode. (CRC stands for Cyclic Redundancy Check and is data verification algorithm which uses polynomial checksums).
#define ATTR_WRITE_ERROR_COUNT   0xC8
 Write Error Count: Represents the rate of uncorrected write errors. Lower values indicate that there is a problem with either disk surface or read/write heads.
#define ATTR_OFF_TRACK_ERRORS   0xC9
 Soft Read Error Rate: Number of off-track errors.
#define ATTR_DATA_ADDRESS_MARK_ERRORS   0xCA
 Data Address Mark errors: Number of Data Address Mark errors.
#define ATTR_ECC_ERRORS   0xCB
 Run Out Cancel: Number of ECC errors.
#define ATTR_SOFT_ECC_CORRECTION   0xCC
 Soft ECC Correction: Number of errors corrected by software ECC.
#define ATTR_THERMAL_ASPERITY_RATE   0xCD
 Thermal asperity rate (TAR ): Number of thermal asperity errors.
#define ATTR_FLYING_HEIGHT   0xCE
 Flying Height: Height of heads above the disk surface.
#define ATTR_SPIN_HIGH_CURRENT   0xCF
 Spin High Current: Amount of high current used to spin up the drive.
#define ATTR_SPIN_BUZZ   0xD0
 Spin Buzz: Number of buzz routines to spin up the drive.
#define ATTR_OFFLINE_SEEK_PERFORMANCE   0xD1
 Offline Seek Performance: Drive’s seek performance during offline operations.
#define ATTR_VIBRATION_DURING_WRITE   0xD3
#define ATTR_SHOCK_DURING_WRITE   0xD4
#define ATTR_DISK_SHIFT   0xDC
 Disk Shift: Distance the disk has shifted relative to the spindle (usually due to shock).
#define ATTR_GSENSE_ERROR_RATE_DD   0xDD
 GSense Error rate: The number of errors resulting from externally-induced shock & vibration.
#define ATTR_LOADED_HOURS   0xDE
 Loaded Hours: Time spent operating under data load (movement of magnetic head armature).
#define ATTR_LOAD_UNLOAD_RERTY_COUNT   0xDF
 Load/Unload retry count: Number of times head changes position.
#define ATTR_LOAD_FRICTION   0xE0
 Load Friction: Resistance caused by friction in mechanical parts while operating.
#define ATTR_LOAD_UNLOAD_CYCLE_COUNT   0xE1
 Load/Unload Cycle Count: Total number of load cycles.
#define ATTR_LOAD_IN_TIME   0xE2
 Load 'In'-time: Total time of loading on the magnetic heads actuator (time not spent in parking area).
#define ATTR_TORQUE_AMPLIFICATION_COUNT   0xE3
 Torque Amplification Count: Number of attempts to compensate for platter speed variations.
#define ATTR_POWEROFF_RETRACT_CYCLE   0xE4
 Power off retract cycle: The number of times the magnetic armature was retracted automatically as a result of cutting power.
#define ATTR_GMR_HEAD_AMPLITUDE   0xE6
 GMR Head Amplitude: Amplitude of "thrashing" (distance of repetitive forward/reverse head motion).
#define ATTR_TEMPERATURE_E7   0xE7
 Temperature: Drive Temperature, unknown units.
#define ATTR_HEAD_FLYING_HOURS   0xF0
 Head Flying Hours: Time while head is positioning.
#define ATTR_TOTAL_LBAS_WRITTEN   0xF1
#define ATTR_TOTAL_LBAS_READ   0xF2
#define ATTR_READ_ERROR_RETRY_RATE   0xFA
 Read Error Retry Rate: Number of errors while reading from a disk.
#define ATTR_FREE_FALL_PROTECTION   0xFE
#define ATTR_TYPE_STR_DESC   0x20
 A text description of the attribute. See below for a more detailed description of each attribute.
#define ATTR_TYPE_INT_STATUS   0x40
 Provided a status for the attribute. OK means the attribute value is well in the safe zone. FAIL means that a Threshold Exceeding Condition has been detected.
#define ATTR_TYPE_INT_VALUE   0x01
 The current normalized attribute value.
#define ATTR_TYPE_ULONGLONG_RAW   0x02
#define ATTR_TYPE_INT_WORST   0x04
 The worst (lowest) value recorded so far. This is an indicator of how close to failure the drive has ever been.
#define ATTR_TYPE_INT_THRESHOLD   0x08
 The attribute threshold. This value will not change and represents the lowest possible safe attribute value.
#define INTERACE_TYPE_UNKNOWN   0x00
#define INTERACE_TYPE_SCSI   0x01
#define INTERACE_TYPE_ATAPI   0x02
#define INTERACE_TYPE_ATA   0x03
#define INTERACE_TYPE_1394   0x04
#define INTERACE_TYPE_SSA   0x05
#define INTERACE_TYPE_FIBRE   0x06
#define INTERACE_TYPE_USB   0x07
#define INTERACE_TYPE_RAID   0x08
#define INTERACE_TYPE_ISCSI   0x09
#define INTERACE_TYPE_SAS   0x0A
#define INTERACE_TYPE_SATA   0x0B
#define ATA_COMPLIANCE(x)   (x != 0x0000 && x != 0xFFFF)
#define ATA8_SUPPORTED(x)   (x & (1 << 8))
#define ATA7_SUPPORTED(x)   (x & (1 << 7))
#define ATA6_SUPPORTED(x)   (x & (1 << 6))
#define ATA5_SUPPORTED(x)   (x & (1 << 5))
#define ATA4_SUPPORTED(x)   (x & (1 << 4))
#define TRANSPORT_TYPE_AVAILABLE(x)   (x != 0x0000 && x != 0xFFFF)
#define TRANSPORT_TYPE_SERIAL(x)   (x & (1 << 12))
#define TRANSPORT_TYPE_PARALLEL(x)   ((x & (1 << 12)) == 0)
#define SATA3_0_COMPLIANCE(x)   (x & (1 << 5))
#define SATA2_6_COMPLIANCE(x)   (x & (1 << 4))
#define SATA2_5_COMPLIANCE(x)   (x & (1 << 3))
#define SATA2_EXT_COMPLIANCE(x)   (x & (1 << 2))
#define SATA1_COMPLIANCE(x)   (x & (1 << 1))
#define ATA7_COMPLIANCE(x)   (x & (1 << 1))
#define ATA8_COMPLIANCE(x)   (x & 1)
#define ROTATION_RATE_AVAILABLE(x)   (x != 0)
#define ROTATION_RATE_SSD(x)   (x == 0x0001)
#define MULTIDMA_MODE2_SUPPORTED(x)   (x & (1 << 2))
#define MULTIDMA_MODE1_SUPPORTED(x)   (x & (1 << 1))
#define MULTIDMA_MODE0_SUPPORTED(x)   (x & 1)
#define MULTIDMA_MODE2_SELECTED(x)   (x & (1 << 2))
#define MULTIDMA_MODE1_SELECTED(x)   (x & (1 << 1))
#define MULTIDMA_MODE0_SELECTED(x)   (x & 1)
#define ULTRADMA_MODE6_SUPPORTED(x)   (x & (1 << 6))
#define ULTRADMA_MODE5_SUPPORTED(x)   (x & (1 << 5))
#define ULTRADMA_MODE4_SUPPORTED(x)   (x & (1 << 4))
#define ULTRADMA_MODE3_SUPPORTED(x)   (x & (1 << 3))
#define ULTRADMA_MODE2_SUPPORTED(x)   (x & (1 << 2))
#define ULTRADMA_MODE1_SUPPORTED(x)   (x & (1 << 1))
#define ULTRADMA_MODE0_SUPPORTED(x)   (x & 1)
#define ULTRADMA_MODE6_SELECTED(x)   (x & (1 << 6))
#define ULTRADMA_MODE5_SELECTED(x)   (x & (1 << 5))
#define ULTRADMA_MODE4_SELECTED(x)   (x & (1 << 4))
#define ULTRADMA_MODE3_SELECTED(x)   (x & (1 << 3))
#define ULTRADMA_MODE2_SELECTED(x)   (x & (1 << 2))
#define ULTRADMA_MODE1_SELECTED(x)   (x & (1 << 1))
#define ULTRADMA_MODE0_SELECTED(x)   (x & 1)
#define PIO_MODE3_SUPPORTED(x)   (x & 1)
#define PIO_MODE4_SUPPORTED(x)   (x & (1 << 1))
#define SATA_NCQ_PRIO_INFO_SUPPORTED(x)   (x & (1 << 12))
#define SATA_UNLOAD_NCQ_PENDING_SUPPORTED(x)   (x & (1 << 11))
#define SATA_PHY_EVENT_COUNTERS_SUPPORTED(x)   (x & (1 << 10))
#define SATA_POWER_MGMT_REQUESTS_SUPPORTED(x)   (x & (1 << 9))
#define SATA_NCQ_FEATURES_SUPPORTED(x)   (x & (1 << 8))
#define SATA_GEN2_SIGNAL_SPEED_SUPPORTED(x)   (x & (1 << 2))
#define SATA_GEN1_SIGNAL_SPEED_SUPPORTED(x)   (x & (1 << 1))
#define SATA_SSP_SUPPORTED(x)   (x & (1 << 6))
#define SATA_IN_ORDER_DELIVERY_SUPPORTED(x)   (x & (1 << 4))
#define SATA_INIT_POWER_MGMT_SUPPORTED(x)   (x & (1 << 3))
#define SATA_DMA_SETUP_AUTO_ACT_SUPPORTED(x)   (x & (1 << 2))
#define SATA_NON_ZERO_BUFOFF_SUPPORTED(x)   (x & (1 << 1))
#define SATA_SSP_ENABLED(x)   (x & (1 << 6))
#define SATA_IN_ORDER_DELIVERY_ENABLED(x)   (x & (1 << 4))
#define SATA_INIT_POWER_MGMT_ENABLED(x)   (x & (1 << 3))
#define SATA_DMA_SETUP_AUTO_ACT_ENABLED(x)   (x & (1 << 2))
#define SATA_NON_ZERO_BUFOFF_ENABLED(x)   (x & (1 << 1))
#define AAM_LEVEL_VENDOR_SPECIFIC(x)   (x == 0x00)
#define AAM_LEVEL_MIN_ACOUSTIC(x)   (x == 0x80)
#define AAM_LEVEL_INT_ACOUSTIC(x)   (x >= 0x81 && x <= 0xFD)
#define AAM_LEVEL_MAX_PERFORMANCE(x)   (x == 0xFE)
#define APM_LEVEL_MIN_POWER_WITH_STANDBY(x)   (x == 0x01)
#define APM_LEVEL_INT_POWER_WITH_STANDBY(x)   (x >= 0x02 && x <= 0x7F)
#define APM_LEVEL_MIN_POWER_WITHOUT_STANDBY(x)   (x == 0x80)
#define APM_LEVEL_INT_POWER_WITHOUT_STANDBY(x)   (x >= 0x81 && x <= 0xFD)
#define APM_LEVEL_MAX_PERFORMANCE(x)   (x == 0xFE)
#define SCT_TRANSPORT_SUPPORTED(x)   (x & 1)
#define SCT_DATA_TABLES_SUPPORTED(x)   (x & (1 << 5))
#define SCT_FEATURES_CTRL_SUPPORTED(x)   (x & (1 << 4))
#define SCT_ERROR_RECOVERY_CTRL_SUPPORTED(x)   (x & (1 << 3))
#define SCT_WRITE_SAME_SUPPORTED(x)   (x & (1 << 2))

Enumerations

enum  CPU_OCLK {
  CPU_OVERCLOCKED_UNKNOWN = 0, CPU_OVERCLOCKED = 1, CPU_UNDERCLOCKED = 2, CPU_OVERCLOCKED_NO = 3,
  CPU_MAXVAL = 4
}
enum  CPUINFO_STATUS {
  CPUINFO_SUCCESS = 0, CPUINFO_ACCESS_DENIED = 1, CPUINFO_INIT_DIRECTIO = 2, CPUINFO_DIRECTIO_VERSION = 3,
  CPUINFO_NOT_ALL_CPUS_AVAILABLE = 4
}
 

Return code for SysInfoDll_GetCPUInfo.

More...
enum  SPDINFO_STATUS {
  SPDINFO_SUCCESS = 0, SPDINFO_ACCESS_DENIED = 1, SPDINFO_INIT_DIRECTIO = 2, SPDINFO_DIRECTIO_VERSION = 3,
  SPDINFO_ACCESS_COLLISION = 4
}
 

Return code for SysInfoDll_GetMemSPDInfo.

More...
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
}
enum  SMB_STATUS {
  SMBERR_SUCCESS, SMBERR_MEMALLOC, SMBERR_INIT_DIRECTIO, SMBERR_NO_SMBIOS,
  SMBERR_ACCESS_DENIED, SMBERR_FAILURE
}
enum  SYSINFO_FORMAT_TYPE { FORMAT_TEXT = 0, FORMAT_HTML }

Functions

SYSINFO_API const wchar_t * SysInfoDll_GetVersion (void)
 Call this function to retrieve the SysInfo DLL version. This function returns a pointer to constant characters (via use of a static buffer). Attempting to change the value(s) of constant characters is an error. No attempt should be made to free the character buffer returned by this function.
SYSINFO_API BOOL SysInfoDll_StartLogging (LPWSTR lpszPath)
 Call this function to begin writing SysInfo log information into a file.
SYSINFO_API BOOL SysInfoDll_StartLoggingExisting (FILE *fp)
 Call this function to begin writing SysInfo log information into an existng file managed by the calling application.
SYSINFO_API BOOL SysInfoDll_StopLogging (void)
 Call this function to stop writing SysInfo log information.
SYSINFO_API BOOL SysInfoDll_GetLastErrorString (LPWSTR lpszError, DWORD dwsize)
 Call this function to retrieve the last error as a string.
SYSINFO_API BOOL SysInfoDll_GetComputerName (LPWSTR lpBuffer, LPDWORD nSize)
 Call this function to return the computer's NetBIOS name as a string.
SYSINFO_API const wchar_t * SysInfoDll_GetOS (LPWSTR lpszOS, int iLen)
 Call this function to retrieve the OS version information as a string.
SYSINFO_API BOOL SysInfoDll_GetOSEx (LPOSVERSIONINFOW lpVersionInformation)
 Call this function to retrieve the OS version information.
SYSINFO_API int SysInfoDll_GetCPUInfo (CPUINFO *pCPUinfo)
 Call this function to return the CPU information structure.
SYSINFO_API BOOL SysInfoDll_GetMemoryInfo (MEMORYSTATUSEX *pMemInfoEx)
 Call this function to return the Memory information structure.
SYSINFO_API int SysInfoDll_GetMemSPDInfo (MEMMODULEINFO *pMemModuleInfo)
 Call this function to retrieve the SPD information from all memory modules.
SYSINFO_API BOOL SysInfoDll_GetGraphicsInfo (MULTIMONITOR_DYN *MM, DISPLAY_DEVICES *DD, LPWSTR szSummary, int iLen)
 Call this function to retrieve the monitor and display devices information, as well as a summary string.
SYSINFO_API wchar_t * SysInfoDll_GetGraphicsSummaryLine (wchar_t *szSummary, int iLen)
 Call this function to retrieve a summary string for the system graphics hardware.
SYSINFO_API BOOL SysInfoDll_GetUSBInfo (USB_HOST_CONTROLLERS *USBHostControllers)
 Call this function to retrieve the USB controller and device information.
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).
SYSINFO_API int SysInfoDll_GetSystemInfo_SMBIOS (SYSINFO_SMBIOS *SysInfo)
 Call this function to return system information via SMBIOS (System Management BIOS).
SYSINFO_API BOOL SysInfoDll_GetAll (LPWSTR szComputerName, LPWSTR szszOSName, CPUINFO *pCPUinfo, MEMORYSTATUSEX *pMemInfoEx, MULTIMONITOR_DYN *MM, DISPLAY_DEVICES *DD, LPWSTR szGraphicsSummary, SYSINFO_WMI *SysInfo_WMI, SYSINFO_SMBIOS *SysInfo_SMBIOS, USB_HOST_CONTROLLERS *USBHostControllers)
 Call this function to get the aggregate of all of the system information calls above.
SYSINFO_API BOOL SysInfoDll_GetAll_async (LPWSTR szComputerName, LPWSTR szszOSName, CPUINFO *pCPUinfo, MEMORYSTATUSEX *pMemInfoEx, MULTIMONITOR_DYN *MM, DISPLAY_DEVICES *DD, LPWSTR szGraphicsSummary, SYSINFO_WMI *SysInfo_WMI, SYSINFO_SMBIOS *SysInfo_SMBIOS, USB_HOST_CONTROLLERS *USBHostControllers)
 Call this function to get the aggregate of all of the system information calls above.
SYSINFO_API BOOL SysInfoDll_FormatAll (SYSINFO_FORMAT_TYPE Format, LPWSTR szComputerName, LPWSTR szOSName, CPUINFO *pCPUinfo, MEMORYSTATUSEX *pMemInfoEx, MEMMODULEINFO *pMemModuleInfo, MULTIMONITOR_DYN *MM, DISPLAY_DEVICES *DD, LPWSTR szGraphicsSummary, SYSINFO_WMI *SysInfo_WMI, SYSINFO_SMBIOS *SysInfo_SMBIOS, USB_HOST_CONTROLLERS *USBHostControllers, LPWSTR pszRes, int *iResLen)
 Call this function to format all system information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatSummary (SYSINFO_FORMAT_TYPE Format, LPWSTR szComputerName, LPWSTR szOSName, CPUINFO *pCPUinfo, MEMORYSTATUSEX *pMemInfoEx, LPWSTR szGraphicsSummary, SYSINFO_WMI *SysInfo_WMI, SYSINFO_SMBIOS *SysInfo_SMBIOS, LPWSTR pszRes, int *iResLen)
 Call this function to format all system information (summary only) into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatGeneral (SYSINFO_FORMAT_TYPE Format, LPWSTR szComputerName, SYSINFO_WMI *SysInfo_WMI, SYSINFO_SMBIOS *SysInfo_SMBIOS, LPWSTR pszRes, int *iResLen)
 Call this function to format the general system information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatCPU (SYSINFO_FORMAT_TYPE Format, CPUINFO *pCPUinfo, LPWSTR pszRes, int *iResLen)
 Call this function to format the CPU information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatMemory (SYSINFO_FORMAT_TYPE Format, MEMORYSTATUSEX *pMemInfoEx, SYSINFO_WMI *SysInfo_WMI, SYSINFO_SMBIOS *SysInfo_SMBIOS, MEMMODULEINFO *pMemModuleInfo, LPWSTR pszRes, int *iResLen)
 Call this function to format the Memory information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatMemSPD (SYSINFO_FORMAT_TYPE Format, MEMMODULEINFO *pMemModuleInfo, LPWSTR pszRes, int *iResLen)
 Call this function to format the Memory SPD information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatGraphics (SYSINFO_FORMAT_TYPE Format, MULTIMONITOR_DYN *MM, DISPLAY_DEVICES *DD, LPWSTR szGraphicsSummary, LPWSTR pszRes, int *iResLen)
 Call this function to format the Monitor/Display Device information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatDiskVolumes (SYSINFO_FORMAT_TYPE Format, SYSINFO_WMI *SysInfo_WMI, LPWSTR pszRes, int *iResLen)
 Call this function to format the Disk volume information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatDiskDrives (SYSINFO_FORMAT_TYPE Format, SYSINFO_WMI *SysInfo_WMI, LPWSTR pszRes, int *iResLen)
 Call this function to format the Disk drive information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatOpticalDrives (SYSINFO_FORMAT_TYPE Format, SYSINFO_WMI *SysInfo_WMI, LPWSTR pszRes, int *iResLen)
 Call this function to format the Optical drive information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatNetwork (SYSINFO_FORMAT_TYPE Format, SYSINFO_WMI *SysInfo_WMI, LPWSTR pszRes, int *iResLen)
 Call this function to format the Network information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatPorts (SYSINFO_FORMAT_TYPE Format, SYSINFO_WMI *SysInfo_WMI, LPWSTR pszRes, int *iResLen)
 Call this function to format the Port information into a string (for reporting purposes).
SYSINFO_API BOOL SysInfoDll_FormatUSB (SYSINFO_FORMAT_TYPE Format, USB_HOST_CONTROLLERS *USBHostControllers, LPWSTR pszRes, int *iResLen)
 Call this function to format the USB controller and device information into a string (for reporting purposes).
SYSINFO_API int SysInfoDll_Smart_Init (bool debug, wchar_t *iDebugFile=NULL, bool iRecordTEC=true)
 Call this function to initialize usage of the SMART set of APIs.
SYSINFO_API void SysInfoDll_Smart_Cleanup (void)
 Call this function to clean up memory usage of the DLL after finishing all calls to SysInfo SMART APIs. It de-allocates all memory that was allocated and used by SmartDisk DLL. Calling subsequent SmartDll API calls after SmartDll_Cleanup is an error.
SYSINFO_API int SysInfoDll_Smart_Refresh (bool iRecordTEC=false)
 Call this function to refresh (and re-probe) all SMART devices. If iRecordTEC is true, it records S.M.A.R.T. values for all the available S.M.A.R.T. devices discovered.
SYSINFO_API int SysInfoDll_Smart_GetNumSmartDevices (void)
 Call this function to return the total number of SMART devices detected.
SYSINFO_API int SysInfoDll_Smart_GetNumDetectedDrives (void)
 Call this function to return the total number of volumes detected.
SYSINFO_API int SysInfoDll_Smart_IsValidSmartDevice (int iDeviceID)
 Checks if a particular device ID is a SMART device.
SYSINFO_API int SysInfoDll_Smart_GetDevicePartitionInfo (int *ioDriveNumSameDisk, int *ioNumPartition, int iDeviceID)
 Checks if a particular device ID belongs has multiple partitions.
SYSINFO_API int SysInfoDll_Smart_GetDriveLetterFromDriveNum (wchar_t *ioDriveLetter, int iDriveNum)
 Get the drive letter from the drive number.
SYSINFO_API int SysInfoDll_Smart_GetDeviceSerialNumber (wchar_t *ioBuf, int *ioLen, int iDeviceID)
 Get the serial number of the device.
SYSINFO_API int SysInfoDll_Smart_GetDeviceFirmWareRev (wchar_t *ioBuf, int *ioLen, int iDeviceID)
 Get the firmware revision number of the device.
SYSINFO_API int SysInfoDll_Smart_GetDeviceModelNumber (wchar_t *ioBuf, int *ioLen, int iDeviceID)
 Get the device model number of the device.
SYSINFO_API int SysInfoDll_Smart_GetDeviceCapacity (int *ioCapacity, int iDeviceID)
 Get the capacity of the device in MB .
SYSINFO_API int SysInfoDll_Smart_GetVolumeCapacity (int *ioCapacity, int iDriveNum)
 Get the capacity of a volume in MB .
SYSINFO_API int SysInfoDll_Smart_GetSmartDeviceIDFirst (void)
 Returns the device ID of the first SMART device detected.
SYSINFO_API int SysInfoDll_Smart_GetSmartDeviceIDNext (void)
 Returns the device ID of the next SMART device detected.
SYSINFO_API int SysInfoDll_Smart_GetNumSmartAttr (int iDeviceID)
 Returns the number of SMART attributes for a SMART device.
SYSINFO_API int SysInfoDll_Smart_GetSmartAttributeIDFirst (int iDeviceID)
 Returns the first discovered attribute ID of the SMART device.
SYSINFO_API int SysInfoDll_Smart_GetSmartAttributeIDNext (int iDeviceID)
 Returns the next discovered attribute ID of the SMART device.
SYSINFO_API int SysInfoDll_Smart_GetSmartAttributeByID (void *ioPtr, int *ioLen, int iAttrID, int inAttrType, int iDeviceID)
 Get the attribute value of a particular attribute ID for a SMART device.
SYSINFO_API int SysInfoDll_Smart_GetAttrDescByID (wchar_t *oBuf, int *ioLen, int iAttrID)
 Get the attribute description of a particular attribute ID.
SYSINFO_API int SysInfoDll_Smart_GetDeviceInfo (DEVICEINFO *oDeviceInfo, int iDeviceID)
 Get the device information (such as disk geometry, interface, supported/enabled features).
SYSINFO_API int SysInfoDll_Smart_ExportReport (wchar_t *filename, int iDeviceID, wchar_t *iHeaderText, int iHeaderTextLen, int iExportFlags=3, int iHistoryAttr=0)
 Exports an ASCII text report containing the device information, SMART attribute values and history.
SYSINFO_API int SysInfoDll_Smart_RecordTECData (int iDeviceID)
 Records the current set of normalized and raw attribute values to a binary file for use with TEC prediction.
SYSINFO_API int SysInfoDll_Smart_GetTECDataSetCount (int *ioCount, int iDeviceID)
 Get number of TEC prediction data sets recorded for a particular SMART device.
SYSINFO_API int SysInfoDll_Smart_ExportTECData (time_t *ioTimeArray, int *ioNormValArray, int *ioWorstValArray, int *ioArraySize, int iAttrID, int iDeviceID)
 Extract the TEC prediction data for a particular attribute of a SMART device.
SYSINFO_API int SysInfoDll_Smart_GetTECDataAtIndex (time_t *ioTime, int *ioNormVal, int *ioWorstVal, int inIndex, int iAttrID, int iDeviceID)
 Extract a particular TEC prediction data entry for a particular attribute of a SMART device.
SYSINFO_API int SysInfoDll_Smart_EstimateTECByAttributeID (time_t *ioEarliest, time_t *ioLatest, int iAttrID, int iDeviceID)
 Predicts TEC based on previously recorded TEC prediction data for a particular attribute of a SMART device.
SYSINFO_API int SysInfoDll_Smart_EstimateTEC (time_t *ioEarliest, time_t *ioLatest, int *oAttrID, int iDeviceID)
 Predicts TEC based on previously recorded TEC prediction data for all applicable attributes of a SMART device.

Define Documentation

#define SYSINFO_API   extern "C" __declspec(dllexport)
#define VSHORT_STRING_LEN   16
#define SHORT_STRING_LEN   64
#define LONG_STRING_LEN   256
#define VLONG_STRING_LEN   1024
 All Data Structures Files Functions Variables Enumerations Enumerator Defines