IDirect3DDeviceManager9::UnlockDevice method (dxva2api.h)

Unlocks the Direct3D device. Call this method to release the device after calling IDirect3DDeviceManager9::LockDevice.

Syntax

HRESULT UnlockDevice(
  [in] HANDLE hDevice,
  [in] BOOL   fSaveState
);

Parameters

[in] hDevice

Handle to the Direct3D device. To get the device handle, call IDirect3DDeviceManager9::OpenDeviceHandle.

[in] fSaveState

If TRUE, the method saves the Direct3D device state in a state block. Internally, the method uses the Direct3D IDirect3DStateBlock9 interface to save the device state. The next time you call LockDevice with the same device handle, the state block is restored.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
E_INVALIDARG
The specified device handle is not locked, or is not a valid handle.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header dxva2api.h

See also

Direct3D Device Manager

IDirect3DDeviceManager9