You may receive a WinINet 12007 error message when you call the SendRequest API after you apply the MS04-004 security update (839873)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 6 (SP1)
SYMPTOMSOn 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 error message: SendRequest error 12007 Note This error message corresponds to the following error message: ERROR_INTERNET_NAME_NOT_RESOLVED
This error message translates to the following: The server name could not be resolved
CAUSEIf 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, 11.0.1.45). 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. RESOLUTIONTo 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 11.0.1.45. 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: hConnect = InternetConnect(hOpen, "www.microsoft.com", INTERNET_DEFAULT_HTTP_PORT,
NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); REFERENCESFor additional information, visit the following Microsoft Web sites:
Modification Type: | Minor | Last Reviewed: | 7/14/2004 |
---|
Keywords: | kbtshoot kbWebBrowser kbpatch kbAPI kbInetDev kbprb KB839873 kbAudDeveloper |
---|
|
|
©2004 Microsoft Corporation. All rights reserved.
|
|