Discussion:
WinHttpGetProxyForUrl with local pac file
(too old to reply)
Shautieh
2011-10-21 13:07:04 UTC
Permalink
Hello,

I need to handle pac files in my application, and while it does work
with WinHTTP for pac files using URLs starting by http or https, it
fails for local pac files (using file://), with an error 12006 when
calling WinHttpGetProxyForUrl. As it work in IE, I guess there should
be a way to get it working!??

I stumbled upon this similar thread (I can't seem to be able to add a
comment there so here I am) :
http://groups.google.com/group/microsoft.public.winhttp/browse_thread/thread/43fc7c8c17aa4e62,
so I tried to implement the InternetGetProxyInfo from WinINet, but I
can't get it to work and it seems it is not supported any more, as you
can see here : http://msdn.microsoft.com/en-us/site/aa383910

You can see more information about my problem here :
http://stackoverflow.com/questions/7847371/wininet-internetgetproxyinfo-error-1003-error-can-not-complete

Do you have any suggestion about how to get this mess right?

Thanks !
Shautieh
2011-10-25 13:18:23 UTC
Permalink
Post by Shautieh
Hello,
I need to handle pac files in my application, and while it does work
with WinHTTP for pac files using URLs starting by http or https, it
fails for local pac files (using file://), with an error 12006 when
calling WinHttpGetProxyForUrl. As it work in IE, I guess there should
be a way to get it working!??
I stumbled upon this similar thread (I can't seem to be able to add a
comment there so here I am) :http://groups.google.com/group/microsoft.public.winhttp/browse_thread...,
so I tried to implement the InternetGetProxyInfo from WinINet, but I
can't get it to work and it seems it is not supported any more, as you
can see here :http://msdn.microsoft.com/en-us/site/aa383910
You can see more information about my problem here :http://stackoverflow.com/questions/7847371/wininet-internetgetproxyin...
Do you have any suggestion about how to get this mess right?
Thanks !
Okay, just to let you know, I found the root cause and it was because
of a call to OleInitialize. What I did was use another thread to
bypass this issue.

Cheers.

Loading...