Author: venkat

MFC: CObject class (Part – 4)

In our previous articles we have discussed about CObject‘s “run-time class information”, “serialization support” and “dynamic object creation” features. In this articles I am going to discuss about CObject‘s “object diagnostic support” feature. Object diagnostic feature is useful to provide additional information…

MFC: CObject class (Part – 3)

As of now we have discussed about CObject class features “run-time class information” and “serialization support” in our previous articles MFC: CObject class (Part – 1) and MFC: CObject class (Part – 2) respectively. In this article I am going…

C#: How to use COM components?

Visual Studio 2012 - "Reference Manager" dialog

.Net supports to use COM functionality within its managed code through its COM Interoperability feature. In this article we are going to discuss about the steps to use COM components within ‘C#’ code. Step 1. First step is add COM…

C++: Inheritance

Inheritance allows to reuse the functionality. Inheritance inherits base class members to derived class. We can use base class members within derived class without rewriting base class code. C++ allows single inheritance as well as multiple inheritance. In single inheritance, derived…

COM: Creating a COM Component using C++ (Part-11)

Finally we have successfully developed our COM component HelloComponent using C++. Lets summarize how we develop our COM component in this article. Microsoft’s Component Object Model (COM) is a specification to allow to write re-usable components and enables them to communicate each…

C++: Templates

C++ Templates are used for writing generic programming. C++ allows to define function templates and class templates. In C++, we use template keyword to write generic programming. The syntax of the template declaration starts with template<class T> Where template is…

COM: Creating a COM Component using C++ (Part-10)

CoCreateInstance is depends on IClassFactory to create class instances. We have looked into IClassFactory‘s methods and we have implemented these methods in our previous article. Lets include IClassFactory‘s implementation into our HelloComponent. We already have HelloComponent‘s declaration in “HelloComponent.h” file and its…

COM: Creating a COM Component using C++ (Part-9)

In our previous article, we have identified that CoCreateFunction is requesting an instance of IClassFactory. Why CoCreateInstance is requesting an instance of IClassFactory? One of the goal of the COM is locate the objects easily without worrying about where they are located and…

COM: Creating a COM Component using C++ (Part-8)

As we discussed in our previous articles, COM’s CoCreateInstance function is used to create instances for COM classes. When the client program calls CoCreateInstance to create an instance of COM class: It actually internally calls another function CoGetClassObject CoGetClassObject checks the…