General information
Category:
Windows API functions
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only