次の方法で共有


Manager.CheckDeviceFormatConversion Method

Tests a device to determine whether it supports conversion from one display format to another.

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

Syntax

'Declaration
Public Shared Function CheckDeviceFormatConversion ( _
    adapter As Integer, _
    deviceType As DeviceType, _
    sourceFormat As Format, _
    destFormat As Format _
) As Boolean
'Usage
Dim adapter As Integer
Dim deviceType As DeviceType
Dim sourceFormat As Format
Dim destFormat As Format
Dim returnValue As Boolean

returnValue = Manager.CheckDeviceFormatConversion(adapter, deviceType, sourceFormat, destFormat)
public static bool CheckDeviceFormatConversion (
    int adapter,
    DeviceType deviceType,
    Format sourceFormat,
    Format destFormat
)
public:
static bool CheckDeviceFormatConversion (
    int adapter, 
    DeviceType deviceType, 
    Format sourceFormat, 
    Format destFormat
)
public static boolean CheckDeviceFormatConversion (
    int adapter, 
    DeviceType deviceType, 
    Format sourceFormat, 
    Format destFormat
)
public static function CheckDeviceFormatConversion (
    adapter : int, 
    deviceType : DeviceType, 
    sourceFormat : Format, 
    destFormat : Format
) : boolean

Parameters

  • deviceType
    Member of the DeviceType enumeration that identifies the device type.
  • sourceFormat
    Member of the Format enumeration that identifies the source adapter format.
  • destFormat
    Member of the Format enumeration that identifies the target adapter format.

Return Value

true if the method succeeds; otherwise, false.

Remarks

Using CheckDeviceType to test for compatibility between a back buffer and the display format returns appropriate values. This means that the call reflects device capabilities. If the device cannot render to the requested back buffer format, the call still returns NotAvailable from the ResultCode enumeration. If the device can render to the format but cannot perform the color-converting presentation, the return value is also NotAvailable. Applications can discover hardware support for the presentation itself by calling CheckDeviceFormatConversion. No software emulation for the color-converting presentation itself is offered.

CheckDeviceFormatConversion also can be used to determine which combinations of source surface formats and destination surface formats are permissible in calls to Device.StretchRectangle.

The color conversion source format must be a four-character code (FOURCC) format or a valid back buffer format. The target format must be one of the following unsigned formats:

X1R5G5B5

X1R5G5B5

R5G6B5

R8G8B8

R8G8B8

A8R8G8B8

.NET Framework Security

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Platforms

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

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

Version Information

.NET Compact Framework

Supported in: 2.0

See Also

Reference

Manager Class
Manager Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace