IDirect3DDevice8::Reset

This method resets the type, size, and format of the swap chain.

HRESULT Reset(
  D3DPRESENT_PARAMETERS* pPresentationParameters
);

Parameters

  • pPresentationParameters
    [in] Pointer to a D3DPRESENT_PARAMETERS structure, describing the new presentation parameters. This value cannot be NULL.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following values:

  • D3DERR_INVALIDCALL
  • D3DERR_OUTOFVIDEOMEMORY
  • E_OUTOFMEMORY

Remarks

If a call to Reset fails, the device will be placed in the "lost" state (as indicated by a return value of D3DERR_DEVICELOST from a call to IDirect3DDevice8::TestCooperativeLevel) unless it is already in the "not reset" state (as indicated by a return value of D3DERR_DEVICENOTRESET from a call to IDirect3DDevice8::TestCooperativeLevel). Refer to IDirect3DDevice8::TestCooperativeLevel and Lost Devices for further information concerning the use of Reset in the context of lost devices.

Calling Reset causes all texture memory surfaces to be lost, managed textures to be flushed from video memory, and all state information to be lost. Before calling the Reset method for a device, an application should release any explicit render targets, depth stencil surfaces, additional swap chains and D3DPOOL_DEFAULT resources associated with the device.

The different types of swap chains are full-screen or windowed. If the new swap chain is full-screen, the adapter will be placed in the display mode that matches the new size.

DirectX 8.0 applications can expect messages to be sent to them during this call (for example, before this call is returned); applications should take precautions not to call into Direct3D at this time. In addition, when Reset fails, the only valid methods that can be called are Reset, IDirect3DDevice8::TestCooperativeLevel, and the various Release member functions. Calling any other method may result in an exception.

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

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8.h.
Link Library: D3d8.lib.

See Also

D3DSWAPEFFECT | IDirect3DDevice8::TestCooperativeLevel | IDirect3DDevice8::Present | D3DPRESENT_PARAMETERS | IDirect3DDevice8

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.