Windows apps
Collapse the table of content
Expand the table of content
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.

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

 

 

Show:
© 2017 Microsoft