#include <assert.h>
#include <stdarg.h>
#include <string.h>
#include "winerror.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "ole2.h"
#include "olectl.h"
#include "connpt.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| | WINE_DEFAULT_DEBUG_CHANNEL (ole) |
| |
| static EnumConnectionsImpl * | EnumConnectionsImpl_Construct (IUnknown *pUnk, DWORD nSinks, CONNECTDATA *pCD) |
| |
| static ConnectionPointImpl * | impl_from_IConnectionPoint (IConnectionPoint *iface) |
| |
| static EnumConnectionsImpl * | impl_from_IEnumConnections (IEnumConnections *iface) |
| |
| static void | ConnectionPointImpl_Destroy (ConnectionPointImpl *Obj) |
| |
| static HRESULT WINAPI | ConnectionPointImpl_QueryInterface (IConnectionPoint *iface, REFIID riid, void **ppvObject) |
| |
| static ULONG WINAPI | ConnectionPointImpl_AddRef (IConnectionPoint *iface) |
| |
| static ULONG WINAPI | ConnectionPointImpl_Release (IConnectionPoint *iface) |
| |
| static HRESULT WINAPI | ConnectionPointImpl_GetConnectionInterface (IConnectionPoint *iface, IID *piid) |
| |
| static HRESULT WINAPI | ConnectionPointImpl_GetConnectionPointContainer (IConnectionPoint *iface, IConnectionPointContainer **ppCPC) |
| |
| static HRESULT WINAPI | ConnectionPointImpl_Advise (IConnectionPoint *iface, IUnknown *lpUnk, DWORD *pdwCookie) |
| |
| static HRESULT WINAPI | ConnectionPointImpl_Unadvise (IConnectionPoint *iface, DWORD dwCookie) |
| |
| static HRESULT WINAPI | ConnectionPointImpl_EnumConnections (IConnectionPoint *iface, IEnumConnections **ppEnum) |
| |
| static void | EnumConnectionsImpl_Destroy (EnumConnectionsImpl *Obj) |
| |
| static HRESULT WINAPI | EnumConnectionsImpl_QueryInterface (IEnumConnections *iface, REFIID riid, void **ppvObject) |
| |
| static ULONG WINAPI | EnumConnectionsImpl_AddRef (IEnumConnections *iface) |
| |
| static ULONG WINAPI | EnumConnectionsImpl_Release (IEnumConnections *iface) |
| |
| static HRESULT WINAPI | EnumConnectionsImpl_Next (IEnumConnections *iface, ULONG cConn, LPCONNECTDATA pCD, ULONG *pEnum) |
| |
| static HRESULT WINAPI | EnumConnectionsImpl_Skip (IEnumConnections *iface, ULONG cSkip) |
| |
| static HRESULT WINAPI | EnumConnectionsImpl_Reset (IEnumConnections *iface) |
| |
| static HRESULT WINAPI | EnumConnectionsImpl_Clone (IEnumConnections *iface, IEnumConnections **ppEnum) |
| |
| HRESULT | CreateConnectionPoint (IUnknown *pUnk, REFIID riid, IConnectionPoint **pCP) |
| |
◆ COBJMACROS
◆ MAXSINKS
◆ ConnectionPointImpl
◆ EnumConnectionsImpl
◆ ConnectionPointImpl_AddRef()
Definition at line 155 of file connpt.c.
156{
159
160 TRACE(
"%p, refcount %lu.\n", iface, refCount);
161
162 return refCount;
163}
#define InterlockedIncrement
static ConnectionPointImpl * impl_from_IConnectionPoint(IConnectionPoint *iface)
◆ ConnectionPointImpl_Advise()
Definition at line 198 of file connpt.c.
201{
205 TRACE(
"(%p)->(%p, %p)\n",
This, lpUnk, pdwCookie);
206
207 *pdwCookie = 0;
208 if(
FAILED(IUnknown_QueryInterface(lpUnk, &
This->iid, (
void**)&lpSink)))
210
211 for(
i = 0;
i <
This->maxSinks;
i++) {
213 break;
214 }
215 if(
i ==
This->maxSinks) {
219 }
220 This->sinks[
i] = lpSink;
224}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define CONNECT_E_CANNOTCONNECT
◆ ConnectionPointImpl_Destroy()
◆ ConnectionPointImpl_EnumConnections()
Definition at line 243 of file connpt.c.
244{
246 CONNECTDATA *pCD;
250
252
254
256
257 pCD =
malloc(
sizeof(CONNECTDATA) *
This->nSinks);
258
259 for(
i = 0, nextslot = 0;
i <
This->maxSinks;
i++) {
261 pCD[nextslot].pUnk =
This->sinks[
i];
262 pCD[nextslot].dwCookie =
i + 1;
263 nextslot++;
264 }
265 }
267
268
269
270 IConnectionPoint_AddRef(iface);
271
276
279}
static EnumConnectionsImpl * EnumConnectionsImpl_Construct(IUnknown *pUnk, DWORD nSinks, CONNECTDATA *pCD)
const GUID IID_IEnumConnections
IEnumConnections IEnumConnections_iface
#define OLE_E_NOCONNECTION
◆ ConnectionPointImpl_GetConnectionInterface()
◆ ConnectionPointImpl_GetConnectionPointContainer()
Definition at line 188 of file connpt.c.
191{
194
196}
const GUID IID_IConnectionPointContainer
◆ ConnectionPointImpl_QueryInterface()
Definition at line 118 of file connpt.c.
122{
125
126
127
128
129 if (!ppvObject)
131
132
133
134
135 *ppvObject = 0;
136
137
139 *ppvObject = iface;
140
141
142
143
144 if ((*ppvObject)==0)
145 {
148 }
149
150 IUnknown_AddRef((
IUnknown*)*ppvObject);
151
153}
const GUID IID_IConnectionPoint
#define IsEqualIID(riid1, riid2)
◆ ConnectionPointImpl_Release()
Definition at line 165 of file connpt.c.
167{
170
171 TRACE(
"%p, refcount %lu.\n", iface, refCount);
172
174
175 return refCount;
176}
#define InterlockedDecrement
static void ConnectionPointImpl_Destroy(ConnectionPointImpl *Obj)
◆ ConnectionPointImpl_Unadvise()
Definition at line 227 of file connpt.c.
228{
230
231 TRACE(
"%p, %#lx.\n", iface, dwCookie);
232
234
236
237 IUnknown_Release(
This->sinks[dwCookie-1]);
241}
#define CONNECT_E_NOCONNECTION
◆ CreateConnectionPoint()
◆ EnumConnectionsImpl_AddRef()
Definition at line 365 of file connpt.c.
366{
369
370 TRACE(
"%p, refcount %lu.\n", iface, refCount);
371
372 IUnknown_AddRef(
This->pUnk);
373 return refCount;
374}
static EnumConnectionsImpl * impl_from_IEnumConnections(IEnumConnections *iface)
◆ EnumConnectionsImpl_Clone()
Definition at line 444 of file connpt.c.
445{
449
453 IUnknown_AddRef(
This->pUnk);
455}
◆ EnumConnectionsImpl_Construct()
◆ EnumConnectionsImpl_Destroy()
◆ EnumConnectionsImpl_Next()
Definition at line 390 of file connpt.c.
391{
394
395 TRACE(
"%p, %lu, %p, %p.\n", iface, cConn, pCD, pEnum);
396
398 if(cConn != 1)
400 } else
401 *pEnum = 0;
402
405
406 while(
This->nCur <
This->nConns && cConn) {
408 IUnknown_AddRef(
This->pCD[
This->nCur].pUnk);
410 cConn--;
411 nRet++;
412 }
413
414 if(pEnum)
415 *pEnum = nRet;
416
418}
◆ EnumConnectionsImpl_QueryInterface()
Definition at line 329 of file connpt.c.
333{
336
337
338
339
340 if (!ppvObject)
342
343
344
345
346 *ppvObject = 0;
347
349 *ppvObject = iface;
350
351
352
353
354 if ((*ppvObject)==0)
355 {
358 }
359
360 IUnknown_AddRef((
IUnknown*)*ppvObject);
361
363}
◆ EnumConnectionsImpl_Release()
Definition at line 376 of file connpt.c.
377{
380
381 TRACE(
"%p, refcount %lu.\n", iface, refCount);
382
383 IUnknown_Release(
This->pUnk);
384
386
387 return refCount;
388}
static void EnumConnectionsImpl_Destroy(EnumConnectionsImpl *Obj)
◆ EnumConnectionsImpl_Reset()
◆ EnumConnectionsImpl_Skip()
Definition at line 420 of file connpt.c.
421{
423
424 TRACE(
"%p, %lu.\n", iface, cSkip);
425
426 if(
This->nCur + cSkip >=
This->nConns)
428
430
432}
◆ impl_from_IConnectionPoint()
◆ impl_from_IEnumConnections()
◆ WINE_DEFAULT_DEBUG_CHANNEL()
| WINE_DEFAULT_DEBUG_CHANNEL |
( |
ole |
| ) |
|
◆ ConnectionPointImpl_VTable
| const IConnectionPointVtbl ConnectionPointImpl_VTable |
|
static |
Initial value:=
{
}
static HRESULT WINAPI ConnectionPointImpl_Advise(IConnectionPoint *iface, IUnknown *lpUnk, DWORD *pdwCookie)
static HRESULT WINAPI ConnectionPointImpl_GetConnectionInterface(IConnectionPoint *iface, IID *piid)
static ULONG WINAPI ConnectionPointImpl_AddRef(IConnectionPoint *iface)
static HRESULT WINAPI ConnectionPointImpl_Unadvise(IConnectionPoint *iface, DWORD dwCookie)
static HRESULT WINAPI ConnectionPointImpl_QueryInterface(IConnectionPoint *iface, REFIID riid, void **ppvObject)
static HRESULT WINAPI ConnectionPointImpl_EnumConnections(IConnectionPoint *iface, IEnumConnections **ppEnum)
static ULONG WINAPI ConnectionPointImpl_Release(IConnectionPoint *iface)
static HRESULT WINAPI ConnectionPointImpl_GetConnectionPointContainer(IConnectionPoint *iface, IConnectionPointContainer **ppCPC)
Definition at line 281 of file connpt.c.
Referenced by CreateConnectionPoint().
◆ EnumConnectionsImpl_VTable
| static const IEnumConnectionsVtbl EnumConnectionsImpl_VTable |
|
static |
Initial value:=
{
}
static HRESULT WINAPI EnumConnectionsImpl_Reset(IEnumConnections *iface)
static HRESULT WINAPI EnumConnectionsImpl_Skip(IEnumConnections *iface, ULONG cSkip)
static HRESULT WINAPI EnumConnectionsImpl_Next(IEnumConnections *iface, ULONG cConn, LPCONNECTDATA pCD, ULONG *pEnum)
static HRESULT WINAPI EnumConnectionsImpl_QueryInterface(IEnumConnections *iface, REFIID riid, void **ppvObject)
static HRESULT WINAPI EnumConnectionsImpl_Clone(IEnumConnections *iface, IEnumConnections **ppEnum)
static ULONG WINAPI EnumConnectionsImpl_Release(IEnumConnections *iface)
static ULONG WINAPI EnumConnectionsImpl_AddRef(IEnumConnections *iface)
Definition at line 294 of file connpt.c.
Referenced by EnumConnectionsImpl_Construct().