RETERR DiDeleteDevRegKey(LPDEVICE_INFO lpdi, int iFlags)
This API will delete one or both to the registry keys for the sepecified device.
lpdi
A device info struct for del device that is being removed.
iFlags
Flags indicating which registry key(s) to remove.
DIREG_DEV | Delete the hardware registry key for the device. This is a key that exists in the \ENUM\ROOT branch. |
DIREG_DRV | Delete the software, or Driver, registry key for the device. This is a key that is in the HKLM\System\CurrentControlSet\Services\Class registry subkey. |
DIREG_BOTH | Delete both registry keys for the device. |