Article ID: 189094 - Last Review: December 2, 2003 - Revision: 2.0 FIX: Calling CHttpFile::ErrorDlg Function Causes Errors 127 & 2This article was previously published under Q189094 SYMPTOMS
Calling CHttpFile::ErrorDlg results in one of the following error messages:
Error: (127) The specified procedure could not be found.
Error: (2) The system cannot find the file specified.
CAUSE
MFC attempts to call the Unicode or American National Standards Institute
(ANSI) versions of most Win32 Internet Extensions (WinInet) functions when
appropriate. In the case of the ErrorDlg function, MFC attempts to call the
Unicode or ANSI version of the InternetErrorDlg function. For
InternetErrorDlg, Unicode and ANSI versions are not necessary (no character
data is passed in) and in fact, not available. When MFC attempts to call
the Unicode or ANSI version of the function, the function is not found in
the DLL.
RESOLUTION
It is possible to call the InternetErrorDlg function yourself. Following is
a section of the Tear sample modified to do so:
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products
listed at the beginning of this article. This bug has been fixed in Visual C++ 6.0
MORE INFORMATION
When you run the MFC Internet Tear sample, an error is reported and the
program fails if the site being accessed uses Basic Authentication without
allowing anonymous access and with NTLM turned off.
It is also possible to collect the User Name and Password yourself and send a new request for data, as in the following example:
Sets the user name associated with a handle returned by InternetConnect.
Calling SetOption on the CInternetSession will result in an Access
violation in WinInet.dll.
REFERENCES
The Internet Client SDK: Internet Tools and Technologies; WinInet API
(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Robert Duke, Microsoft Corporation APPLIES TO
| Article Translations
|

Back to the top
