Article ID: 309705 - Last Review: January 11, 2006 - Revision: 3.0

_AtlBaseModule.m_hInst replaces _Module.m_hInst in ATL 7.0

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
This article was previously published under Q309705
Expand all | Collapse all

SUMMARY

In Microsoft Visual C++ 6.0, an instance of CComModule named "_Module" 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 "_AtlBaseModule" 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 (http://msdn2.microsoft.com/en-us/library/bwfd57ew.aspx)

APPLIES TO
  • Microsoft Visual C++ 2005 Express Edition
  • Microsoft Visual C++ .NET 2003 Standard Edition
  • Microsoft Visual C++ .NET 2002 Standard Edition
Keywords: 
kbinfo KB309705