Click to Rate and Give Feedback
MSDN
MSDN Library
DirectX
SDK Documentation
DirectX Graphics
Direct3D 9
Reference
Direct3D Reference
Interfaces
IDirect3DDevice9
 IDirect3DDevice9::TestCooperativeLe...

  Switch on low bandwidth view
IDirect3DDevice9::TestCooperativeLevel
Bb174472.XDK_CHM_BANNER_left(en-us,VS.85).jpgBb174472.XDK_CHM_BANNER_right(en-us,VS.85).jpg

IDirect3DDevice9::TestCooperativeLevel

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

HRESULT TestCooperativeLevel();

Parameters

None.

Return Values

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.

Requirements

Header: Declared in D3D9.h.

Library: Use D3D9.lib.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker