Partager via


IDirect3DMobile::CreateDevice (Windows CE 5.0)

Send Feedback

This method is used to create a Direct3D Mobile device object and obtain a pointer to an IDirect3DMobileDevice interface to it.

HRESULT CreateDevice(  UINT Adapter,  D3DMDEVTYPE DeviceType,  HWND hFocusWindow,  ULONG BehaviorFlags,  D3DMPRESENT_PARAMETERS* pPresentationParameters,  IDirect3DMobileDevice** ppReturnedDeviceInterface);

Parameters

  • Adapter
    [in] A value indicting which device to provide information for. For possible values, see D3DMADAPTER Values.
  • DeviceType
    [in] A D3DMDEVTYPE enumeration value that specifies the type of device.
  • hFocusWindow
    [in] An HWND value that is a handle to the window that will be the focus for Direct3D Mobile operations. This window remains the focus until the device object is destroyed. This can only be a window without a parent window.
  • BehaviorFlags
    [in] A ULONG value to control the multithreading behavior of the device. To enable multithreading support, set this value to D3DMCREATE_MULTITHREADED.
  • pPresentationParameters
    [in] A pointer to a D3DMPRESENT_PARAMETERS structure describing the properties of the swap that is implicitly created when the device is created.
  • ppReturnedDeviceInterface
    [out] A pointer to the IDirect3DMobileDevice pointer for the device.

Return Values

If the device was created successfully, this method returns D3DM_OK. If the device was not created successfully, it returns one of the following error values:

  • D3DMERR_INVALIDCALL
  • D3DMERR_INVALIDDEVICE
  • D3DMERR_NOTAVAILABLE
  • E_OUTOFMEMORY

For more information, see D3DMERR Values.

Requirements

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

See Also

IDirect3DMobile | D3DMADAPTER Values | D3DMDEVTYPE | D3DMPRESENT_PARAMETERS

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.