#import "wininet.dll"
int InternetAttemptConnect(int x);
int InternetOpenA(string sAgent, int lAccessType, string sProxyName = "", string sProxyBypass = "", int lFlags = 0);
int InternetOpenUrlA(int hInternetSession, string sUrl, string sHeaders = "", int lHeadersLength = 0, int lFlags = 0, int lContext = 0);
int InternetReadFile(int hFile, int& sBuffer[], int lNumBytesToRead, int& lNumberOfBytesRead[]);
int InternetCloseHandle(int hInet);
#import
...
int rv = InternetAttemptConnect(0);
if (rv != 0)
{
Print("Ошибка при вызове InternetAttemptConnect()");
return("");
}
int hInternetSession = InternetOpenA("Microsoft Internet Explorer", 0, "", "", 0);
if (hInternetSession <= 0)
{
Print("Ошибка при вызове InternetOpenA()/Session");
return("");
}
int hURL = InternetOpenUrlA(hInternetSession, url, "", 0, 0, 0);
if (hURL <= 0)
{
Print("Ошибка при вызове InternetOpenUrlA() ",url);
InternetCloseHandle(hInternetSession);
return(0);
}