OpenDeviceHandle
Collapse the table of content
Expand the table of content

IDirect3DDeviceManager9::OpenDeviceHandle method

Gets a handle to the Direct3D device.

Syntax


HRESULT OpenDeviceHandle(
  [out] HANDLE *phDevice
);

Parameters

phDevice [out]

Receives the device handle.

Return value

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

Return codeDescription
S_OK

The method succeeded.

DXVA2_E_NOT_INITIALIZED

The Direct3D device manager was not initialized. The owner of the device must call IDirect3DDeviceManager9::ResetDevice.

 

Remarks

To get the Direct3D device's IDirect3DDevice9 pointer, call IDirect3DDeviceManager9::LockDevice with the handle returned in phDevice. Close the device handle when you are done using it, by calling IDirect3DDeviceManager9::CloseDeviceHandle.

To test whether a device handle is still valid, call IDirect3DDeviceManager9::TestDevice.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Dxva2api.h

See also

IDirect3DDeviceManager9
Direct3D Device Manager

 

 

Show:
© 2016 Microsoft