Share via


IDirect3DMobileDevice::Reset

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Syntax

HRESULT Reset(
  D3DMPRESENT_PARAMETERS* pPresentationParameters
);

Parameters

  • pPresentationParameters
    [in] Pointer to a D3DMPRESENT_PARAMETERS structure that describes the new presentation parameters. This value cannot be NULL.

Return Value

If the method succeeds, the return value is D3DM_OK (see D3DM Values).

If the method fails, the return value can E_OUTOFMEMORY, or one of the following D3DMERR Values.

  • D3DMERR_INVALIDCALL
  • D3DMERR_MEMORYPOOLEMPTY

Remarks

If a call to Reset fails, the device will be placed in the "lost" state unless it is already in the "not reset" state.

Calling IDirect3DMobileDevice::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 IDirect3DMobileDevice::Reset method for a device, an application should release any explicit render targets, depth stencil surfaces, additional swap chains, and D3DMPOOL 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.

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 Mobile at this time. In addition, when IDirect3DMobileDevice::Reset fails, the only valid methods that can be called are IDirect3DMobileDevice::Reset and the various Release member functions. Calling any other method may result in an exception.

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

Requirements

Header d3dm.h
Library D3dm.lib, D3dmguid.lib
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IDirect3DMobileDevice
D3DMPRESENT_PARAMETERS
IDirect3DMobileDevice::TestCooperativeLevel
D3DMPOOL