IDirect3DDeviceManager9::TestDevice method (dxva2api.h)

Tests whether a Direct3D device handle is valid.

Syntax

HRESULT TestDevice(
  [in] HANDLE hDevice
);

Parameters

[in] hDevice

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

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 device handle is valid.
E_HANDLE
The specified handle is not a Direct3D device handle.
DXVA2_E_NEW_VIDEO_DEVICE
The device handle is invalid.

Remarks

If the method returns DXVA2_E_NEW_VIDEO_DEVICE, call IDirect3DDeviceManager9::CloseDeviceHandle to close the handle and then call OpenDeviceHandle again to get a new handle. The IDirect3DDeviceManager9::ResetDevice method invalidates all open device handles.

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