Zebediah Figura : httpapi: Implement HttpRemoveUrl().
Alexandre Julliard
julliard at winehq.org
Fri Aug 23 15:14:54 CDT 2019
Module: wine
Branch: master
Commit: 4f714df9d6d948039ed1bccce14b9ef738bca2cb
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4f714df9d6d948039ed1bccce14b9ef738bca2cb
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu Aug 22 22:35:26 2019 -0500
httpapi: Implement HttpRemoveUrl().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/httpapi/httpapi_main.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c
index cc52273..5f2a307 100644
--- a/dlls/httpapi/httpapi_main.c
+++ b/dlls/httpapi/httpapi_main.c
@@ -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;
}
/***********************************************************************
More information about the wine-cvs
mailing list