CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

Author : venkat

Visual C++ – How to create modal dialog and modeless dialogs using MFC ?

MFC (Microsoft Foundation Classes) provides classes to deal with dialogs. Dialog boxes are very useful to take user inputs, displaying and allowing the users to change configuration settings, displaying messages or warnings or errors etc.,. Dialogs are classified into two types depending on their behavior. One is modal dialog and another one is modeless dialog. […]

C# – How to use COM components?

.Net supports to use of COM (Component Object Model) functionality within its managed code through its COM Interoperability feature. In this article, we are going to discuss the steps to use COM components within the ‘C#’ code. Step 1. The first step is to add the COM component as a reference to the C# project. […]

Visual C++ – Creating an ATL COM Component (Part – 1)

Active Template Library (ATL) is a lightweight library used to develop COM-based components using Visual C++. Through ATL we can quickly develop COM components or COM services. In this article, I am trying to explain the steps to create an ATL COM component using Microsoft Visual C++ and Microsoft Visual Studio 2012 IDE (Integrated Development […]

C++ – Inheritance – to extend class

Inheritance allows reusing the functionality. Inheritance inherits base class members to its derived class. We can use base class members within the derived class without rewriting the base class code. C++ allows single inheritance as well as multiple inheritances. In single inheritance, the derived class is inherited from a single base class. In multiple inheritances, […]

COM – Creating a COM Component using C++ – Add Type Library to Visual Basic Application

In our previous article, we have created Type Library “Hello.tlb”. We were facing issues when we tried to add “HelloComponent.dll” as a reference to our Visual Basic test application. Hence we have created “Hello.tlb” Type Library. And we observed that even with “Hello.tlb” Type Library, Visual Basic test application (console based application) is showing error […]

COM – Creating a COM Component using C++ – Summary of component development

Finally, we have successfully developed our COM component HelloComponent using C++. Let’s summarize how we developed our COM component in this article. Microsoft’s Component Object Model (COM) is a specification to allow to write of reusable components and enables them to communicate with each other. COM depends on interfaces to achieve its goals. One of […]

C++: Templates

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

COM – Creating a COM Component using C++ – IClassFactory implementation

CoCreateInstance depends on IClassFactory to create class instances. We have looked into IClassFactory‘s methods and we have implemented these methods in our previous article. Let’s include IClassFactory‘s implementation into our HelloComponent. We already have HelloComponent‘s declaration in the “HelloComponent.h” file and its implementation in the “HelloComponent.cpp” file. In the same way, we will add the IClassFactory […]

Scroll to top