Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinInet troubleshooting
Message
From
06/04/2000 15:33:39
 
 
To
06/04/2000 14:45:19
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00356440
Message ID:
00356484
Views:
10
Hi Erik.

The problem, is how you are declaring the second and third parameters.

BOOL InternetQueryOption(
IN HINTERNET hInternet,
IN DWORD dwOption,
OUT LPVOID lpBuffer,
IN OUT LPDWORD lpdwBufferLength
);


So, your declare would look like this:
DECLARE Integer InternetQueryOption IN wininet.dll Integer, Integer, String @, Integer @

hInternet = InternetOpen("EKraft Web Application", 0, NULL,NULL,0)

lpdwBufferLength = 0
lpBuffer = SPACE(0)
dwOption = 41 && This is just fine.
?InternetQueryOption(hInternet, dwOption, @lpBuffer, @lpdwBufferLength)

IF GetLastError() = 122 && Insufficent Buffer
lpBuffer = SPACE(lpdwBufferLength)
?InternetQueryOption(hInternet, dwOption, @lpBuffer, @lpdwBufferLength)
?lpBuffer
ELSE
* big Error
ENDIF

That worked for me in the command window, so if hInternet is a valid handle, this should work just fine.

Good luck.

Rob.
Previous
Reply
Map
View

Click here to load this message in the networking platform