1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-22 16:46:16 +01:00
cnc-ddraw/src/ddclipper.c
2021-06-11 20:30:43 +02:00

25 lines
585 B
C

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "IDirectDrawClipper.h"
#include "ddclipper.h"
#include "debug.h"
HRESULT dd_CreateClipper(DWORD dwFlags, IDirectDrawClipperImpl** lplpDDClipper, IUnknown FAR* pUnkOuter)
{
if (!lplpDDClipper)
return DDERR_INVALIDPARAMS;
IDirectDrawClipperImpl* c =
(IDirectDrawClipperImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawClipperImpl));
TRACE(" clipper = %p\n", c);
c->lpVtbl = &g_ddc_vtbl;
IDirectDrawClipper_AddRef(c);
*lplpDDClipper = c;
return DD_OK;
}