Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinInet troubleshooting
Message
From
07/04/2000 10:48:41
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00356440
Message ID:
00356878
Views:
30
>>>>and here is the C function declaration:
>>>>
>>>>
BOOL InternetSetOption(
>>>>    IN HINTERNET hInternet,
>>>>    IN DWORD dwOption,
>>>>    IN LPVOID lpBuffer,
>>>>    IN DWORD dwBufferLength
>>>>);
>>>>
>>>>
>>>
>>>Eric, see my reply to the previous question; try allocating a static block and passing the pointer to the block by reference - structures don't like to be moved about.
>>>
>>
>>I will try that whe I get back to that machine.. but where's a struture?
>
>The LPVOID is suspicious - it's either a pointer to a function entrypointy, or to something of indefinite shape and size and type. It's IN, so it shouldn't be getting set, but I'd want to know more about it's construction...

Correct me if this sounds wrong, but I think that its void because its type is not known? IOW, the InternetSetOption is a little like DBSETPROP, in that the second parameter is the name of the option to be set, and the 3rd is the value to set it to. Depending on the value of the second parameter, the third might be a string, an integer, or whatever. Sound good?

BTW, if I pass an actual pointer that I got with Heap.Alloc, I would have to change the declare to reflect an integer, right? I tried, and got the same error I was getting before: 12018- the supplied handle is the wrong type for the requested operation.

Man, this is wierd. I changed the DECLARE to pass an integer for the option setting, and changed the option to one that required an integer (INTERNET_OPTION_CONNECT_TIMEOUT), and the function works fine. But for a function that requires a string, I get the "handle" error. Just to see, I changed the string parameter to pass by value, and it made no difference. If nothing else, it seems I am getting the wrong error number for what is really happening.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform