ISensorClassExtension::Uninitialize method (sensorsclassextension.h)

The ISensorClassExtension::Uninitialize method uninitializes the sensor class extension object.

Syntax

HRESULT Uninitialize();

Parameters

This method has no parameters.

Return value

This method returns an HRESULT. Possible values include, but are not limited to, one of the following values.

Return code Description
S_OK The method succeeded.
HRESULT_FROM_WIN32(ERROR_CAN_NOT_COMPLETE) The class extension is not initialized.

Remarks

Typically, you will uninitialize the sensor class extension when the driver is unloading. We recommend that you perform uninitialization steps when called by UMDF in IPnpCallbackHardware::OnReleaseHardware.

If you must, for some reason, otherwise release and uninitialize the sensor class extension, you must call IWDFIoQueue::DrainSynchronously before calling ISensorClassExtension::Uninitialize. You can retrieve the queue interface by calling IWDFDevice::GetDefaultIoQueue on the WDF device object. Then, call IWDFIoQueue::DrainSynchronously to process all the queued requests. Calling IWDFIoQueue::DrainSynchronously blocks the queuing of new requests, so you must call IWDFIoQueue::Start after you reinitialize the class extension.

Requirements

   
Target Platform Windows
Header sensorsclassextension.h
Library SensorsClassExtension.lib

See also

ISensorClassExtension