Platform SDK: DirectX |
The DirectDrawCreate function creates an instance of a DirectDraw object. A DirectDraw object created with this function does not support the newest set of Direct3D interfaces. To create a DirectDraw object capable of exposing the new features of Direct3D, use the DirectDrawCreateEx function.
HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
If the function succeeds, the return value is DD_OK.
If it fails, the function can return one of the following error values:
DDERR_DIRECTDRAWALREADYCREATED |
DDERR_GENERIC |
DDERR_INVALIDDIRECTDRAWGUID |
DDERR_INVALIDPARAMS |
DDERR_NODIRECTDRAWHW |
DDERR_OUTOFMEMORY |
This function attempts to initialize a DirectDraw object, and then sets a pointer to the object if the call succeeds.
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, specify the device's GUID. For more information, see Devices and Acceleration in MultiMon Systems.
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in ddraw.h.
Import Library: Use ddraw.lib.