Microsoft KB Archive/309705

= _AtlBaseModule.m_hInst replaces _Module.m_hInst in ATL 7.0 =

Article ID: 309705

Article Last Modified on 1/11/2006

-

APPLIES TO


 * Microsoft Visual C++ 2005 Express Edition
 * Microsoft Visual C++ .NET 2003 Standard Edition
 * Microsoft Visual C++ .NET 2002 Standard Edition

-



This article was previously published under Q309705



SUMMARY
In Microsoft Visual C++ 6.0, an instance of CComModule named &quot;_Module&quot; is present in every Active Template Library (ATL) DLL project. CComModule contains a handle to the module instance in member _Module.m_hInst. Because the _Module object does not exist in Microsoft Visual Studio .NET and in Microsoft Visual Studio 2005, you can no longer access the module instance handle through _Module.m_hInst.



MORE INFORMATION
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, which was used in earlier versions of ATL. This class is instantiated in every ATL project. class CAtlBaseModule : public _ATL_BASE_MODULE An instance of CAtlBaseModule named &quot;_AtlBaseModule&quot; is present in every ATL project. It contains a handle to the module instance and a handle to the module that contains resources (which by default are the same) and an array of handles to modules that provide primary resources.

To access the module instance handle in ATL 7.0, you can use _AtlBaseModule.m_hInst.

For more infomation about Visual Studio 2005, visit the following Web site:

http://msdn2.microsoft.com/en-us/library/bwfd57ew.aspx

Keywords: kbinfo KB309705

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.