winhttp: Implement HTTP_OPTION_PARENT_HANDLE for connection handles.
Hans Leidekker
hans at codeweavers.com
Mon Oct 26 03:56:33 CDT 2009
See http://bugs.winehq.org/show_bug.cgi?id=19352
---
dlls/winhttp/session.c | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index 448603f..9992e5b 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -229,10 +229,36 @@ static void connect_destroy( object_header_t *hdr )
heap_free( connect );
}
+static BOOL connect_query_option( object_header_t *hdr, DWORD option, LPVOID buffer, LPDWORD buflen )
+{
+ connect_t *connect = (connect_t *)hdr;
+
+ switch (option)
+ {
+ case WINHTTP_OPTION_PARENT_HANDLE:
+ {
+ if (!buffer || *buflen < sizeof(HINTERNET))
+ {
+ *buflen = sizeof(HINTERNET);
+ set_last_error( ERROR_INSUFFICIENT_BUFFER );
+ return FALSE;
+ }
+
+ *(HINTERNET *)buffer = ((object_header_t *)connect->session)->handle;
+ *buflen = sizeof(HINTERNET);
+ return TRUE;
+ }
+ default:
+ FIXME("unimplemented option %u\n", option);
+ set_last_error( ERROR_INVALID_PARAMETER );
+ return FALSE;
+ }
+}
+
static const object_vtbl_t connect_vtbl =
{
connect_destroy,
- NULL,
+ connect_query_option,
NULL
};
--
1.6.3.3
More information about the wine-patches
mailing list