visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Web :: General :: CGI / IIS & Wininet API


By: OpConsole France  Date: 29/04/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
Hi,

I'm having some trouble using Wininet API with CGI. I'm working with CGI written in VC++ with IIS as web server. I'm trying to access web page in one of my CGI like this :

if((hNet = InternetOpen("InterwiseAPI", PRE_CONFIG_INTERNET_ACCESS,
NULL,
INTERNET_INVALID_PORT_NUMBER,
0)) == NULL)
{
dwError = GetLastError();
printf("<hr>Error (Open Connection) : %d<hr>", dwError);
return -1;
}

//

if((hUrlFile = InternetOpenUrl(hNet, gpcRequest,
NULL,
0,
INTERNET_FLAG_RELOAD,
0)) == NULL)
{
dwError = GetLastError();
printf("<hr>Error (Open Url : %d<hr>", dwError);
return -1;
}


And i still get a 12007 with InternetOpenUrl (DNS failed). It work fine if i use it in a console app on the same server running IIS. This server access the internet via a proxy so i suppose that there is a problem reading the internet configuration (PRE_CONFIG_INTERNET_ACCESS). If someone have a solution ...

Thanks.
By: VGR Date: 29/04/2003 18:11:00 English  Type : Answer
I guess you've to explicitly set the proxy (name,port) data

Do register to be able to answer

EContact
browser fav
page generated in 291.474820 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page