Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
Unregistering an ATL DLL or .exe file that was built with a version of Visual C++ prior to Visual C++ 6.0 might result in an access violation
Article ID: 194180 - View products that this article applies to.
This article was previously published under Q194180
Unregistering an ATL DLL or .exe file that was built with a version of Microsfot Visual C++ prior to Microsoft Visual C++ 6.0 might result in an access violation when Atl.dll (version 3.00.8168) that ships with Visual C++6.0 is installed on the computer.
Running "REGSVR32.EXE /U" to unregister an ATL DLL might display the following error message:
Running an ATL .exe file with the "/Unregserver" switch may display a dialog box titled "OleMainThreadWndName: <server.exe> - Application Error", with the following error message:
DllUnregisterServer in <component.dll> failed. Return code was: 0xc0000005
The ATL server has to be of build type Release MinSize or Unicode Release MinSize.
The instruction at 0x00000000 referenced memory at 0x00000000. The memory could not be read.
In the version of Atl.dll that comes with Visual C++ 6.0, the _ATL_OBJMAP_ENTRY structure has an additional member called "pfnGetCategoryMap". During unregistration, AtlModuleUnregisterServerEx() tries to access this member, which does not exist for ATL servers built prior to Visual C++ 6.0, and the access violation occurs.
To work around this problem, use one of the following options:
Microsoft 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 informationabout Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/194022/ )Visual Studio 6.0 service packs, what, where, why
(http://support.microsoft.com/kb/194295/ )How to determine whether Visual Studio Service Pack is installed
Article ID: 194180 - Last Review: September 2, 2005 - Revision: 4.0