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
6ac2cb3d
Commit
6ac2cb3d
authored
Jan 05, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Jan 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Reimplement SendOnDataChange using the connection enumerator.
parent
d5c66bc2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
23 deletions
+27
-23
oleobj.c
dlls/ole32/oleobj.c
+27
-23
No files found.
dlls/ole32/oleobj.c
View file @
6ac2cb3d
...
...
@@ -24,6 +24,8 @@
#include <string.h>
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
...
...
@@ -804,40 +806,42 @@ static HRESULT WINAPI DataAdviseHolder_EnumAdvise(IDataAdviseHolder *iface,
* DataAdviseHolder_SendOnDataChange
*/
static
HRESULT
WINAPI
DataAdviseHolder_SendOnDataChange
(
IDataAdviseHolder
*
iface
,
IDataObject
*
pDataObject
,
IDataObject
*
data_obj
,
DWORD
dwReserved
,
DWORD
advf
)
{
DataAdviseHolder
*
This
=
impl_from_IDataAdviseHolder
(
iface
);
DWORD
index
;
STGMEDIUM
stg
;
HRESULT
res
;
IEnumSTATDATA
*
pEnum
;
HRESULT
hr
;
TRACE
(
"(%p)->(%p,%08x,%08x)
\n
"
,
This
,
pDataObject
,
dwReserved
,
advf
);
TRACE
(
"(%p)->(%p, %08x, %08x)
\n
"
,
iface
,
data_obj
,
dwReserved
,
advf
);
for
(
index
=
0
;
index
<
This
->
maxCons
;
index
++
)
hr
=
IDataAdviseHolder_EnumAdvise
(
iface
,
&
pEnum
);
if
(
SUCCEEDED
(
hr
))
{
if
(
This
->
connections
[
index
].
pAdvSink
!=
NULL
)
STATDATA
statdata
;
while
(
IEnumSTATDATA_Next
(
pEnum
,
1
,
&
statdata
,
NULL
)
==
S_OK
)
{
memset
(
&
stg
,
0
,
sizeof
(
stg
));
if
(
!
(
This
->
connections
[
index
].
advf
&
ADVF_NODATA
))
STGMEDIUM
stg
;
stg
.
tymed
=
TYMED_NULL
;
stg
.
u
.
pstg
=
NULL
;
stg
.
pUnkForRelease
=
NULL
;
if
(
!
(
statdata
.
advf
&
ADVF_NODATA
))
{
TRACE
(
"Calling IDataObject_GetData
\n
"
);
res
=
IDataObject_GetData
(
pDataObject
,
&
(
This
->
connections
[
index
].
formatetc
),
&
stg
);
TRACE
(
"returns %08x
\n
"
,
res
);
hr
=
IDataObject_GetData
(
data_obj
,
&
statdata
.
formatetc
,
&
stg
);
}
TRACE
(
"Calling IAdviseSink_OnDataChange
\n
"
);
IAdviseSink_OnDataChange
(
This
->
connections
[
index
].
pAdvSink
,
&
(
This
->
connections
[
index
].
formatetc
),
&
stg
);
TRACE
(
"Done IAdviseSink_OnDataChange
\n
"
);
if
(
This
->
connections
[
index
].
advf
&
ADVF_ONLYONCE
)
{
TRACE
(
"Removing connection
\n
"
);
DataAdviseHolder_Unadvise
(
iface
,
This
->
connections
[
index
].
dwConnection
);
IAdviseSink_OnDataChange
(
statdata
.
pAdvSink
,
&
statdata
.
formatetc
,
&
stg
);
if
(
statdata
.
advf
&
ADVF_ONLYONCE
)
{
IDataAdviseHolder_Unadvise
(
iface
,
statdata
.
dwConnection
);
}
release_statdata
(
&
statdata
);
}
IEnumSTATDATA_Release
(
pEnum
);
}
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