Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e8efc1e6
Commit
e8efc1e6
authored
Apr 15, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ieframe: Added IConnectionPoint::EnumConnections implementation.
parent
9f62d217
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
131 additions
and
4 deletions
+131
-4
events.c
dlls/ieframe/events.c
+131
-4
No files found.
dlls/ieframe/events.c
View file @
e8efc1e6
...
...
@@ -109,8 +109,6 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
return
CONNECT_E_NOCONNECTION
;
}
#undef impl_from_IConnectionPointContainer
static
const
IConnectionPointContainerVtbl
ConnectionPointContainerVtbl
=
{
ConnectionPointContainer_QueryInterface
,
...
...
@@ -130,6 +128,120 @@ static inline ConnectionPoint *impl_from_IConnectionPoint(IConnectionPoint *ifac
return
CONTAINING_RECORD
(
iface
,
ConnectionPoint
,
IConnectionPoint_iface
);
}
typedef
struct
{
IEnumConnections
IEnumConnections_iface
;
LONG
ref
;
ConnectionPoint
*
cp
;
DWORD
iter
;
}
EnumConnections
;
static
inline
EnumConnections
*
impl_from_IEnumConnections
(
IEnumConnections
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
EnumConnections
,
IEnumConnections_iface
);
}
static
HRESULT
WINAPI
EnumConnections_QueryInterface
(
IEnumConnections
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
EnumConnections
*
This
=
impl_from_IEnumConnections
(
iface
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IEnumConnections_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IEnumConnections
,
riid
))
{
TRACE
(
"(%p)->(IID_IEnumConnections %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IEnumConnections_iface
;
}
else
{
WARN
(
"Unsupported interface %s
\n
"
,
debugstr_guid
(
riid
));
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
EnumConnections_AddRef
(
IEnumConnections
*
iface
)
{
EnumConnections
*
This
=
impl_from_IEnumConnections
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
EnumConnections_Release
(
IEnumConnections
*
iface
)
{
EnumConnections
*
This
=
impl_from_IEnumConnections
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
IConnectionPoint_Release
(
&
This
->
cp
->
IConnectionPoint_iface
);
heap_free
(
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
EnumConnections_Next
(
IEnumConnections
*
iface
,
ULONG
cConnections
,
CONNECTDATA
*
pgcd
,
ULONG
*
pcFetched
)
{
EnumConnections
*
This
=
impl_from_IEnumConnections
(
iface
);
ULONG
cnt
=
0
;
TRACE
(
"(%p)->(%u %p %p)
\n
"
,
This
,
cConnections
,
pgcd
,
pcFetched
);
while
(
cConnections
--
)
{
while
(
This
->
iter
<
This
->
cp
->
sinks_size
&&
!
This
->
cp
->
sinks
[
This
->
iter
])
This
->
iter
++
;
if
(
This
->
iter
==
This
->
cp
->
sinks_size
)
break
;
pgcd
[
cnt
].
pUnk
=
(
IUnknown
*
)
This
->
cp
->
sinks
[
This
->
iter
];
pgcd
[
cnt
].
dwCookie
=
cnt
+
1
;
This
->
iter
++
;
cnt
++
;
}
if
(
pcFetched
)
*
pcFetched
=
cnt
;
return
cnt
?
S_OK
:
S_FALSE
;
}
static
HRESULT
WINAPI
EnumConnections_Skip
(
IEnumConnections
*
iface
,
ULONG
cConnections
)
{
EnumConnections
*
This
=
impl_from_IEnumConnections
(
iface
);
FIXME
(
"(%p)->(%u)
\n
"
,
This
,
cConnections
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
EnumConnections_Reset
(
IEnumConnections
*
iface
)
{
EnumConnections
*
This
=
impl_from_IEnumConnections
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
EnumConnections_Clone
(
IEnumConnections
*
iface
,
IEnumConnections
**
ppEnum
)
{
EnumConnections
*
This
=
impl_from_IEnumConnections
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppEnum
);
return
E_NOTIMPL
;
}
static
const
IEnumConnectionsVtbl
EnumConnectionsVtbl
=
{
EnumConnections_QueryInterface
,
EnumConnections_AddRef
,
EnumConnections_Release
,
EnumConnections_Next
,
EnumConnections_Skip
,
EnumConnections_Reset
,
EnumConnections_Clone
};
static
HRESULT
WINAPI
ConnectionPoint_QueryInterface
(
IConnectionPoint
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
...
...
@@ -245,8 +357,23 @@ static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface,
IEnumConnections
**
ppEnum
)
{
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppEnum
);
return
E_NOTIMPL
;
EnumConnections
*
ret
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppEnum
);
ret
=
heap_alloc
(
sizeof
(
*
ret
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
IEnumConnections_iface
.
lpVtbl
=
&
EnumConnectionsVtbl
;
ret
->
ref
=
1
;
ret
->
iter
=
0
;
IConnectionPoint_AddRef
(
&
This
->
IConnectionPoint_iface
);
ret
->
cp
=
This
;
*
ppEnum
=
&
ret
->
IEnumConnections_iface
;
return
S_OK
;
}
static
const
IConnectionPointVtbl
ConnectionPointVtbl
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment