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
a25c865c
Commit
a25c865c
authored
Jul 23, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Implement IWinHttpRequest::get_ResponseBody.
parent
73646d35
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
3 deletions
+35
-3
request.c
dlls/winhttp/request.c
+25
-2
winhttp.c
dlls/winhttp/tests/winhttp.c
+10
-1
No files found.
dlls/winhttp/request.c
View file @
a25c865c
...
...
@@ -2724,8 +2724,31 @@ static HRESULT WINAPI winhttp_request_get_ResponseBody(
IWinHttpRequest
*
iface
,
VARIANT
*
body
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
struct
winhttp_request
*
request
=
impl_from_IWinHttpRequest
(
iface
);
SAFEARRAY
*
sa
;
HRESULT
hr
;
DWORD
err
;
char
*
ptr
;
TRACE
(
"%p, %p
\n
"
,
request
,
body
);
if
((
err
=
request_read_body
(
request
,
INFINITE
)))
return
HRESULT_FROM_WIN32
(
err
);
if
(
!
(
sa
=
SafeArrayCreateVector
(
VT_UI1
,
0
,
request
->
offset
)))
return
E_OUTOFMEMORY
;
if
((
hr
=
SafeArrayAccessData
(
sa
,
(
void
**
)
&
ptr
))
!=
S_OK
)
{
SafeArrayDestroy
(
sa
);
return
hr
;
}
memcpy
(
ptr
,
request
->
buffer
,
request
->
offset
);
if
((
hr
=
SafeArrayUnaccessData
(
sa
))
!=
S_OK
)
{
SafeArrayDestroy
(
sa
);
return
hr
;
}
V_VT
(
body
)
=
VT_ARRAY
|
VT_UI1
;
V_ARRAY
(
body
)
=
sa
;
return
S_OK
;
}
static
HRESULT
WINAPI
winhttp_request_get_ResponseStream
(
...
...
dlls/winhttp/tests/winhttp.c
View file @
a25c865c
...
...
@@ -2107,7 +2107,7 @@ static void test_IWinHttpRequest(void)
HRESULT
hr
;
IWinHttpRequest
*
req
;
BSTR
method
,
url
,
response
=
NULL
,
status_text
=
NULL
;
VARIANT
async
,
empty
,
timeout
;
VARIANT
async
,
empty
,
timeout
,
body
;
VARIANT_BOOL
succeeded
;
LONG
status
;
...
...
@@ -2241,6 +2241,15 @@ static void test_IWinHttpRequest(void)
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
SysFreeString
(
response
);
VariantInit
(
&
body
);
V_VT
(
&
body
)
=
VT_ERROR
;
hr
=
IWinHttpRequest_get_ResponseBody
(
req
,
&
body
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
body
)
==
(
VT_ARRAY
|
VT_UI1
),
"got %08x
\n
"
,
V_VT
(
&
body
)
);
hr
=
VariantClear
(
&
body
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
IWinHttpRequest_Send
(
req
,
empty
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
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