DeactivateDevice

This function unloads the driver for the specified device, deletes the active key of the device from the registry, sends a WM_DEVICECHANGE message, and triggers a NOTIFICATION_EVENT_DEVICE_CHANGE.

At a Glance

Header file: Winbase.h
Windows CE versions: 2.11 and later

Syntax

BOOL DeactivateDevice(HANDLE hDevice);

Parameter

hDevice

Handle to a active device. This handle is returned by a call to the ActivateDevice function.

Return Values

Nonzero indicates success. Zero indicates failure.