_AtlBaseModule.m_hInst replaces _Module.m_hInst in ATL 7.0 (309705)



The information in this article applies to:

  • Microsoft Visual C++ 2005 Express Edition
  • Microsoft Visual C++ .NET (2003)
  • Microsoft Visual C++ .NET (2002)

This article was previously published under Q309705

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:

Modification Type:MajorLast Reviewed:1/11/2006
Keywords:kbinfo KB309705 kbAudDeveloper