IPnpCallback::OnSurpriseRemoval method

[Applies to UMDF 1.x only]

The OnSurpriseRemoval method notifies a driver after a device is removed from a computer unexpectedly so that the driver can perform necessary operations.

Syntax


void OnSurpriseRemoval(
  [in]  IWDFDevice *pWdfDevice
);

Parameters

pWdfDevice [in]

A pointer to the IWDFDevice interface for the device object of the device that is removed unexpectedly.

Return value

None

Remarks

A driver registers the IPnpCallback interface when the driver calls the IWDFDriver::CreateDevice method to create a device object.

The framework does not synchronize the OnSurpriseRemoval callback function with other PnP and power management callback functions.

For more information about when the framework calls this callback function, and for more information about synchronization issues, see A User Unplugs a Device.

Requirements

Header

Wudfddi.h (include Wudfddi.h)

See also

IPnpCallback
IWDFDevice
IWDFDriver::CreateDevice

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft