Using COM Objects

Briefly described, the Component Object Model (COM) is an open architecture for cross-platform development of client/server applications based on object-oriented technology. COM is a way of creating reusable software components. Clients have access to an object through interfaces implemented on the object. COM is language-neutral, so any language that produces ActiveX® components can also produce COM applications. The CML developers chose to program COM objects in Microsoft® Visual Basic®.

A COM server is any object that provides services to clients. There are two main types of servers, in-process and out-of-process. In-process servers are implemented in a dynamic-linked library (DLL), and out-of-process servers are implemented in an .exe file.

The CML application implements in-process servers (DLLs). Components run in the same process as the Web application that contains the Active Server Pages script that creates the component instance. All components implemented in Microsoft Transaction Server (MTS) are in-process servers.

An out-of-process server is an object application implemented in an executable file that runs in a separate process space. One example of an out-of-process server is a client application calling an .exe file on a server.

When choosing between in-process and out-of-process servers, consider that running a component in-process with applications often provides superior performance to out-of-process servers.

Advantages of components: