Skip to content

Latest commit

 

History

History
73 lines (59 loc) · 3.59 KB

nf-d3d9-idirect3ddevice9-testcooperativelevel.md

File metadata and controls

73 lines (59 loc) · 3.59 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:d3d9.IDirect3DDevice9.TestCooperativeLevel
IDirect3DDevice9::TestCooperativeLevel (d3d9.h)
The IDirect3DDevice9::TestCooperativeLevel method (d3d9.h) reports the current cooperative-level status of the Direct3D device for a windowed or full-screen application.
613a6a7b-3b6f-b565-1f3a-2b5322844deb
IDirect3DDevice9 interface [Direct3D 9]
TestCooperativeLevel method
IDirect3DDevice9.TestCooperativeLevel
IDirect3DDevice9::TestCooperativeLevel
TestCooperativeLevel
TestCooperativeLevel method [Direct3D 9]
TestCooperativeLevel method [Direct3D 9]
IDirect3DDevice9 interface
d3d9helper/IDirect3DDevice9::TestCooperativeLevel
direct3d9.idirect3ddevice9__testcooperativelevel
direct3d9\idirect3ddevice9__testcooperativelevel.htm
direct3d9
VS|directx_sdk|~\idirect3ddevice9__testcooperativelevel.htm
08/11/2022
613a6a7b-3b6f-b565-1f3a-2b5322844deb, IDirect3DDevice9 interface [Direct3D 9],TestCooperativeLevel method, IDirect3DDevice9.TestCooperativeLevel, IDirect3DDevice9::TestCooperativeLevel, TestCooperativeLevel, TestCooperativeLevel method [Direct3D 9], TestCooperativeLevel method [Direct3D 9],IDirect3DDevice9 interface, d3d9helper/IDirect3DDevice9::TestCooperativeLevel, direct3d9.idirect3ddevice9__testcooperativelevel
d3d9.h
D3D9.h
Windows
D3D9.lib
Windows
19H1
IDirect3DDevice9::TestCooperativeLevel
d3d9/IDirect3DDevice9::TestCooperativeLevel
c++
APIRef
kbSyntax
COM
D3D9.lib
D3D9.dll
IDirect3DDevice9.TestCooperativeLevel

IDirect3DDevice9::TestCooperativeLevel

-description

Reports the current cooperative-level status of the Direct3D device for a windowed or full-screen application.

-returns

Type: HRESULT

If the method succeeds, the return value is D3D_OK, indicating that the device is operational and the calling application can continue. If the method fails, the return value can be one of the following values: D3DERR_DEVICELOST, D3DERR_DEVICENOTRESET, D3DERR_DRIVERINTERNALERROR.

-remarks

If the device is lost but cannot be restored at the current time, IDirect3DDevice9::TestCooperativeLevel returns the D3DERR_DEVICELOST return code. This would be the case, for example, when a full-screen device has lost focus. If an application detects a lost device, it should pause and periodically call IDirect3DDevice9::TestCooperativeLevel until it receives a return value of D3DERR_DEVICENOTRESET. The application may then attempt to reset the device by calling IDirect3DDevice9::Reset and, if this succeeds, restore the necessary resources and resume normal operation. Note that IDirect3DDevice9::Present will return D3DERR_DEVICELOST if the device is either "lost" or "not reset".

A call to IDirect3DDevice9::TestCooperativeLevel will fail if called on a different thread than that used to create the device being reset.

-see-also

IDirect3DDevice9