Compartilhar via


IDirect3DMobileDevice::Reset (Windows CE 5.0)

Send Feedback

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

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 Values

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 (as indicated by a return value of D3DMERR_DEVICELOST from a call to IDirect3DMobileDevice::TestCooperativeLevel) unless it is already in the "not reset" state (as indicated by a return value of D3DMERR_DEVICENOTRESET from a call to IDirect3DMobileDevice::TestCooperativeLevel).

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, IDirect3DMobileDevice::TestCooperativeLevel, 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

OS Versions: Windows CE 5.0 and later.
Header: D3dm.h.
Link Library: D3dm.lib, D3dmguid.lib.

See Also

IDirect3DMobileDevice | D3DMPRESENT_PARAMETERS | IDirect3DMobileDevice::TestCooperativeLevel | D3DMPOOL

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.