Compartilhar via


Device.Reset Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Resets the presentation parameters for the current device.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Sub Reset ( _
    presentationParameters As PresentParameters _
)
'Usage
Dim instance As Device
Dim presentationParameters As PresentParameters

instance.Reset(presentationParameters)
public void Reset(
    PresentParameters presentationParameters
)
public:
void Reset(
    PresentParameters^ presentationParameters
)
member Reset : 
        presentationParameters:PresentParameters -> unit 

Parameters

Exceptions

Exception Condition
InvalidCallException

The method call is invalid. For example, a parameter might contain an invalid value.

DriverInternalErrorException

Internal driver error. Applications should generally shut down when receiving this error.

OutOfMemoryException

Direct3D could not allocate sufficient memory to complete the call.

Remarks

When switching to full-screen mode, Direct3D tries to find a desktop format that matches the back buffer format so that back and front buffer formats are identical. This eliminates the need for color conversion.

If a call to Reset fails, the device is placed in the "lost" state as indicated by a return value of false from a call to CheckCooperativeLevel, unless it is already in the "not reset" state as indicated by a DeviceNotReset returned from the hResult parameter of the CheckCooperativeLevel method.

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

Swap chains are either full-screen or windowed. If the new swap chain is full-screen, the adapter is placed in the display mode that matches the new size.

A call to Reset fails if made on a different thread than the one used to create the device being reset.

You can specify "unknown" for the windowed mode back buffer format when you call Device, Reset, and SwapChain. This means that the application does not have to query the current desktop format before calling Device for windowed mode. For full-screen mode, you must specify the back buffer format. Setting BackBufferCount to 0 creates one back buffer.

When trying to reset more than one display adapter in a group, pass in an array of PresentParameters objects, one for each display in the adapter group.

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Device Class

Device Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace