LONG
DrvSetDeviceIdParameter(
PREG_ACCESS RegAccess,
UINT DeviceNumber,
PTCHAR ValueName,
DWORD Value
);
The DrvSetDeviceIdParameter function assigns the specified value to the specified value name in the registry, under the specified device’s \Parameters 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.
Before a driver can call the DrvSetDeviceIdParameter function, it must call DrvCreateDeviceKey.
The value name and value are written to the registry path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DriverName\Parameters\DeviceNumber, where Number represents the number supplied by the DeviceNumber parameter.
The specified value is stored as a REG_DWORD type.
The function calls RegSetValueEx, which is described in the Win32 SDK, and returns its return value.
To retrieve a registry value written with DrvSetDeviceIdParameter, call DrvQueryDeviceIdParameter.
Drivers must call DrvCreateServicesNode before calling DrvSetDeviceIdParameter.
For additional information, see Installing and Configuring your Driver, Using drvlib.lib.