devxlogo

Tip Bank

Support COM+ constructor strings in serviced components

Having a VB6 component support a COM+ construction string requires that you implement the IObjectConstruct interface and its only method, Construct. The .NET ServicedComponent class implements this interface internally and

Disable COM+ 1.5 applications and components

COM+ 1.5 (provided with Windows XP) has an interesting feature that is missing in COM+ 1.0: the ability to disable entire COM+ applications or just their individual components. You can

Avoiding Recursive Header Includes

In C/C++ header files, it’s often necessary to include the header files of sub classes or classes which are used. For example: #include “a.h”

Using Prototypes Rather than RTTI

In some situations, you may want a certain data member of two different objects to be identical. For example, suppose you are writing a graphics program that will render a

Avoid Redundant Function Prototypes

In common top-down C/C++ programming, the main() function is written first, and then the functions that it calls, and then in turn the functions those functions call. For relatively small

Tail Recursion

Tail recursion is a special way of writing recursion in C/C++, which minimizes the time and memory, this can be done just by storing the value of variable in some

SaveBinaryData – Serializing an object to file in binary format

‘ Serialize an object to file in binary format’ It can handle types that the SOAP serialization can’t’ Requires:’ Imports System.IO’ Imports System.Runtime.Serialization.Formatters.BinaryPrivate Sub SaveBinaryData(ByVal path As String, ByVal o