Platform SDK: DirectX |
The IDirectDraw7::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 it fails, the method can return 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). If the DirectDrawCreate function was used to create a DirectDraw object, this method returns DDERR_ALREADYINITIALIZED. If IDirectDraw7::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 IDirectDraw7::Initialize with CoCreateInstance, see Creating DirectDraw Objects by Using CoCreateInstance.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in ddraw.h.