Export (0) Print
Expand All

IDirect3DDeviceManager9::ResetDevice method

Sets the Direct3D device or notifies the device manager that the Direct3D device was reset.

Syntax


HRESULT ResetDevice(
  [in]  IDirect3DDevice9 *pDevice,
  [in]  UINT resetToken
);

Parameters

pDevice [in]

Pointer to the IDirect3DDevice9 interface of the Direct3D device.

resetToken [in]

Token received in the pResetToken parameter of the DXVA2CreateDirect3DDeviceManager9 function.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The method succeeded.

E_INVALIDARG

Invalid token

D3DERR_INVALIDCALL

Direct3D device error.

 

Remarks

When you first create the Direct3D device manager, call this method with a pointer to the Direct3D device. The device manager does not create the device; the caller must provide the device pointer initially.

Also call this method if the Direct3D device becomes lost and you need to reset the device or create a new device. This occurs if IDirect3DDevice9::TestCooperativeLevel returns D3DERR_DEVICELOST or D3DERR_DEVICENOTRESET. For more information about lost devices, see the Direct3D documentation.

The resetToken parameter ensures that only the component which originally created the device manager can invalidate the current device.

If this method succeeds, all open device handles become invalid.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Dxva2api.h

See also

IDirect3DDeviceManager9
Direct3D Device Manager

 

 

Community Additions

ADD
Show:
© 2014 Microsoft