ReactOS 0.4.17-dev-540-g8f54750
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)
 

Function Documentation

◆ CreateConnectionPoint()

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

Definition at line 482 of file connpt.c.

484{
486
487 TRACE("(%p %s %p)\n", pUnk, debugstr_guid(riid), pCP);
488
489 *pCP = NULL;
490 Obj = malloc(sizeof(*Obj));
491 if (!Obj)
492 return E_OUTOFMEMORY;
493
494 Obj->IConnectionPoint_iface.lpVtbl = &ConnectionPointImpl_VTable;
495 Obj->Obj = pUnk;
496 Obj->ref = 1;
497 Obj->iid = *riid;
498 Obj->maxSinks = MAXSINKS;
499 Obj->sinks = calloc(MAXSINKS, sizeof(IUnknown*));
500 Obj->nSinks = 0;
501
502 *pCP = &Obj->IConnectionPoint_iface;
503 return S_OK;
504}
Obj()
Definition: swap_test.cpp:67
static const IConnectionPointVtbl ConnectionPointImpl_VTable
Definition: connpt.c:281
#define MAXSINKS
Definition: connpt.c:44
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define calloc
Definition: rosglue.h:14
#define TRACE(s)
Definition: solgame.cpp:4

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