DrvCreateDeviceKey

HKEY
    DrvCreateDeviceKey(
        LPCTSTR
DriverName
);

The DrvCreateDeviceKey function creates a device subkey under the driver’s \Parameters key. The registry path to the created key is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DriverName\Parameters\DeviceNumber.

Parameters
DriverName
Pointer to the driver name. Must match DriverName in registry path.
Return Value

Returns a handle to the device subkey, if the operation succeeds. Otherwise returns NULL.

Comments

The function creates the \Parameters key if it does not exist.

Device subkey names are assigned as \Device0, \Device1, \Device2, and so on.

For additional information, see Installing and Configuring your Driver, Using drvlib.lib.