Article ID: 201318 - Last Review: April 28, 2005 - Revision: 3.0 You receive a "The system cannot find the file specified" error message when you register an ATL server with a long nameThis article was previously published under Q201318 SYMPTOMS Registering an ATL server that has a long file name or one
that resides in a directory with a long path name, returns a 0x80070002 error:
The system cannot find the file
specified. CAUSE ATL's registration code uses GetShortPathName() to retrieve
the short name of the file and uses the short name for registration.
GetShortPathName() fails if the file doesn't have a short file name. The
default behavior in Windows NT, Windows 95, and Windows 98 is to automatically
create short file names (8.3 format) for files with long names. You can turn
this option off by using the "System Policy Editor" (Poledit.exe). Certain file
systems also don't support creation of short names by default. ATL tries to use
the invalid file name returned by GetShortPathName() in a call to
LoadLibraryEx(), and fails with 0x80070002. RESOLUTION When GetShortPathName() is called in the ATL source, add
code to check whether or not it succeeded. The following functions must be
modified:
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This
bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information, click the following article number to view the article in the Microsoft Knowledge Base: 194295
(http://support.microsoft.com/kb/194295/
)
HOWTO: Tell That Visual Studio 6.0 Service
Packs Are Installed
For more information, click the following article number to view the article in
the Microsoft Knowledge Base: 194022
(http://support.microsoft.com/kb/194022/
)
INFO: Visual Studio 6.0 Service Packs, What, Where, Why
MORE INFORMATION ATL registers servers using the short file name to work
around a bug in Windows NT's CreateProcess() function. For more information, click the following article number to view the article in the Microsoft Knowledge Base: 179690
(http://support.microsoft.com/kb/179690/
)
FIX: Launching COM
Server with Long File Name Returns 0x80080005
For more information, click the following article number to view the article in
the Microsoft Knowledge Base: 173673
(http://support.microsoft.com/kb/173673/
)
Windows NT Server Tools for Windows NT
Workstation 4.0 Available
REFERENCES For more
information, click the following article number to view the article in the
Microsoft Knowledge Base: 179690
(http://support.microsoft.com/kb/179690/
)
BUG: TCProps.dll Fails to Register During Setup
| Article Translations
|
Back to the top
