Web :: General :: CGI / IIS & Wininet API |
|||
| By: OpConsole |
Date: 29/04/2003 00:00:00 |
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 | Type : Answer |
|
| I guess you've to explicitly set the proxy (name,port) data |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








