<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code Library &#187; MS-KB</title>
	<atom:link href="http://www.ucosoft.com/tag/ms-kb/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ucosoft.com</link>
	<description>Free Source Code and Program Tips</description>
	<lastBuildDate>Mon, 19 Jul 2010 04:51:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>CComModule in porting ATL DLL project to VC8</title>
		<link>http://www.ucosoft.com/ccommodule-in-porting-atl-dll-project-to-vc8.html</link>
		<comments>http://www.ucosoft.com/ccommodule-in-porting-atl-dll-project-to-vc8.html#comments</comments>
		<pubDate>Fri, 22 Jun 2007 01:33:15 +0000</pubDate>
		<dc:creator>support</dc:creator>
				<category><![CDATA[Win32/MFC]]></category>
		<category><![CDATA[ATL]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[MS-KB]]></category>
		<category><![CDATA[VC6]]></category>
		<category><![CDATA[VC8]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.ucosoft.com/2007/06/22/ccommodule-in-migrating-atl-dll-project-to-vc8.html</guid>
		<description><![CDATA[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: extern CComModule _Module; and in the main module: CComModule _Module; But when you complie it in vc8, the following errors apears: c:\temp\myatl\stdafx.h(24) : error C2146: syntax error :]]></description>
			<content:encoded><![CDATA[<p>When migrating an ATL project from vc6 to vc8, you will get a problem about CComModule.</p>
<p><strong>Problem</strong>:</p>
<p>In vc6, there is such a declaration in stdafx.h as:<br />
<coolcode lang="cpp" linenum="no">extern CComModule _Module;</coolcode></p>
<p>and in the main module:</p>
<p><coolcode lang="cpp" linenum="no">CComModule _Module; </coolcode></p>
<p>But when you complie it in vc8, the following errors apears:<br />
<coolcode lang="cpp" linenum="no"><br />
c:\temp\myatl\stdafx.h(24) : error C2146: syntax error : missing &#8216;;&#8217; before identifier &#8216;_Module&#8217;<br />
c:\temp\myatl\stdafx.h(24) : error C4430: missing type specifier &#8211; int assumed. Note: C++ does not support default-int<br />
c:\temp\myatl\stdafx.h(24) : error C4430: missing type specifier &#8211; int assumed. Note: C++ does not support default-int<br />
</coolcode></p>
<p><strong>Solution</strong>:</p>
<p>In ATL 7.0, which is the ATL version that is included in Visual C++ .NET and in Visual C++ 2005, the <strong>CAtlBaseModule</strong> class has replaced the obsolete <strong>CComModule</strong> class.</p>
<p>Microsoft has given the solution in KB309705 &#8211; &#8220;_AtlBaseModule.m_hInst replaces _Module.m_hInst in ATL 7.0&#8243; </p>
<p><a href="http://support.microsoft.com/kb/309705/ ">http://support.microsoft.com/kb/309705/ </a></p>

	Tags: <strong><a href="http://www.ucosoft.com/tag/atl" title="ATL" rel="tag">ATL</a>, <a href="http://www.ucosoft.com/tag/dll" title="dll" rel="tag">dll</a>, <a href="http://www.ucosoft.com/tag/ms-kb" title="MS-KB" rel="tag">MS-KB</a>, <a href="http://www.ucosoft.com/tag/vc6" title="VC6" rel="tag">VC6</a>, <a href="http://www.ucosoft.com/tag/vc8" title="VC8" rel="tag">VC8</a>, <a href="http://www.ucosoft.com/tag/visual-studio" title="Visual Studio" rel="tag">Visual Studio</a></strong><br />

	<ul class="st-related-posts">
	<li><a href="http://www.ucosoft.com/some-useful-shortcut-of-visual-studio-6.html" title="Some useful shortcut of Visual Studio 6 (November 30, 2006)">Some useful shortcut of Visual Studio 6</a> (0)</li>
	<li><a href="http://www.ucosoft.com/visual-sourcesafe-microsofts-source-destruction-system.html" title="Some comment about Visual SourceSafe (November 21, 2006)">Some comment about Visual SourceSafe</a> (0)</li>
	<li><a href="http://www.ucosoft.com/microsoft-visual-c-tips-and-tricks2.html" title="Microsoft Visual C++ Tips (November 21, 2006)">Microsoft Visual C++ Tips</a> (0)</li>
	<li><a href="http://www.ucosoft.com/make-the-code-completion-working-again-in-vc-60.html" title="Make the Code Completion working again in VC++ 6.0 (December 6, 2006)">Make the Code Completion working again in VC++ 6.0</a> (0)</li>
	<li><a href="http://www.ucosoft.com/install-global-hook-without-dll.html" title="Install global hook without dll (January 3, 2007)">Install global hook without dll</a> (2)</li>
	<li><a href="http://www.ucosoft.com/how-to-enable-profile-in-vc-6.html" title="How to enable &#8220;profile&#8221; in Visual C++ 6.0 (December 28, 2006)">How to enable &#8220;profile&#8221; in Visual C++ 6.0</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ucosoft.com/ccommodule-in-porting-atl-dll-project-to-vc8.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
