#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, LPENUMCONNECTIONS *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, LPENUMCONNECTIONS *ppEnum) |
|
HRESULT | CreateConnectionPoint (IUnknown *pUnk, REFIID riid, IConnectionPoint **pCP) |
|
◆ COBJMACROS
◆ MAXSINKS
◆ ConnectionPointImpl
◆ EnumConnectionsImpl
◆ ConnectionPointImpl_AddRef()
Definition at line 169 of file connpt.c.
170{
173
174 TRACE(
"(%p)->(ref before=%d)\n",
This, refCount - 1);
175
176 return refCount;
177}
#define InterlockedIncrement
static ConnectionPointImpl * impl_from_IConnectionPoint(IConnectionPoint *iface)
◆ ConnectionPointImpl_Advise()
Definition at line 232 of file connpt.c.
235{
239 TRACE(
"(%p)->(%p, %p)\n",
This, lpUnk, pdwCookie);
240
241 *pdwCookie = 0;
242 if(
FAILED(IUnknown_QueryInterface(lpUnk, &
This->iid, (
void**)&lpSink)))
244
245 for(
i = 0;
i <
This->maxSinks;
i++) {
247 break;
248 }
249 if(
i ==
This->maxSinks) {
253 }
254 This->sinks[
i] = lpSink;
258}
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 285 of file connpt.c.
288{
290 CONNECTDATA *pCD;
294
296
298
300
302
303 for(
i = 0, nextslot = 0;
i <
This->maxSinks;
i++) {
305 pCD[nextslot].pUnk =
This->sinks[
i];
306 pCD[nextslot].dwCookie =
i + 1;
307 nextslot++;
308 }
309 }
311
312
313
314 IConnectionPoint_AddRef(iface);
315
320
323}
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 218 of file connpt.c.
221{
224
226}
const GUID IID_IConnectionPointContainer
◆ ConnectionPointImpl_QueryInterface()
Definition at line 126 of file connpt.c.
130{
133
134
135
136
139
140
141
142
144
145
148
149
150
151
153 {
156 }
157
159
161}
const GUID IID_IConnectionPoint
#define IsEqualIID(riid1, riid2)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
◆ ConnectionPointImpl_Release()
Definition at line 184 of file connpt.c.
186{
189
190 TRACE(
"(%p)->(ref before=%d)\n",
This, refCount + 1);
191
192
193
194
196
197 return refCount;
198}
#define InterlockedDecrement
static void ConnectionPointImpl_Destroy(ConnectionPointImpl *Obj)
◆ ConnectionPointImpl_Unadvise()
Definition at line 265 of file connpt.c.
267{
270
272
274
275 IUnknown_Release(
This->sinks[dwCookie-1]);
279}
#define CONNECT_E_NOCONNECTION
◆ CreateConnectionPoint()
◆ EnumConnectionsImpl_AddRef()
Definition at line 426 of file connpt.c.
427{
430
431 TRACE(
"(%p)->(ref before=%d)\n",
This, refCount - 1);
432
433 IUnknown_AddRef(
This->pUnk);
434 return refCount;
435}
static EnumConnectionsImpl * impl_from_IEnumConnections(IEnumConnections *iface)
◆ EnumConnectionsImpl_Clone()
Definition at line 533 of file connpt.c.
535{
539
543 IUnknown_AddRef(
This->pUnk);
545}
◆ EnumConnectionsImpl_Construct()
◆ EnumConnectionsImpl_Destroy()
◆ EnumConnectionsImpl_Next()
Definition at line 463 of file connpt.c.
466{
469 TRACE(
"(%p)->(%d, %p, %p)\n",
This, cConn, pCD, pEnum);
470
472 if(cConn != 1)
474 } else
475 *pEnum = 0;
476
479
480 while(
This->nCur <
This->nConns && cConn) {
482 IUnknown_AddRef(
This->pCD[
This->nCur].pUnk);
484 cConn--;
485 nRet++;
486 }
487
488 if(pEnum)
489 *pEnum = nRet;
490
492}
◆ EnumConnectionsImpl_QueryInterface()
Definition at line 384 of file connpt.c.
388{
391
392
393
394
397
398
399
400
402
405
406
407
408
410 {
413 }
414
416
418}
◆ EnumConnectionsImpl_Release()
Definition at line 442 of file connpt.c.
443{
446
447 TRACE(
"(%p)->(ref before=%d)\n",
This, refCount + 1);
448
449 IUnknown_Release(
This->pUnk);
450
451
452
453
455
456 return refCount;
457}
static void EnumConnectionsImpl_Destroy(EnumConnectionsImpl *Obj)
◆ EnumConnectionsImpl_Reset()
◆ EnumConnectionsImpl_Skip()
Definition at line 499 of file connpt.c.
501{
504
505 if(
This->nCur + cSkip >=
This->nConns)
507
509
511}
◆ 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, LPENUMCONNECTIONS *ppEnum)
static ULONG WINAPI ConnectionPointImpl_Release(IConnectionPoint *iface)
static HRESULT WINAPI ConnectionPointImpl_GetConnectionPointContainer(IConnectionPoint *iface, IConnectionPointContainer **ppCPC)
Definition at line 325 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_Clone(IEnumConnections *iface, LPENUMCONNECTIONS *ppEnum)
static HRESULT WINAPI EnumConnectionsImpl_QueryInterface(IEnumConnections *iface, REFIID riid, void **ppvObject)
static ULONG WINAPI EnumConnectionsImpl_Release(IEnumConnections *iface)
static ULONG WINAPI EnumConnectionsImpl_AddRef(IEnumConnections *iface)
Definition at line 338 of file connpt.c.
Referenced by EnumConnectionsImpl_Construct().