UsbPm_Deregister function (usbpmapi.h)

Unregisters the client driver with the Policy Manager.

Syntax

NTSTATUS UsbPm_Deregister(
  [In] USBPM_CLIENT ClientHandle
);

Parameters

[In] ClientHandle

The handle that the client driver received in a previous call to UsbPm_Register.

Return value

Returns STATUS_SUCCESS if the operation succeeds. Otherwise, returns an appropriate NTSTATUS value.

Remarks

[UsbPm_Deregister] does not return until all outstanding calls to the client driver's callback functions are returned. After UsbPm_Deregister returns, Policy Manager no longer invokes callback functions on the same handle.

The driver typically calls UsbPm_Register in the driver's EVT_WDF_DEVICE_SELF_MANAGED_IO_INIT and unregisters in EVT_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP by calling UsbPm_Deregister.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809
Minimum KMDF version 1.27
Minimum UMDF version 2.27
Header usbpmapi.h
Library UsbPmApi.lib
IRQL PASSIVE_LEVEL

See also

UsbPm_Register