LONG
DrvQueryDeviceIdParameter(
PREG_ACCESS RegAccess,
UINT DeviceNumber,
PTCHAR ValueName,
PDWORD pValue);
The DrvQueryDeviceIdParameter function reads the value associated with the specified value name, under the specified driver’s \Parameters registry key.
Parameters
RegAccess
Pointer to a globally-defined structure of type REG_ACCESS.
DeviceNumber
Device number. Used as an index to the device subkeys under the \Parameters key. See the Comments section below.
ValueName
Pointer to a string representing the value name.
pValue
Pointer to a DWORD to receive the requested value.
Return Value
Returns ERROR_SUCCESS if the operation succeeds. Otherwise returns one of the error codes defined in winerror.h. See the Comments section below.
Comments
The structure pointed to by RegAccess must be a single, globally-defined REG_ACCESS structure that the driver uses with all calls to drvlib.lib functions requiring a RegAccess parameter.
The value name and value are read from the registry path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DriverName\Parameters\DeviceNumber, where Number represents the number supplied by the DeviceNumber parameter.
The function can only return a value that is stored as a REG_DWORD type.
The function calls RegQueryValueEx and returns its return value. (See the Win32 SDK.)
To store values under a driver’s \Parameters registry key, call DrvSetDeviceIdParameter.
Drivers must call DrvCreateServicesNode before calling DrvQueryDeviceIdParameter.
For additional information, see Installing and Configuring your Driver, Using drvlib.lib.