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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
29 deletions
+33
-29
oleobj.c
dlls/ole32/oleobj.c
+33
-29
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,41 +806,43 @@ 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
++
)
{
if
(
This
->
connections
[
index
].
pAdvSink
!=
NULL
)
hr
=
IDataAdviseHolder_EnumAdvise
(
iface
,
&
pEnum
);
if
(
SUCCEEDED
(
hr
))
{
memset
(
&
stg
,
0
,
sizeof
(
stg
));
if
(
!
(
This
->
connections
[
index
].
advf
&
ADVF_NODATA
))
{
TRACE
(
"Calling IDataObject_GetData
\n
"
);
res
=
IDataObject_GetData
(
pDataObject
,
&
(
This
->
connections
[
index
].
formatetc
),
&
stg
);
TRACE
(
"returns %08x
\n
"
,
res
);
}
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
);
}
STATDATA
statdata
;
while
(
IEnumSTATDATA_Next
(
pEnum
,
1
,
&
statdata
,
NULL
)
==
S_OK
)
{
STGMEDIUM
stg
;
stg
.
tymed
=
TYMED_NULL
;
stg
.
u
.
pstg
=
NULL
;
stg
.
pUnkForRelease
=
NULL
;
if
(
!
(
statdata
.
advf
&
ADVF_NODATA
))
{
hr
=
IDataObject_GetData
(
data_obj
,
&
statdata
.
formatetc
,
&
stg
);
}
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
;
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