Click or drag to resize

Unlock

Relinquishes a device lock.

virtual HRESULT Unlock();
Return Value

Returns S_OK if successful, otherwise a failure HRESULT.

Remarks

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

Example

The following example demonstrates use of the Unlock function.

C++
// CoAcme4321.cpp
HRESULT Acme4321::OnFinalInitialize()
{
  HRESULT hr = S_OK;

  // Release previously obtained lock
  hr = io.Unlock();

  return hr;
}
See Also

Other Resources

Download a complete CHM version of this documentation here.