Commit 4f714df9 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

httpapi: Implement HttpRemoveUrl().

parent 6bde9537
......@@ -218,10 +218,30 @@ ULONG WINAPI HttpAddUrl(HANDLE queue, const WCHAR *url, void *reserved)
/***********************************************************************
* HttpRemoveUrl (HTTPAPI.@)
*/
ULONG WINAPI HttpRemoveUrl(HANDLE queue, const WCHAR *url)
ULONG WINAPI HttpRemoveUrl(HANDLE queue, const WCHAR *urlW)
{
FIXME("queue %p, url %s, stub!\n", queue, debugstr_w(url));
return ERROR_CALL_NOT_IMPLEMENTED;
ULONG ret = ERROR_SUCCESS;
OVERLAPPED ovl = {};
char *url;
int len;
TRACE("queue %p, url %s.\n", queue, debugstr_w(urlW));
if (!queue)
return ERROR_INVALID_PARAMETER;
len = WideCharToMultiByte(CP_ACP, 0, urlW, -1, NULL, 0, NULL, NULL);
if (!(url = heap_alloc(len)))
return ERROR_OUTOFMEMORY;
WideCharToMultiByte(CP_ACP, 0, urlW, -1, url, len, NULL, NULL);
ovl.hEvent = (HANDLE)((ULONG_PTR)CreateEventW(NULL, TRUE, FALSE, NULL) | 1);
if (!DeviceIoControl(queue, IOCTL_HTTP_REMOVE_URL, url, len, NULL, 0, NULL, &ovl))
ret = GetLastError();
CloseHandle(ovl.hEvent);
heap_free(url);
return ret;
}
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment