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
Not applicable.
Parameters
- adapter
Ordinal number that denotes the display adapter to query. AdapterListCollection.Default is always the primary display adapter.
- 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 |
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Manager Class
Manager Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace