Share via


IDirect3DDeviceManager9::TestDevice Method

Tests whether a Direct3D device handle is valid.

Syntax

HRESULT TestDevice(
  [in]  HANDLE hDevice
);

Parameter

Rückgabewert

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

Rückgabecode Beschreibung
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.

 

Hinweise

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.

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Dxva2api.h

Siehe auch

IDirect3DDeviceManager9

Direct3D Device Manager