Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinInet troubleshooting
Message
From
07/04/2000 11:47:57
 
 
To
07/04/2000 10:48:41
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00356440
Message ID:
00356931
Views:
23
Hi Erik.

You have everything correct on your call to InternetSetOption function call.
Except that you should always add a CHR(0) to the end of any strings passed in API calls, just to be safe.

The problem is in the InternetOpen function call. The second, third and fourth parameter defines the type of handle that is created. You are trying to set proxy information with the InternetSetOption. In this case, the internet connection must be connected through a proxy server for the InternetSetOption call to work. In all other cases it fails with the 12018 error message.

So the InternetOpen call would look something like this:

hInternet = InternetOpen("someagent", INTERNET_OPEN_TYPE_PROXY, "50.50.50.1", NULL, 0)

50.50.50.1 would be the IP or a Local network name of a valid proxy server. The fourth parameter is a proxy bypass list (which is NULL in the example above). If the address being connected to is in this list, the Internet handle becomes a type of INTERNET_OPEN_TYPE_DIRECT and the InternetSetOption function would fail when tring to set proxy information.

If you need a proxy server software package to test with, I know of a freeware version that works great on NT. It only supports 2 or 3 concurrent connections though, unless you register it.

Well, I hope that helps.

Rob.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform