Export (0) Print
Expand All

IDirect3DDevice9Ex::CheckDeviceState method

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

Syntax


HRESULT CheckDeviceState(
  [in]  HWND hWindow
);

Parameters

hWindow [in]

Type: HWND

The destination window handle to check for occlusion. When this parameter is NULL, S_PRESENT_OCCLUDED is returned when another device has fullscreen ownership. When the window handle is not NULL, window's client area is checked for occlusion. A window is occluded if any part of it is obscured by another application.

Return value

Type: HRESULT

Possible return values include: D3D_OK, D3DERR_DEVICELOST, D3DERR_DEVICEHUNG, D3DERR_DEVICEREMOVED, or D3DERR_OUTOFVIDEOMEMORY (see D3DERR), or S_PRESENT_MODE_CHANGED, or S_PRESENT_OCCLUDED (see S_PRESENT).

Remarks

This method replaces IDirect3DDevice9::TestCooperativeLevel, which always returns S_OK in Direct3D 9Ex applications.

We recommend not to call CheckDeviceState every frame. Instead, call CheckDeviceState only if the IDirect3DDevice9Ex::PresentEx method returns a failure code.

See Lost Device Behavior Changes for more information about lost, hung, and removed devices.

Requirements

Header

D3d9.h

Library

D3D9.lib

See also

IDirect3DDevice9Ex

 

 

Community Additions

ADD
Show:
© 2014 Microsoft