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
19a86fea
Commit
19a86fea
authored
Dec 13, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implemented get_responseStream().
parent
940b50b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
5 deletions
+52
-5
httprequest.c
dlls/msxml3/httprequest.c
+22
-4
domdoc.c
dlls/msxml3/tests/domdoc.c
+30
-1
No files found.
dlls/msxml3/httprequest.c
View file @
19a86fea
...
...
@@ -926,7 +926,9 @@ static HRESULT WINAPI httprequest_get_responseBody(IXMLHTTPRequest *iface, VARIA
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
body
);
if
(
!
body
)
return
E_INVALIDARG
;
if
(
This
->
state
!=
READYSTATE_COMPLETE
)
return
E_FAIL
;
V_VT
(
body
)
=
VT_EMPTY
;
if
(
This
->
state
!=
READYSTATE_COMPLETE
)
return
E_PENDING
;
hr
=
GetHGlobalFromStream
(
This
->
bsc
->
stream
,
&
hglobal
);
if
(
hr
==
S_OK
)
...
...
@@ -968,13 +970,29 @@ static HRESULT WINAPI httprequest_get_responseBody(IXMLHTTPRequest *iface, VARIA
return
hr
;
}
static
HRESULT
WINAPI
httprequest_get_responseStream
(
IXMLHTTPRequest
*
iface
,
VARIANT
*
pvarB
ody
)
static
HRESULT
WINAPI
httprequest_get_responseStream
(
IXMLHTTPRequest
*
iface
,
VARIANT
*
b
ody
)
{
httprequest
*
This
=
impl_from_IXMLHTTPRequest
(
iface
);
LARGE_INTEGER
move
;
IStream
*
stream
;
HRESULT
hr
;
FIXME
(
"stub %p %p
\n
"
,
This
,
pvarB
ody
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
b
ody
);
return
E_NOTIMPL
;
if
(
!
body
)
return
E_INVALIDARG
;
V_VT
(
body
)
=
VT_EMPTY
;
if
(
This
->
state
!=
READYSTATE_COMPLETE
)
return
E_PENDING
;
hr
=
IStream_Clone
(
This
->
bsc
->
stream
,
&
stream
);
move
.
QuadPart
=
0
;
IStream_Seek
(
stream
,
move
,
STREAM_SEEK_SET
,
NULL
);
V_VT
(
body
)
=
VT_UNKNOWN
;
V_UNKNOWN
(
body
)
=
(
IUnknown
*
)
stream
;
return
hr
;
}
static
HRESULT
WINAPI
httprequest_get_readyState
(
IXMLHTTPRequest
*
iface
,
LONG
*
state
)
...
...
dlls/msxml3/tests/domdoc.c
View file @
19a86fea
...
...
@@ -4639,6 +4639,7 @@ static void test_XMLHTTP(void)
IDispatch
*
event
;
void
*
ptr
;
HRESULT
hr
;
HGLOBAL
g
;
hr
=
CoCreateInstance
(
&
CLSID_XMLHTTPRequest
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IXMLHttpRequest
,
(
void
**
)
&
xhr
);
...
...
@@ -4665,6 +4666,20 @@ static void test_XMLHTTP(void)
hr
=
IXMLHttpRequest_abort
(
xhr
);
EXPECT_HR
(
hr
,
S_OK
);
V_VT
(
&
varbody
)
=
VT_I2
;
V_I2
(
&
varbody
)
=
1
;
hr
=
IXMLHttpRequest_get_responseBody
(
xhr
,
&
varbody
);
EXPECT_HR
(
hr
,
E_PENDING
);
ok
(
V_VT
(
&
varbody
)
==
VT_EMPTY
,
"got type %d
\n
"
,
V_VT
(
&
varbody
));
ok
(
V_I2
(
&
varbody
)
==
1
,
"got %d
\n
"
,
V_I2
(
&
varbody
));
V_VT
(
&
varbody
)
=
VT_I2
;
V_I2
(
&
varbody
)
=
1
;
hr
=
IXMLHttpRequest_get_responseStream
(
xhr
,
&
varbody
);
EXPECT_HR
(
hr
,
E_PENDING
);
ok
(
V_VT
(
&
varbody
)
==
VT_EMPTY
,
"got type %d
\n
"
,
V_VT
(
&
varbody
));
ok
(
V_I2
(
&
varbody
)
==
1
,
"got %d
\n
"
,
V_I2
(
&
varbody
));
/* send before open */
hr
=
IXMLHttpRequest_send
(
xhr
,
dummy
);
ok
(
hr
==
E_FAIL
||
broken
(
hr
==
E_UNEXPECTED
)
/* win2k */
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -4835,9 +4850,23 @@ static void test_XMLHTTP(void)
SafeArrayUnaccessData
(
V_ARRAY
(
&
varbody
));
VariantClear
(
&
varbody
);
SysFreeString
(
url
);
/* get_responseStream */
hr
=
IXMLHttpRequest_get_responseStream
(
xhr
,
NULL
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
V_VT
(
&
varbody
)
=
VT_EMPTY
;
hr
=
IXMLHttpRequest_get_responseStream
(
xhr
,
&
varbody
);
ok
(
V_VT
(
&
varbody
)
==
VT_UNKNOWN
,
"got type %d
\n
"
,
V_VT
(
&
varbody
));
EXPECT_HR
(
hr
,
S_OK
);
EXPECT_REF
(
V_UNKNOWN
(
&
varbody
),
1
);
g
=
NULL
;
hr
=
GetHGlobalFromStream
((
IStream
*
)
V_UNKNOWN
(
&
varbody
),
&
g
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
g
!=
NULL
,
"got %p
\n
"
,
g
);
hr
=
IXMLHttpRequest_QueryInterface
(
xhr
,
&
IID_IObjectSafety
,
(
void
**
)
&
safety
);
EXPECT_HR
(
hr
,
S_OK
);
if
(
hr
==
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