Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
72eaeb14
Commit
72eaeb14
authored
May 07, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Simplify connection point creation.
parent
39a5a1c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
30 deletions
+16
-30
connpt.c
dlls/oleaut32/connpt.c
+16
-30
No files found.
dlls/oleaut32/connpt.c
View file @
72eaeb14
...
...
@@ -66,9 +66,6 @@ typedef struct ConnectionPointImpl {
DWORD
nSinks
;
}
ConnectionPointImpl
;
static
const
IConnectionPointVtbl
ConnectionPointImpl_VTable
;
/************************************************************************
* Implementation of IEnumConnections
*/
...
...
@@ -105,26 +102,6 @@ static inline EnumConnectionsImpl *impl_from_IEnumConnections(IEnumConnections *
}
/************************************************************************
* ConnectionPointImpl_Construct
*/
static
ConnectionPointImpl
*
ConnectionPointImpl_Construct
(
IUnknown
*
pUnk
,
REFIID
riid
)
{
ConnectionPointImpl
*
Obj
;
Obj
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
Obj
));
Obj
->
IConnectionPoint_iface
.
lpVtbl
=
&
ConnectionPointImpl_VTable
;
Obj
->
Obj
=
pUnk
;
Obj
->
ref
=
1
;
Obj
->
iid
=
*
riid
;
Obj
->
maxSinks
=
MAXSINKS
;
Obj
->
sinks
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IUnknown
*
)
*
MAXSINKS
);
Obj
->
nSinks
=
0
;
return
Obj
;
}
/************************************************************************
* ConnectionPointImpl_Destroy
*/
static
void
ConnectionPointImpl_Destroy
(
ConnectionPointImpl
*
Obj
)
...
...
@@ -615,13 +592,22 @@ HRESULT CreateConnectionPoint(IUnknown *pUnk, REFIID riid,
IConnectionPoint
**
pCP
)
{
ConnectionPointImpl
*
Obj
;
HRESULT
hr
;
Obj
=
ConnectionPointImpl_Construct
(
pUnk
,
riid
);
if
(
!
Obj
)
return
E_OUTOFMEMORY
;
TRACE
(
"(%p %s %p)
\n
"
,
pUnk
,
debugstr_guid
(
riid
),
pCP
);
hr
=
IConnectionPoint_QueryInterface
(
&
Obj
->
IConnectionPoint_iface
,
&
IID_IConnectionPoint
,
(
void
**
)
pCP
);
IConnectionPoint_Release
(
&
Obj
->
IConnectionPoint_iface
);
return
hr
;
*
pCP
=
NULL
;
Obj
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
Obj
));
if
(
!
Obj
)
return
E_OUTOFMEMORY
;
Obj
->
IConnectionPoint_iface
.
lpVtbl
=
&
ConnectionPointImpl_VTable
;
Obj
->
Obj
=
pUnk
;
Obj
->
ref
=
1
;
Obj
->
iid
=
*
riid
;
Obj
->
maxSinks
=
MAXSINKS
;
Obj
->
sinks
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IUnknown
*
)
*
MAXSINKS
);
Obj
->
nSinks
=
0
;
*
pCP
=
&
Obj
->
IConnectionPoint_iface
;
return
S_OK
;
}
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