Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The DirectDrawCreatefunction creates an instance of a DirectDraw object.
HRESULT WINAPI DirectDrawCreate( GUID FAR * lpGUID , LPDIRECTDRAW FAR * lplpDD , IUnknown FAR * pUnkOuter );
Parameters
DDCREATE_EMULATIONONLY | The DirectDraw object will use emulation for all features; it will not take advantage of any hardware supported features. |
DDCREATE_HARDWAREONLY | The DirectDraw object will never emulate features not supported by the hardware. Attempts to call methods that require unsupported features will fail, returning DDERR_UNSUPPORTED. |
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:
DDERR_DIRECTDRAWALREADYCREATED |
DDERR_GENERIC |
DDERR_INVALIDDIRECTDRAWGUID |
DDERR_INVALIDPARAMS |
DDERR_NODIRECTDRAWHW |
DDERR_OUTOFMEMORY |
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 lpGUIDcauses 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.
Requirements
Runs on | Versions | Declared in | Link to |
---|---|---|---|
Windows CE OS | 2.12 or later. Version 2.12 requires DXPAK 1.0 or later. | ddraw.h | ddraw.lib |