Patch: create a WinHttpDetectAutoProxyConfigUrl function

Joshua Hudson joshudson at gmail.com
Tue Feb 12 21:29:26 CST 2008


I was trying to get a .NET web client application working in Wine. It would
always die with WinHttpDetectAutoProxyUrl as the last line in the debug
console. Apply this patch (transform the stub declared as stub to stub in C)
and the code gets a little farther. A trace suggests for .NET my "hope this
works" change does indeed work. While I cannot say for certain, it appears
to have decided to assume a transparent proxy, which on almost any sane
Linux installation is the correct assumption.

--- wine-0.9.54/dlls/winhttp/main.bak   2008-02-11 20:54:48.000000000 -0800
+++ wine-0.9.54/dlls/winhttp/main.c     2008-02-11 21:00:01.000000000 -0800
@@ -129,3 +129,16 @@
    SetLastError(ERROR_NOT_SUPPORTED);
    return NULL;
 }
+
+/**********************************************************************
+ *         WinHttpDetectAutoProxyUrl
+ */
+
+BOOL WINAPI WinHttpDetectAutoProxyConfigUrl(DWORD flags, LPWSTR *url)
+{
+       /* This can never work in this environment.
+        * Hope that it assumes transparent. */
+       SetLastError(ERROR_NOT_SUPPORTED);
+       *url = NULL;
+       return FALSE;
+}
--- wine-0.9.54/dlls/winhttp/winhttp.spec       2008-02-11 20:54:39.000000000
-0800
+++ wine-0.9.54/dlls/winhttp/winhttp.spec.bak   2008-02-11 20:52:39.000000000
-0800
@@ -8,7 +8,7 @@
 @ stub WinHttpConnect
 @ stub WinHttpCrackUrl
 @ stub WinHttpCreateUrl
-@ stdcall WinHttpDetectAutoProxyConfigUrl(long ptr)
+@ stub WinHttpDetectAutoProxyConfigUrl
 @ stub WinHttpGetDefaultProxyConfiguration
 @ stdcall WinHttpGetIEProxyConfigForCurrentUser(ptr)
 @ stub WinHttpGetProxyForUrl



More information about the wine-patches mailing list