This documentation is archived and is not being maintained.

ISideShowClassExtension::Uninitialize method

Removes the registry entry for the Windows SideShow functional interface and performs other platform-related cleanup. After calling this method, subsequent calls to the OnProcessIoControl method will fail.

Syntax


HRESULT Uninitialize(
  [in, optional] IUnknown *pWdfDeviceUnknown
);

Parameters

pWdfDeviceUnknown [in, optional]

A pointer to the IUnknown interface. This method will query this interface for the IWdfDevice interface.

Return value

Uninitialize returns S_OK if the operation succeeds. If pWdfDeviceUnknown is NULL, it returns E_POINTER. Otherwise, this method returns one of the error codes that are defined in Winerror.h.

Remarks

The driver should call the Uninitialize methods on the class extension object to clean up the class extension before the driver exits.

This method should be called from the IDevicePnPCallback::OnReleaseHardware UMDFcallback, and the parameter passed in to Uninitialize should be the IWDFDevice interface pointer parameter from IDevicePnPCallback::OnReleaseHardware.

Warning   If Uninitialize is not called during the IDevicePnPCallback::OnReleaseHardware callback, there is a high likelihood of a reference count leak on the IWDFDevice interface. This leak can result in the driver's destructors never being called, and the driver being unloaded without proper uninitialization. Therefore, it is highly recommended that developers who are using the Windows SideShow class extension call the ISideShowClassExtension::Uninitialize method from the OnReleaseHardware UMDF callback.
 

Requirements

Target platform

Desktop

Header

Windowssideshowclassextension.h (include WindowsSideShowClassExtension.h)

See also

ISideShowDriver

 

 

Send comments about this topic to Microsoft

Show: