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.
Returns ERROR_SUCCESS if the operation succeeds. Otherwise returns one of the error codes defined in winerror.h. See the Comments section below.
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.