HRESULT DirectDrawCreate(GUID FAR * lpGUID,
LPDIRECTDRAW FAR * lplpDD, IUnknown FAR * pUnkOuter);
Creates an instance of a DirectDraw object.
·Returns DD_OK if successful, or one of the following error values otherwise:
DDERR_DIRECTDRAWALREADYCREATED
lpGUID
Address of the globally unique identifier (GUID) that represents the driver to be created. NULL is always the active display driver.
lplpDD
Address of a pointer that will be initialized with a valid DirectDraw pointer if the call succeeds.
pUnkOuter
Allows for future compatibility with COM aggregation features. Presently, however, DirectDrawCreate returns an error if this parameter is anything but NULL.
This function attempts to initialize a DirectDraw object, and it then sets a pointer to the object if the call is successful. Calling the IDirectDraw2::GetCaps method immediately after initialization is advised to determine to what extent this object is hardware accelerated.