Skip to content

Unlock

Relinquishes a device lock.

virtual HRESULT Unlock();

Returns S_OK if successful, otherwise a failure HRESULT.

This operation is used to relinquish the lock previously obtained using the Lock function.

The following example demonstrates use of the Unlock function.

CoAcme4321.cpp
HRESULT Acme4321::OnFinalInitialize()
{
HRESULT hr = S_OK;
// Release previously obtained lock
hr = io.Unlock();
return hr;
}