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
5c79f82a
Commit
5c79f82a
authored
Jul 21, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Implement IWinHttpRequest::WaitForResponse.
parent
d66a0b74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
request.c
dlls/winhttp/request.c
+36
-2
No files found.
dlls/winhttp/request.c
View file @
5c79f82a
...
...
@@ -2517,6 +2517,36 @@ static HRESULT WINAPI winhttp_request_Send(
return
S_OK
;
}
static
DWORD
request_wait_for_response
(
struct
winhttp_request
*
request
,
DWORD
timeout
,
VARIANT_BOOL
*
succeeded
)
{
DWORD
err
;
if
(
request
->
state
>=
REQUEST_STATE_RESPONSE_RECEIVED
)
return
ERROR_SUCCESS
;
if
(
request
->
state
<
REQUEST_STATE_SENT
)
{
if
((
err
=
wait_for_completion
(
request
,
timeout
)))
return
err
;
request
->
state
=
REQUEST_STATE_SENT
;
}
wait_set_status_callback
(
request
,
WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE
);
if
(
!
WinHttpReceiveResponse
(
request
->
hrequest
,
NULL
))
{
return
GetLastError
();
}
switch
((
err
=
wait_for_completion
(
request
,
timeout
)))
{
case
WAIT_OBJECT_0
:
if
(
succeeded
)
*
succeeded
=
VARIANT_TRUE
;
break
;
case
WAIT_TIMEOUT
:
if
(
succeeded
)
*
succeeded
=
VARIANT_FALSE
;
break
;
default:
return
err
;
}
request
->
state
=
REQUEST_STATE_RESPONSE_RECEIVED
;
return
ERROR_SUCCESS
;
}
static
HRESULT
WINAPI
winhttp_request_get_Status
(
IWinHttpRequest
*
iface
,
LONG
*
status
)
...
...
@@ -2580,8 +2610,12 @@ static HRESULT WINAPI winhttp_request_WaitForResponse(
VARIANT
timeout
,
VARIANT_BOOL
*
succeeded
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
struct
winhttp_request
*
request
=
impl_from_IWinHttpRequest
(
iface
);
DWORD
msecs
=
(
V_I4
(
&
timeout
)
==
-
1
)
?
INFINITE
:
V_I4
(
&
timeout
)
*
1000
;
TRACE
(
"%p, %s, %p
\n
"
,
request
,
debugstr_variant
(
&
timeout
),
succeeded
);
return
HRESULT_FROM_WIN32
(
request_wait_for_response
(
request
,
msecs
,
succeeded
)
);
}
static
HRESULT
WINAPI
winhttp_request_Abort
(
...
...
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