DirectDrawCreate (Windows CE 5.0)

Send Feedback

This function creates an instance of a DirectDraw object.

HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnknown FAR* pUnkOuter); 

Parameters

  • lpGUID
    [in] Address of the globally unique identifier (GUID) that represents the driver to be created.

    This can be NULL to indicate the active display driver, or you can pass one of the following flags to restrict the active display driver's behavior for debugging purposes.

    Flag Description
    DDCREATE_EMULATIONONLY Not supported in Microsoft® Windows® CE.
    DDCREATE_HARDWAREONLY The DirectDraw object will never emulate capabilities not supported by the hardware.

    Attempts to call methods that require unsupported capabilities will fail, returning DDERR_UNSUPPORTED.

  • lplpDD
    [out] Address of a variable that will be set to a valid IDirectDraw interface pointer if the call succeeds.

  • pUnkOuter
    [in] Allows for future compatibility with COM aggregation functionality. Currently, this method returns an error if this parameter is anything but NULL.

Return Values

If the function succeeds, the return value is DD_OK.

If the function fails, the return value may be one of the following error values:

Remarks

This function attempts to initialize a DirectDraw object, and if the call is successful it then sets a pointer to the object.

On systems with multiple monitors, specifying NULL for lpGUID causes the DirectDraw object to run in emulation mode when the normal cooperative level is set. To make use of hardware acceleration on these systems, you must specify the device's GUID.

DirectDraw on Windows CE only enumerates the GUID for the primary display adapter. It is not possible to use DirectDrawCreate on a nonprimary adapter in a multiple monitor system.

Requirements

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header: Ddraw.h.
Link Library: Ddraw.lib.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.