Registering Hardware Information
To display useful information to the user and for assistance in debugging, a display miniport driver must set certain hardware information in the registry. A display miniport driver must set a chip type, digital-to-analog converter (DAC) type, memory size (of the adapter), and a string to identify the adapter. This information is shown by the Display application in Control Panel. Typically, the driver sets this information in its DxgkDdiAddDevice function.
To set this information, the driver:
Calls the IoOpenDeviceRegistryKey function to open and obtain a handle to a software key for storing driver-specific information. In this call, the driver specifies the PLUGPLAY_REGKEY_DRIVER flag in the DevInstKeyType parameter and the KEY_SET_VALUE, KEY_WRITE, or KEY_ALL_ACCESS value in the DesiredAccess parameter.
Calls the ZwSetValueKey function several times to set each type of hardware information. In each call, the driver specifies, in the KeyHandle parameter, the software-key handle that was obtained from IoOpenDeviceRegistryKey.
The following table describes the information that the driver must register and provides details for the ValueName and Data parameters of ZwSetValueKey:
Information for entry ValueName parameter Data parameter
Null-terminated string that contains the chip name
Null-terminated string that contains the DAC name or identifier (ID)
ULONG that contains, in megabytes, the amount of video memory on the adapter
Null-terminated string that contains the name of the adapter
Null-terminated string that contains information about the BIOS