Hans Leidekker : winhttp: Implement IWinHttpRequest::Abort.
Alexandre Julliard
julliard at winehq.org
Thu Jul 21 10:50:50 CDT 2011
Module: wine
Branch: master
Commit: f4c2317adc44626cefab8d97ba4cc955f29a42a1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f4c2317adc44626cefab8d97ba4cc955f29a42a1
Author: Hans Leidekker <hans at codeweavers.com>
Date: Thu Jul 21 11:52:30 2011 +0200
winhttp: Implement IWinHttpRequest::Abort.
---
dlls/winhttp/request.c | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index cec3344..5d10410 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -2770,8 +2770,28 @@ static HRESULT WINAPI winhttp_request_WaitForResponse(
static HRESULT WINAPI winhttp_request_Abort(
IWinHttpRequest *iface )
{
- FIXME("\n");
- return E_NOTIMPL;
+ struct winhttp_request *request = impl_from_IWinHttpRequest( iface );
+
+ TRACE("%p\n", request);
+
+ SetEvent( request->cancel );
+ WinHttpCloseHandle( request->hrequest );
+ WinHttpCloseHandle( request->hconnect );
+ WinHttpCloseHandle( request->hsession );
+ CloseHandle( request->wait );
+ CloseHandle( request->cancel );
+ heap_free( request->buffer );
+ request->state = REQUEST_STATE_INVALID;
+ request->hrequest = NULL;
+ request->hconnect = NULL;
+ request->hsession = NULL;
+ request->wait = NULL;
+ request->cancel = NULL;
+ request->buffer = NULL;
+ request->ptr = NULL;
+ request->bytes_available = 0;
+ request->bytes_read = 0;
+ return S_OK;
}
static HRESULT WINAPI winhttp_request_SetTimeouts(
More information about the wine-cvs
mailing list