ReactOS  0.4.15-dev-494-g1d8c567
connpt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

HRESULT CreateConnectionPoint (IUnknown *pUnk, REFIID riid, IConnectionPoint **pCP) DECLSPEC_HIDDEN
 

Function Documentation

◆ CreateConnectionPoint()

HRESULT CreateConnectionPoint ( IUnknown pUnk,
REFIID  riid,
IConnectionPoint **  pCP 
)

Definition at line 572 of file connpt.c.

574 {
576 
577  TRACE("(%p %s %p)\n", pUnk, debugstr_guid(riid), pCP);
578 
579  *pCP = NULL;
580  Obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*Obj));
581  if (!Obj)
582  return E_OUTOFMEMORY;
583 
584  Obj->IConnectionPoint_iface.lpVtbl = &ConnectionPointImpl_VTable;
585  Obj->Obj = pUnk;
586  Obj->ref = 1;
587  Obj->iid = *riid;
588  Obj->maxSinks = MAXSINKS;
590  Obj->nSinks = 0;
591 
592  *pCP = &Obj->IConnectionPoint_iface;
593  return S_OK;
594 }
REFIID riid
Definition: precomp.h:44
Obj()
Definition: swap_test.cpp:67
#define MAXSINKS
Definition: connpt.c:44
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:404
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IConnectionPointVtbl ConnectionPointImpl_VTable
Definition: connpt.c:325
#define S_OK
Definition: intsafe.h:59
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30

Referenced by OLEFontImpl_Clone(), OLEFontImpl_Construct(), and OLEPictureImpl_Construct().