[PATCH v2 2/2] winhttp: Add WinHttpWebSocket* function stubs

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Thu Jun 11 01:39:11 CDT 2020


---
 dlls/winhttp/url.c        | 38 ++++++++++++++++++++++++++++++++++++++
 dlls/winhttp/winhttp.spec |  5 +++++
 include/winhttp.h         |  5 +++++
 3 files changed, 48 insertions(+)

diff --git a/dlls/winhttp/url.c b/dlls/winhttp/url.c
index 3e248bca9f..2986ef62da 100644
--- a/dlls/winhttp/url.c
+++ b/dlls/winhttp/url.c
@@ -554,3 +554,41 @@ BOOL WINAPI WinHttpCreateUrl( LPURL_COMPONENTS uc, DWORD flags, LPWSTR url, LPDW
     SetLastError( ERROR_SUCCESS );
     return TRUE;
 }
+
+HINTERNET WINAPI WinHttpWebSocketCompleteUpgrade(HINTERNET handle, DWORD_PTR context)
+{
+    FIXME("%p, %08lx\n", handle, context);
+
+    return NULL;
+}
+
+DWORD WINAPI WinHttpWebSocketSend(HINTERNET handle, WINHTTP_WEB_SOCKET_BUFFER_TYPE type,
+        void *buffer, DWORD length)
+{
+    FIXME("%p, %d, %p, %d\n", handle, type, buffer, length);
+
+    return ERROR_INVALID_PARAMETER;
+}
+
+DWORD WINAPI WinHttpWebSocketReceive(HINTERNET handle, void *buffer, DWORD length, DWORD *read,
+        WINHTTP_WEB_SOCKET_BUFFER_TYPE *type)
+{
+    FIXME("%p, %p, %d, %p, %p\n", handle, buffer, length, read, type);
+
+    return ERROR_INVALID_PARAMETER;
+}
+
+DWORD WINAPI WinHttpWebSocketClose(HINTERNET handle, USHORT status, void *reason, DWORD length)
+{
+    FIXME("%p, %d, %p, %d\n", handle, status, reason, length);
+
+    return ERROR_INVALID_PARAMETER;
+}
+
+DWORD WINAPI WinHttpWebSocketQueryCloseStatus(HINTERNET handle, USHORT *status, void *reason,
+        DWORD length, DWORD *consumed)
+{
+    FIXME("%p, %p, %p, %d, %p\n", handle, status, reason, length, consumed);
+
+    return ERROR_INVALID_PARAMETER;
+}
diff --git a/dlls/winhttp/winhttp.spec b/dlls/winhttp/winhttp.spec
index 28dcb1598b..2d4dd8231d 100644
--- a/dlls/winhttp/winhttp.spec
+++ b/dlls/winhttp/winhttp.spec
@@ -28,4 +28,9 @@
 @ stdcall WinHttpSetTimeouts(ptr long long long long)
 @ stdcall WinHttpTimeFromSystemTime(ptr ptr)
 @ stdcall WinHttpTimeToSystemTime(wstr ptr)
+@ stdcall WinHttpWebSocketClose(ptr long ptr long)
+@ stdcall WinHttpWebSocketCompleteUpgrade(ptr ptr)
+@ stdcall WinHttpWebSocketQueryCloseStatus(ptr ptr ptr long ptr)
+@ stdcall WinHttpWebSocketReceive(ptr ptr long ptr ptr)
+@ stdcall WinHttpWebSocketSend(ptr long ptr long)
 @ stdcall WinHttpWriteData(ptr ptr long ptr)
diff --git a/include/winhttp.h b/include/winhttp.h
index ddfda48088..90ef804c75 100644
--- a/include/winhttp.h
+++ b/include/winhttp.h
@@ -853,6 +853,11 @@ WINHTTP_STATUS_CALLBACK WINAPI WinHttpSetStatusCallback(HINTERNET,WINHTTP_STATUS
 BOOL        WINAPI WinHttpSetTimeouts(HINTERNET,int,int,int,int);
 BOOL        WINAPI WinHttpTimeFromSystemTime(const SYSTEMTIME *,LPWSTR);
 BOOL        WINAPI WinHttpTimeToSystemTime(LPCWSTR,SYSTEMTIME*);
+DWORD       WINAPI WinHttpWebSocketClose(HINTERNET,USHORT,void *,DWORD);
+HINTERNET   WINAPI WinHttpWebSocketCompleteUpgrade(HINTERNET,DWORD_PTR);
+DWORD       WINAPI WinHttpWebSocketQueryCloseStatus(HINTERNET, USHORT*, void*,DWORD, DWORD*);
+DWORD       WINAPI WinHttpWebSocketReceive(HINTERNET,void*,DWORD,DWORD*,WINHTTP_WEB_SOCKET_BUFFER_TYPE*);
+DWORD       WINAPI WinHttpWebSocketSend(HINTERNET,WINHTTP_WEB_SOCKET_BUFFER_TYPE,void *,DWORD);
 BOOL        WINAPI WinHttpWriteData(HINTERNET,LPCVOID,DWORD,LPDWORD);
 DWORD       WINAPI WinHttpWriteProxySettings(HINTERNET,BOOL,WINHTTP_PROXY_SETTINGS*);
 
-- 
2.26.2




More information about the wine-devel mailing list