The IDirectDraw4::Initialize method initializes a DirectDraw object that was created by using the CoCreateInstance COM function.
HRESULT Initialize(
GUID FAR *lpGUID
);
If the method succeeds, the return value is DD_OK.
If the method fails, the return value may be one of the following error values:
DDERR_ALREADYINITIALIZED |
DDERR_DIRECTDRAWALREADYCREATED |
DDERR_GENERIC |
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_NODIRECTDRAWHW |
DDERR_NODIRECTDRAWSUPPORT |
DDERR_OUTOFMEMORY |
This method is provided for compliance with the Component Object Model (COM) protocol. If the DirectDrawCreate function was used to create a DirectDraw object, this method returns DDERR_ALREADYINITIALIZED. If IDirectDraw4::Initialize is not called when using CoCreateInstance to create a DirectDraw object, any method that is called afterward returns DDERR_NOTINITIALIZED.
For more information about using IDirectDraw4::Initialize with CoCreateInstance, see Creating DirectDraw Objects by Using CoCreateInstance.
Windows NT/2000: Requires Windows 2000.
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.