Microsoft KB Archive/217772

= You receive the "An unknown error occurred while accessing an unknown file" error message when you run a Visual C++ 5.0 application after you install a Visual C++ 6.0 application =

Article ID: 217772

Article Last Modified on 11/21/2006

-

APPLIES TO

 Microsoft Foundation Class Library 4.2, when used with:  Microsoft Visual C++ 6.0 Enterprise Edition

 Microsoft Visual C++ 6.0 Professional Edition

 Microsoft Visual C++ 6.0 Standard Edition  Microsoft Windows Internet Services (WinInet)</li></ul>

-

<div class="notice_section">

This article was previously published under Q217772

<div class="symptoms_section">

SYMPTOMS
After installing a Visual C++ 6.0 application that uses MFC, the Mfc42.dll that was shipped with Visual C++ 6.0 may be installed. This may cause problems for existing applications that were developed using MFC from Visual C++ 5.0 and that used the CAsyncMonikerFile class. In particular, a call to CAsyncMonikerFile::Open will return an the following error:

An unknown error occurred while accessing an unknown file

This error occurs on machines that have Internet Explorer 3.02 or earlier installed.

<div class="cause_section">

CAUSE
This problem occurs because of a bug in Visual C++ 6.0's implementation of the CAsyncMonikerFile MFC class.

<div class="workaround_section">

WORKAROUND
To work around this problem, use one of the following methods:
 * Install Internet Explorer 4.0 or higher.
 * Place the Mfc42.dll from the Visual C++ 5.0 version in the same directory as the EXE or DLL. This may not be an option if you depend Mfc42.dll being in the system directory. For example, an OCX that downloads over the Internet would use the version of MFC in the windows system directory.
 * Link to MFC statically for any application developed with Visual C++ 5.0 and using CAsyncMonikerFile.

Note This method does not work for an OCX developed with Visual C++ 5.0 because you cannot link statically to MFC when developing an OCX in Visual C++ 5.0.

Additional query words: Backward compatible bug MFC42.DLL port

Keywords: kbbug kbnoupdate kbprb KB217772

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.