Tutorial 7 - Creating ActiveX COM Controls using VC++ MFC and ATL
 

In this tutorial, creation of a basic Active X COM control is explained using an example "System Info Control ". The tutorial also shows how to use this control in COM enabled packages such as VB 6.0 and VC++.

What is a COM? : Component Object Model (COM), is a software architecture that allows the components made by different software vendors to be combined into a variety of applications. COM defines a standard for component interoperability (in binary level ), is not dependent on any particular programming language, is available on multiple platforms, and is extensible. Two main interfaces of COM and their importance are given below.

IUnknown: This is the interface every COM Object should implement. The IUnknown interface lets clients get pointers to other interfaces on a given object through the QueryInterface method, and manage the existence of the object through the IUnknown::AddRef and IUnknown::Release methods. All other COM interfaces are inherited, directly or indirectly, from IUnknown. Therefore, the three methods in IUnknown are the first entries in the VTable for every interface.

IDispatch : IDispatch interface exposes objects, methods and properties to programming tools and other applications that support Automation. COM components implement the IDispatch interface to enable access by Automation clients, such as Visual Basic.

Please go through MSDN for more information about COM. Click on the appropriate link below to see the Video and the source tutorials.



Download Source of Creating ActiveX COM Controls using VC++ MFC and ATL

   

 
Download VC++ In Easy Steps