winhttp: Implement IWinHttpRequest::Abort.

This commit is contained in:
Hans Leidekker 2011-07-21 11:52:30 +02:00 committed by Alexandre Julliard
parent 52d134b364
commit f4c2317adc
1 changed files with 22 additions and 2 deletions

View File

@ -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(