The information in this article applies to:
SYMPTOMSCalling CHttpFile::ErrorDlg results in one of the following error messages:
CAUSEMFC 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. RESOLUTIONIt is possible to call the InternetErrorDlg function yourself. Following is a section of the Tear sample modified to do so:
In some cases, you may want different parameters for InternetErrorDlg. See
the WinInet documentation for InternetErrorDlg and the MFC source code for
CHttpFile::ErrorDlg. Note that you must change your project setting to link
with wininet.lib in order to use InternetErrorDlg.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. 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.
Notice that SetOption is being called on the CHttpConnection per the
InternetSetOption documentation in Visual C++ which states the following:
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
© Microsoft Corporation 1997, All Rights Reserved. Additional query words: kbMFC kbVC500bug kbWinInet
Keywords : kbWinInet |
Last Reviewed: July 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |