Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinInet troubleshooting
Message
From
06/04/2000 14:45:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
WinInet troubleshooting
Miscellaneous
Thread ID:
00356440
Message ID:
00356440
Views:
69
Having trouble getting a WinInet function to work, and wondered if anyone can see what I am doing wrong:


DECLARE INTEGER InternetQueryOption IN WinInet.dll ;
INTEGER hInternet, ;
STRING dwOption, ;
STRING @lpBuffer, ;
LONG @lpdwBufferLength

DECLARE INTEGER InternetOpen IN WININET.DLL ;
STRING, ;
INTEGER, ;
STRING, ;
STRING, ;
INTEGER

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

lpdwBufferLength = 0
lpBuffer = SPACE(0)
dwOption = NumToDWord(41)
?InternetQueryOption(hInternet, dwOption, @lpBuffer, @lpdwBufferLength)


41 is the value for a valid option as defined Wininet.h, and NumToDWord is a VFP function that does what its name implies. The call returns 0 (failed), and GetLastError returns the code for "Parameter is Incorrect"

FWIW, the C declaration for InternetQueryoption is:
BOOL InternetQueryOption(
    IN HINTERNET hInternet,
    IN DWORD dwOption,
    OUT LPVOID lpBuffer,
    IN OUT LPDWORD lpdwBufferLength
);
Anyone see what I could be doing wrong?
Erik Moore
Clientelligence
Next
Reply
Map
View

Click here to load this message in the networking platform