DirectDrawCreateClipper function

Creates an instance of a DirectDrawClipper object that is not associated with a DirectDraw object.

Syntax


HRESULT WINAPI DirectDrawCreateClipper(
  _In_  DWORD                   dwFlags,
  _Out_ LPDIRECTDRAWCLIPPER FAR *lplpDDClipper,
  _In_  IUnknown FAR            *pUnkOuter
);

Parameters

dwFlags [in]

Currently not used and must be set to 0.

lplpDDClipper [out]

Address of a pointer to be filled with the address of the new DirectDrawClipper object.

pUnkOuter [in]

Allows for future compatibility with COM aggregation features. Currently, this function returns an error if this parameter is not NULL.

Return value

If the function succeeds, the return value is DD_OK.

If it fails, the function can return one of the following error values:

  • DDERR_INVALIDPARAMS
  • DDERR_OUTOFMEMORY

Remarks

You can call DirectDrawCreateClipper before any DirectDraw objects are created. Because these DirectDrawClipper objects are not owned by any DirectDraw object, they are not automatically released when an application's objects are released. If the application does not explicitly release the DirectDrawClipper objects, DirectDraw releases them when the application terminates.

To create a DirectDrawClipper object that is owned by a specific DirectDraw object, use the IDirectDraw7::CreateClipper method.

You must use LoadLibrary to explicitly link to Ddraw.dll and then use GetProcAddress to access the DirectDrawCreateClipper function.

Requirements

Header

Ddraw.h

Library

Ddraw.lib

DLL

Ddraw.dll

 

 

Show: