Article ID: 148806 - Last Review: November 21, 2006 - Revision: 4.1 BUG: You receive a "Cannot find the file <FileName>" error message in Windows 95 or in Windows 98 when you open a document and the associated executable is an MFC application that has a long file nameThis article was previously published under Q148806 On This PageSYMPTOMS When you try to open a document whose extension is
associated with an MFC application that has a long file name on Windows 95 or
Windows 98, a dialog box with an error message similar to the following
appears: Cannot find the file 'filename' (or one of its
components). Make sure the path and filename are correct and that all required
libraries are available. On Windows Millennium Edition (Me), the error message is:
Windows cannot find '<filename>'. You may have typed the name incorrectly
in the Run dialog, or another open program cannot find a system file. To search
for a file, click the Start button, and then click Search. CAUSE The MFC function CWinApp::RegisterShellFileTypes() writes
the application's 8.3 file name to the registry. However,
CWinApp::EnableShellOpen() calls ::GlobalAddAtom() with the application's long
file name. Windows 95 and Windows 98 cannot handle this situation.
RESOLUTION Override CWinApp::EnableShellOpen() using the sample code
below to pass the application's short file name to ::GlobalAddAtom().
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section. This problem was corrected in Microsoft Visual C++ .NET. MORE INFORMATIONSteps to reproduce the problem on a computer that is running Windows 95 or Windows 98
APPLIES TO
| Article Translations
|

Back to the top
