Partager via


IDirect3DDevice9Ex::CheckDeviceState 

IDirect3DDevice9Ex::CheckDeviceState

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

  HRESULT 
  CheckDeviceState(
  HWND hWindow
);

Parameters

  • hWindow
    [in] 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 Values

S_OK the device is ok for rendering.

S_PRESENT_MODE_CHANGED the display mode has changed.

S_PRESENT_OCCLUDED the window is occluded.

D3DERR_DEVICELOST the device has been lost.

D3DERR_DEVICEHUNG if the device is hung.

D3DERR_DEVICEREMOVED if the device has been removed.

See Device State Return Codes for more information about these Return codes. See Lost Device Behavior Changes for more information about lost, hung, and removed devices.

Remarks

This method replaces IDirect3DDevice9::TestCooperativeLevel.

See Also

Lost Device Behavior Changes