IDirect3DMobileDevice::Reset

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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


HRESULT Reset(
  D3DMPRESENT_PARAMETERS* pPresentationParameters
);

pPresentationParameters

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

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

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.

Headerd3dm.h
LibraryD3dm.lib, D3dmguid.lib
Windows Embedded CEWindows CE 5.0 and later
Windows MobileWindows Mobile Version 5.0 and later
Show: