Tag: C++

C++: Operator Overloading

One of the beautiful feature of ‘C++’ is its ability to support Operator Overloading. ‘C++’ Operator Overloading allows to change the behavior of operators when using them with ‘C++’ class objects. One of the best example of Operator Overloading is…

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…

ASP.Net: Simple webpage

ASP.Net is a web framework for building web sites. ASP.Net has been designed to be fully integrated with the .Net framework. ASP.Net works with Internet Information Services (IIS) to deliver the content. ASP.Net pages are with .aspx extension. ASP.Net files can…

.Net: Assemblies (Part – 6)

As of now, we have created a hello shared assembly and installed it into GAC. We also created a new version of hello assembly and installed it into GAC. Now both these versions are inside GAC. We have created a…

C++: Why virtual? (Part-3)

Another interesting feature of Object Oriented Programming is its inheritance. Inheritance inherits the behaviors or attributes from its parent or base classes. C++ uses virtual inheritance to overcome the inheritance ambiguity in multiple-inheritance. Inheritance ambiguity will occur when derived class object is…

C++: Class Constructors

In C++, Class constructors are special kind of methods to instantiate a class. When class’s object is going to create, first C++ will call class’s constructor to initialize the class. Initialize the class means, assigning its members and allocating any…

.Net: Assemblies (Part – 4)

As of now we have created hello assembly and testapp application. testapp application will call the function SayHello (it just prints “Hello, World!” on the console) resides in hello assembly. We have created strong name for hello assembly and installed…

C++: Why virtual? (Part-2)

An interface is a contract between a caller and a callee. An interface doesn’t provide any implementation. It provides a blue-print. C++ uses virtual keyword to create an interface or an abstract class. Lets take an example: class IHello {…

.Net: Assemblies (Part – 3)

We have created hello.exe assembly in our previous article and installed it into Global Assembly Cache (GAC). Lets look at where in GAC this assembly installed. As we discussed in our previous article(s), GAC is the location where shared assemblies…

C++: Why virtual? (Part-1)

C++ is a Object Oriented language. C++ uses virtial keyword for different places. One of this is in creating virtual functions. One of the Object Oriented feature is Polymorpishm which means multiple-behaviours. An object has multiple behaviours and it shows particular…

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…

C#: Delegates

Delegates are the references to the methods to call the methods indirectly. Delegates holds the address of the method(s); so, it will be easy to call methods through Delegates. But why we use Delegates and why can’t we always call…

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.…

C++: Pure Virtual functions

C++ Pure Virtual functions are used to create an abstract classes or interfaces. Pure Virtual functions have no function definition; just the function will be declared and the definition left to the derived classes. In C++, like Java, there is…