On a computer that is running Microsoft Internet Explorer
6.0 with the security update MS04-004, when you try to call the InternetConnect method and then the SendRequest API of the WinINet library by passing the server name or the IP
address followed by the virtual directory name, you may receive the following
SendRequest error 12007
Note This error message corresponds to the following error
If you try to pass a server name with the virtually
directory name to the InternetConnect method, you will notice the error message that is mentioned in
the "Symptoms" section. The newer build of the WinINet library adheres strictly
to the way that the Microsoft Developer Network (MSDN) documents the use of
this API. WinINet does not support passing this kind of parameter to the InternetConnect method.
The MSDN documentation for the InternetConnect method describes the second parameter of the InternetConnect method as the following:
lpszServerName [in] Pointer to a null-terminated string that specifies the
host name of an Internet server. Alternately, the string can contain the IP
number of the site, in ASCII dotted-decimal format (for example,
Therefore, the InternetConnect method does not accept anything else other than the server name.
If you also pass the virtual directory after the server name, your call to the InternetConnect method fails.
To resolve this problem, do not pass anything other than the
server name in the InternetConnect method. However, you can pass the IP address instead of the
server name. For example, set the value of the lpszServerName parameter to 18.104.22.168. Therefore, the InternetConnect method only accepts the server name or the IP address.
Alternatively, you can supply the path of the virtual directory followed by the
file that you want to render in the HttpOpenRequest API after you call the InternetConnect method. For example, /mydir/myfile.html.
To resolve this
problem, you can pass the IP or the server name in the InternetConnect method. For example, you can use the InteretConnect method as follows: