When migrating an ATL project from vc6 to vc8, you will get a problem about CComModule.
Problem:
In vc6, there is such a declaration in stdafx.h as:
and in the main module:
But when you complie it in vc8, the following errors apears:
c:\temp\myatl\stdafx.h(24) : error C2146: syntax error : missing ‘;’ before identifier ‘_Module’
c:\temp\myatl\stdafx.h(24) : error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
c:\temp\myatl\stdafx.h(24) : error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
Solution:
In ATL 7.0, which is the ATL version that is included in Visual C++ .NET and in Visual C++ 2005, the CAtlBaseModule class has replaced the obsolete CComModule class.
Microsoft has given the solution in KB309705 – “_AtlBaseModule.m_hInst replaces _Module.m_hInst in ATL 7.0″
http://support.microsoft.com/kb/309705/
Tags: ATL, dll, MS-KB, VC6, VC8, Visual StudioPermalink: Code Library - CComModule in porting ATL DLL project to VC8
Subcribe the update with Google Reader.
RSS feed for comments on this post · TrackBack URI
Leave a reply