http://bugs.winehq.org/show_bug.cgi?id=5800
------- Additional Comments From daniel.skorka@stud.uni-karlsruhe.de 2006-21-08 14:31 ------- Ok, tested the crosscompiled test with J:\wininet_test.exe internet The output was 3 other messages, then "InternetCheckConnectionW succeeded unexpectedly" This was on a different machine (a WinXP home edition box) in a different network. I'll spare you the full capture, it is a busy network.
Results: The box tried 3 times to connect to 209.46.25.134:80 (winehq.org:www) and each time got an ICMP Destination Unreachable (Port Unreachable) from the gateway. No wonder, you need to use the proxy for that. Apart from the DNS querys, no related traffic.
So, my guess: Without FLAG_ICC_FORCE_CONNECTION, Windows does some internal guessing With FLAG_ICC_FORCE_CONNECTION, a direct connection is tried
If you want me to do further testing, you will have to supply the binaries as I do not have a cross compiler. Also, I have to bother someone to actually run the tests, so please try to put as much into one test as possible.
As for the fix: InternetConnect and InternetOpenUrl look to high level for what we want. Isn't there a more low-level function that just opens a connection to a.b.c.d:e, no questions asked?