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
4797edf4
Commit
4797edf4
authored
May 27, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
May 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Store STGMEDIUM in Binding object and set its pUnkForRelease.
parent
21621b28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
binding.c
dlls/urlmon/binding.c
+6
-5
url.c
dlls/urlmon/tests/url.c
+18
-0
No files found.
dlls/urlmon/binding.c
View file @
4797edf4
...
...
@@ -56,6 +56,8 @@ typedef struct {
DWORD
apartment_thread
;
HWND
notif_hwnd
;
STGMEDIUM
stgmed
;
}
Binding
;
struct
ProtocolStream
{
...
...
@@ -707,7 +709,6 @@ static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *ifa
DWORD
grfBSCF
,
ULONG
ulProgress
,
ULONG
ulProgressMax
)
{
Binding
*
This
=
PROTSINK_THIS
(
iface
);
STGMEDIUM
stgmed
;
FORMATETC
formatetc
;
TRACE
(
"(%p)->(%ld %lu %lu)
\n
"
,
This
,
grfBSCF
,
ulProgress
,
ulProgressMax
);
...
...
@@ -729,9 +730,6 @@ static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *ifa
fill_stream_buffer
(
This
->
stream
);
stgmed
.
tymed
=
TYMED_ISTREAM
;
stgmed
.
u
.
pstm
=
STREAM
(
This
->
stream
);
formatetc
.
cfFormat
=
0
;
/* FIXME */
formatetc
.
ptd
=
NULL
;
formatetc
.
dwAspect
=
1
;
...
...
@@ -739,7 +737,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *ifa
formatetc
.
tymed
=
TYMED_ISTREAM
;
IBindStatusCallback_OnDataAvailable
(
This
->
callback
,
grfBSCF
,
This
->
stream
->
buf_size
,
&
formatetc
,
&
stgmed
);
&
formatetc
,
&
This
->
stgmed
);
if
(
grfBSCF
&
BSCF_LASTDATANOTIFICATION
)
IBindStatusCallback_OnStopBinding
(
This
->
callback
,
S_OK
,
NULL
);
...
...
@@ -1026,6 +1024,9 @@ static HRESULT Binding_Create(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding *
memcpy
(
ret
->
url
,
url
,
len
*
sizeof
(
WCHAR
));
ret
->
stream
=
create_stream
(
ret
->
protocol
);
ret
->
stgmed
.
tymed
=
TYMED_ISTREAM
;
ret
->
stgmed
.
u
.
pstm
=
STREAM
(
ret
->
stream
);
ret
->
stgmed
.
pUnkForRelease
=
(
IUnknown
*
)
BINDING
(
ret
);
/* NOTE: Windows uses other IUnknown */
*
binding
=
ret
;
return
S_OK
;
...
...
dlls/urlmon/tests/url.c
View file @
4797edf4
...
...
@@ -460,6 +460,24 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallback *iface, DWOR
CHECK_EXPECT2
(
OnDataAvailable
);
#if 0 /* Uncomment after removing BindToStorage hack. */
ok(pformatetc != NULL, "pformatetx == NULL\n");
if(pformatetc) {
ok(pformatetc->cfFormat == 0xc02d, "clipformat=%x\n", pformatetc->cfFormat);
ok(pformatetc->ptd == NULL, "ptd = %p\n", pformatetc->ptd);
ok(pformatetc->dwAspect == 1, "dwAspect=%ld\n", pformatetc->dwAspect);
ok(pformatetc->lindex == -1, "lindex=%ld\n", pformatetc->lindex);
ok(pformatetc->tymed == TYMED_ISTREAM, "tymed=%ld\n", pformatetc->tymed);
}
ok(pstgmed != NULL, "stgmeg == NULL\n");
if(pstgmed) {
ok(pstgmed->tymed == TYMED_ISTREAM, "tymed=%ld\n", pstgmed->tymed);
ok(U(*pstgmed).pstm != NULL, "pstm == NULL\n");
ok(pstgmed->pUnkForRelease != NULL, "pUnkForRelease == NULL\n");
}
#endif
if
(
U
(
*
pstgmed
).
pstm
)
{
do
hres
=
IStream_Read
(
U
(
*
pstgmed
).
pstm
,
buf
,
512
,
&
readed
);
while
(
hres
==
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