IDirectDraw7::Initialize method

Initializes a DirectDraw object that was created by using the CoCreateInstance COM function.

Syntax


HRESULT Initialize(
  [in] GUID FAR *lpGUID
);

Parameters

lpGUID [in]

A pointer to the globally unique identifier (GUID) that this method uses as the DirectDraw interface identifier.

Return value

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 you already used the DirectDrawCreate function to create a DirectDraw object, this method returns DDERR_ALREADYINITIALIZED. If you do not call IDirectDraw7::Initialize when you use CoCreateInstance to create a DirectDraw object, any method that you call afterward returns DDERR_NOTINITIALIZED.

Remarks

You must use LoadLibrary to explicitly link to Ddraw.dll and then use GetProcAddress to access the IDirectDraw7::Initialize method.

Requirements

Header

Ddraw.h

Library

Ddraw.lib

DLL

Ddraw.dll

See also

IDirectDraw7

 

 

Show: