DiRemoveDevice


RETERR DiRemoveDevice(LPDEVICE_INFO lpdi)

Removes a device from the computer

lpdi

Pointer to a DEVICE_INFO struct for the device to be removed.

This function will remove the the device from the system, deleting both of its registry keys, and dynamically stoping the device if it has a Devnode. If the device cannot be dynamically stoped, then flags will be set in the lpdi->Flags field that will eventually cause the user to be prompted to shut the system down. The removal is either global to all configurations, or specific to one configuration depending on the content of the lpdi->lpClassInstallParams field.