Tag: COM

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…

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

DLL with exported functions showing in Microsoft's Dependency Walker Tool

In previous article, we have created a test application to test our COM component. When we rant our test application, it was displaying “Class not registered” error message. Before re-looking into our component and test application code; lets understand in what scenarios…

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

In series of articles on creating a COM Component using C++, in previous article, we have implemented a component using C++. The component implemented IUnknown standard interface and IHello custom interface. Custom interfaces are the interfaces defined by us. Standard interfaces are…

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

COM (Component Object Model) is a platform-independent, distributed and object-oriented technology developed by Microsoft to create re-usable software components and enables software components to communicate. COM enables interaction between objects through interfaces. Interfaces are core concepts to build COM components.…