Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDirect3DMobileDevice::TestCooperativeLevel

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This method reports the current cooperative-level status of the Microsoft® Direct3D Mobile® device for a windowed or full-screen application.


HRESULT TestCooperativeLevel();

None.

If the method succeeds, the return value is D3DM_OK (see D3DM Values).

If the method fails, the return value can be one of the following D3DMERR Values.

  • D3DMERR_DEVICELOST
  • D3DMERR_DEVICENOTRESET

If the device is lost but cannot be restored at the current time, IDirect3DMobileDevice::TestCooperativeLevel returns the D3DMERR_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 IDirect3DMobileDevice::TestCooperativeLevel until it receives a return value of D3DMERR_DEVICENOTRESET.

The application may then attempt to reset the device by calling IDirect3DMobileDevice::Reset and, if this succeeds, restoring the necessary resources and resume normal operation. Note that IDirect3DMobileDevice::Present will return D3DMERR_DEVICELOST if the device is either "lost" or "not reset."

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

Headerd3dm.h
LibraryD3dm.lib, D3dmguid.lib
Windows Embedded CEWindows CE 5.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2015 Microsoft