The COM / DCOM Glossary
Dan Simon
Innovatia Software
[email protected]
� 1999�2001 Innovatia Software. All
Rights Reserved.
This paper provides a
glossary and discussion of acronyms and terms related to COM, the Component
Object Model. DCOM stands for Distributed COM. I was surprised at how many
acronyms I found when I started studying COM and DCOM. My background is
primarily from the Visual Basic end of things, so that slant will be reflected
in the definitions found here. Some of the discussion here is specific to VB6,
but the vast majority of this paper applies to VB5 as well. If you have any
additions, corrections, or questions, please feel free to email me.
Abstract Base Class - A class that does not include an implementation and
therefore cannot be directly used. It is used to derive other classes; the
derived classes implement the methods.
ACID - The ACID rules are rules that are
met by a well-designed OLTP system. The ACID acronym stands for Atomic, Consistent, Isolated, and Durable.
Activation
- The act of a client loading and binding to a server object.
Active Directory - The database that holds information about component locations, users,
groups, passwords, security, and other COM information. Some of this
information is currently stored in the Registry, but will eventually (with
Windows 2000) be moved to the Active Directory.
ActiveX - An ActiveX component is a COM
component that is intended to be portable across more than one platform. Among
other things, ActiveX controls can be downloaded from a web server and operate
on the client computer outside of the web browser. This is in contrast to a
Java applet, which can only operate within the confines of a web browser.
ActiveX controls were originally called OLE controls before they were modified
to work over the internet.
ADO - ActiveX Data Objects. These are
COM objects that allow database access.
ADSI - Active Directory Service
Interface, formerly known as ODSI. An interface by which developers can access Directory services.
Apartment
- A COM service that provides an execution context for COM objects in such a
way as to eliminate the possibility of conflict between threads. There are two kinds of apartments:
MTAs, which contain more than one
thread, and STAs, which contain only one thread. A process never has more
than one MTA, but can have many STAs.
AppID - A
string that represents a COM application (which is a collection of CLSIDs).
ASP - Active Server Pages. This is an
HTML web page that is custom-built in real time. ASP pages can be run as MTS objects. You can use VBScript
inside ASP pages and IIS will parse the VBScript. An ASP page can load
COM-based DLLs. Understanding ASP is the key to designing web-based COM
applications. You can use IISAD to design ASP pages.
Atomic -
This is the A in the ACID acronym. An atomic transaction is one that is
all-or-nothing. Either everything is successfully updated or nothing is
updated.
Automation
- The binding of a client to a server object at run-time. Automation allows a
client to bind to a server object without having a type
library available
at compile time. Automation uses the IDispatch interface.
Automation Controller - A client that uses IDispatch to communicate with an automation
server.
Automation Server - A server component that uses the IDispatch interface.
Binary Compatible - See Version Identical.
BSTR - Basic String. This is a data type
that is stored as a string length value and a null-terminated character array.
ByRef -
This is a way of passing the address of an argument to a procedure. This allows
the the value of the argument to be changed in the calling routine. ByRef is
the default method of passing arguments in VB. Objects that are created in VB
can be passed by reference only. Even if you use the ByVal keyword in front of an object in a
procedure declaration, the object is still passed by reference. Declaring a
primitive data type as a ByRef argument in a server object results in the
argument making a complete round trip when a client invokes a method on a remote object.
ByVal -
This is a way of passing the actual value of an argument to a procedure. This
allows the procedure to use a temporary copy of the argument variable, so the
value of the argument is never changed in the calling routine. Declaring a
primitive data type as a ByVal argument in a server object results in the
argument going only from the client to the server when the client invokes a
method on a remote object. This is much more efficient than using ByRef, which results in a round
trip of the
argument.
Callback -
The execution of a client method by a server object. This is a better
alternative than using events because you can control which client gets the callback in
case of multiple clients. Also, callbacks are faster because they use vTable
binding. In
addition, they're more flexible than events because you can pass optional
parameters and arrays, which you cannot do with events.
Class Factory - Also referred to as a COM class object. It is an object that lives in
a server that is responsible for creating the objects registered by that
server. The class factory is activated by the SCM.
Class Table
- A machine-wide table that holds the class
factory object
references for every registered CLSID.
Client - A
COM program running on a computer that creates objects in another process
called a server.
CLSID -
Class ID, a GUID for a COM coclass.
CoClass -
A COM implementation of a server class that is used by clients to create
objects.
COM - Component Object Model; a
specification for writing reusable software components; an infrastructure that
allows objects to communicate between processes and computers. All VB objects,
including forms and controls, are COM objects. One of the main strengths of COM
is that it integrates so many distributed application services in one package.
COM class
object - See Class
Factory.
COM+ - An extension of COM. (I suppose
the next version will be called COM++.) COM+ will introduce an improved version
of the SPM (which
will be called the In-Memory Database). It will also provide an asynchronous eventing service for raising events in
multiple clients. And it will use the MSMQ services more transparently. Plus
it will automate load balancing when multiple servers are involved in your
application.
Compatibility - This defines the relationship
between a new version of a COM object and previous versions. You can specify
one of three levels of compatibility in the VB Project Properties: version
identical, version
compatible, or version
incompatible.
Consistent
- This is the C in the ACID acronym. A consistent transaction is one that leaves data
in a consistent state. Data should not contradict each other.
CORBA - Common Object Request Broker
Architecture. This is a distributed object specification that competes with
COM.
DACL - Discretionary Access Control
List. This is a list that controls who can do what with your server objects. An
administrator can use DCOMCNFG to configure the DACL.
DBMS - Database Management System, such
as Oracle or Microsoft SQL Server.
DCE - Distributed Computing
Environment. This is code that provides an RPC standard. It can also be used to
develop distributed applications.
DCOM - Distributed COM; COM over a wire; COM between more
than one computer; COM with RPC.
DCOMCNFG -
A utility that allows you to configure security for COM applications. The
utility ships with COM and is run by selecting Start, then selecting Run, then
typing dcomcnfg.exe. The SCM uses the security settings to decide who can do what with
COM objects. Note that DCOMCNFG allows only application-wide security settings.
It does not allow individual security settings for individual objects within a
single application.
Deadlock - When two or more transactions
conflict in such a way that each is waiting for the other before they proceed.
For instance, Transaction A might have a lock on Record 1 while trying to write
to Record 2, while Transaction B has a lock on Record 2 while trying to write
to Record 1. The two transactions will wait for each other forever unless the
deadlock is somehow resolved.
DLL - Dynamic Link Library. COM server
DLLs run in the same process as their clients, unless the DLL is running in a surrogate
process.
DTC - Distributed Transaction
Coordinator. This is a product that coordinates distributed transactions. It
originally shipped with SQL Server 6.5 but now runs on Windows NT as a system
service. With VB you can create objects inside an MTS transaction by setting
the MTSTransactionMode in the class properties dialog box. This results
in the automatic use of the DTC to control transactions associated with that
class.
Dual Interface - An interface that offers binding
through IDispatch as well a through a vTable. VB automatically builds objects
using dual interfaces. That means that VB-built objects can be accessed by both
vTable clients and automation clients.
Durable -
This is the D in the ACID acronym. Changes due to a transaction should be stored in
stable storage and should be recoverable in case of system failure.
Early Binding - VB provides this type of binding to an object that has only an IDispatch
interface. The
binding is done at compile time, but it's slower than vTable binding because the client uses Invoke to execute the object's methods.
Encapsulation - A fundmental principle of OOP; the ability of an object to hide its data and its methods
from the rest of the world.
Event - A
procedure in an object that can be raised (called) outside of the object. Servers
and clients can raise events in each other. As an alternative to raising events
you can use callbacks. Events are implemented in VB using the IDispatch interface which means that raising
an event takes longer than vTable
binding. Events use
early binding.
EXE - Executable file. COM server EXEs
run in different processes than their clients, either on the same computer or a
different computer.
Friend - A
VB method that is available from anywhere within a project, but unavailable
everywhere outside the project.
GUID - Globally Unique Identifier, a
128-bit integer that uniquely identifies COM coclasses
and interfaces. These are compiled into a COM
server's type library.
IDispatch
- An interface that extends IUnknown to allow run-time binding to server objects. Server objects
that use this interface are called automation
servers. Clients
that use this interface are called automation controllers.
IDL - Interface Definition Language. A
C-like language used to define interfaces and coclasses for COM. OleView is a COM utility that reverse-engineers a type
library into a
readable form of IDL. IDL is used to provide language-independence for COM
interfaces so that identical interfaces defined in VB, C++, and Java look the
same in IDL even though they look different in the language used for
implementation.
IID - Interface ID, a GUID for a COM interface.
IIS - Internet Information Server. This
is a Microsoft application that allows the creation of web-based applications
that interact with COM server objects. Web pages that interact with COM server
objects are called ASP pages.
IISAD - Internet
Information Server Application Designer. This is an extension of the VB
development environment that helps in the creation of web applications and ASP pages. Use IISAD for large-scale
web applications and skip it for smaller applications.
Immutability
- This is the idea that a released interface should never be changed. If you
release a server object and later want to extend its capabilities, then you
should add a new interface instead of changing existing interfaces. In practice
you can violate the principle of immutability by changing existing interfaces
as long as your change doesn't modify any old methods.
Inheritance
- A fundmental principle of OOP. The ability of a class to derive data and behavior from
another class. This promotes reuse and maintainability.
Interface
- A set of signatures in a COM server that describe how to access the methods
of a class. It is often stated that the interface constitutes a contract
between the object and its clients. A Visual Basic interface is an abstract
class which provides a layer of indirection between a server and its clients
and thus decouples a class from the clients that use it. This improves the
maintainability of COM servers.
Invoke -
An IDispatch method that allows a client to access a COM object's methods.
Isolated -
This is the I in the ACID acronym. An isolated transaction is one that cannot be
viewed by another transaction before it is committed. A transaction should not
be able to view the transitional state of another transaction.
IUnknown -
The COM interface class from which all other interface classes are derived.
This interface allows all COM objects to manage their own lifetime, i.e., to release
themselves from memory when they are no longer connected to any clients.
Late Binding
- VB performs late binding, also referred to as automation, whenever the Object data
type is used. This provides no type-checking at compile time, and results in
worse performance than either early
binding or vTable
binding.
LDAP - Lightweight Directory Access
Protocol. An interface by which users can access Directory services.
Location Transparency - This means that client and server COM software can be written
without any consideration for the relative location of the software. The COM
services find the objects and clients whether they're in the same process or
another computer.
Marshaling
- The act of formatting parameters for transmission through a proxy / stub
pair. A proxy
marshals data to a remote object, and a stub marshals data to a remote client.
MIDL - Microsoft IDL. The MIDL compiler generates a type
library, but Visual
Basic creates type libraries without using the MIDL compiler.
MSMQ - Microsoft Message Queue,
originally code-named Falcon. This is a COM service that provides for the
passing of messages between applications. You can access MSMQ from VB. For
instance, an MSMQ can be created in VB with the statement Dim q1 as New
MSMQQUEUEInfo. However, MSMQ must be specifically installed and configured
on your computer before you can use it. MSMQ is administered with an
Explorer-type of interface.
MTA - Multithreaded Apartment; an apartment that contains more than one thread. A component that's written to run
in an MTA is called a free-threaded component. VB components always run in STAs.
MTS - Microsoft Transaction Server, originally
code-named VIPER. A run-time environment for COM objects. MTS provides a surrogate
process for COM
DLLs. An ActiveX DLL designed for MTS needs to have the Microsoft
Transaction Server Type Library in the Project References dialog box. You
can turn COM components into MTS components by running the MTS Explorer. You
can use MTS to move components between various server computers. MTS also
provides the DTC to help coordinate distributed transactions. MTS also
provides extended security; security for MTS objects is more flexible than
security for non-MTS COM objects. MTS is administered with an Explorer-type of
interface.
MTS Resource Dispenser - This is a general class of
applications that work with MTS to share resources among MTS objects. Two
examples are the ODBC Driver Manager and the SPM.
No Compatibility - See Version Incompatible.
N-Tier Computing - A computing environment that has at least three
tiers.
Object Oriented Programming - A style of programming that supports
encapsulation,
inheritance,
and polymorphism. Some languages are inherently object oriented (e.g.,
Smalltalk and Java) while other languages support object oriented extensions
(e.g., C++ and Visual Basic). It is often stated that Visual Basic is not truly
an object oriented language because it doesn't support inheritance. If you make
that statement then you have to say that COM is not object oriented either,
because COM does not support inheritance either. COM and Visual Basic do not
support implementation inheritance, but they both support interface inheritance.
OCX
Controls - See ActiveX
Controls.
ODSI - Open Directory Service Interface.
See ADSI.
OLE - Object Linking and Embedding. A
standard for linking and embedding documents in other documents. OLE is the
evolutionary ancestor of COM. COM was the foundation of OLE2 which was released
by Microsoft in 1993.
OLE DB - Object Linking and Embedding for
Databases. OLE DB is a COM service that enables a user to access databases. A
developer accesses OLE DB services through ADO.
OleView -
A COM utility that
reverse-engineers a type library into a readable form of IDL
.
OLTP - Online Transaction Processing. An
OLTP system is an application that modifies data and has a large number of
concurrent users. Many OLTP systems are written against a DBMS.
OOP - See Object Oriented Programming.
Open Group - See OSF.
OSF - The Open Software Foundation, now
called the Open Group. The group that defined the RPC specification.
Polymorphism
- A fundmental principle of OOP. The ability of objects to have methods with the same
names. This allows objects from similar classes to carry out operations in a
manner customized to the object.
Process -
An instance of an application that runs in its own address space.
ProgID -
Program Identifier. This is a textual name that represents a server object. It
consists of the project name and the class name, like MyServer.MyClass.
Project Compatible - See Version
Compatible.
Proxy - An
object that runs in a client's process that acts as a channel for all
communication between the client and a remote object. When a client attempts to
accesses a server object the proxy intercepts the call and issues an RPC to the real instance of the server
object.
Registration - The process of adding GUIDs, ProgIDs, and server locations to the
registry. Visual Basic automatically registers servers when you build them.
Out-of-process servers register themselves each time they run. DLL servers can
be registered using the REGSVR32.EXE utility.
RM - Resource Manager. An RM is an
application that acts as a data source.
Round Trip
- When a client passes control to a server object and then the server passes
control back to the client. Round trips are time-consuming when the client and
the server are located in different processes, and especially when they're
located on different machines. You should design remote interfaces such that
round trips are minimized.
RPC - Remote Procedure Call. A coding
specification for networking software. DCOM uses Microsoft's implementation of
RPC for interprocess communication. RPC is the foundation of DCOM.
Run Time Binding - See Late Binding.
SCM - Service Control Manager,
pronounced "scum." This is the COM component that is responsible for activating
a server object
from a client when the client tries to access the object. The SCM does its job
by looking for the class in the class
table.
Server - A
running COM program that is available for clients to connect to.
SPM - Shared Property Manager,
pronounced "spam." This is an MTS Resource Dispenser that ships with MTS and that assists in the sharing of
global memory among objects running inside an MTS application.
STA - Single-Threaded Apartment; an apartment that contains a single thread. A component that's written to run
in an STA is called an apartment-threaded component. VB components always run
in STAs.
Stateless - This is a model of keeping
objects alive only as long as they're doing something useful. For instance, MTS
transaction objects are alive only for the duration of the transaction and then
they're destroyed. This is done to ensure data consistency. However, it results
in greater network traffic and more overhead on the programmer's part.
Stub - An object that runs in a server's
process that acts as a channel for all communication between the server and a remote client.
Surrogate Process - A container application that acts as a host for COM server DLLs. MTS provides a surrogate process called
MTX.EXE that allows out-of-process clients to access COM server DLLs.
Thread - A
sequence of executable statements that runs separately and independently of
other other threads. A thread can be thought of as a path of execution in a
process. A thread is owned by exactly one process, and a process owns one or more
threads. If a process owns more than one thread, then the process is multithreaded.
Threading Model - The VB threading model is found in the project properties dialog box.
If you build an ActiveX EXE you can choose one of three options. Thread Pool
= 1 means than all objects run in the main STA. Thread Per Object means
that each externally-created object runs in its own STA. Thread Pool > 1
means that externally-created objects run in one of the specified maximum
number of STAs.
Three-Tier Computing - A computing environment in which applications running on
user's computers connect to a middle-tier of objects running on a server, and
the middle-tier of objects connect to a DBMS.
TM - Transaction Manager. A TM is a
high-level architecture that is used to coordinate transactions that are
distributed across multiple processes. MTS's TM is called the Distributed
Transaction Coordinator. In a distributed transaction each computer typically runs its own
instance of the TM.
Two-Tier Computing - A computing environment in which applications running on users'
computers connect to a DBMS on a network server.
Type Library
- A file that describes interfaces, coclasses, and other resources in a COM
server. A type library file created by Visual Basic typically has a TLB
extension. The TLB file is required by a client to connect to a server. A type
library can be thought of as a binary version of an IDL file. VB creates a type library
when you create a VB server object, thus eliminating the need for an IDL file.
Universal Marshaller - This is a COM service that builds proxy / stub code at run-time for distributed
applications.
UUID - Universally Unique Identifier,
the same thing as a GUID. The only reason there are two names for the same thing is
to confuse you.
VB - Visual Basic. It's a programming
language. Other than that I don't know too much about it.
VBX - Visual Basic Extension controls.
These are 16-bit reusable Visual Basic controls that have been superceded by OCXs.
Version Compatible - Also called Project
Compatible. This is
a method of changing a COM component in such a way that existing methods are
unchanged but new methods are added. This means that the vTable for existing interfaces is extended
with new entries at the end. VB generates a new set of CLSIDs and IIDs, but the GUID for the component's type library is
unchanged.
Version Identical - Also called Binary Compatible. This is a method of changing a COM component that
satisfies the principle of immutability. Existing interfaces are unchanged. You change the
component by adding new interfaces. This means that the vTable for existing interfaces is
unchanged.
Version Incompatible - Also called No
Compatibility. This
is a way of changing a COM component in such a way that existing methods are
changed. This means that VB generates a new GUID for the component's type library,
and a new set of CLSIDs and IIDs. Old clients will no longer be able to use the component
and client application developers will need to re-reference the type library in
the References Dialog Box.
vTable -
Virtual Table; an array of function pointers to a COM object. The function
pointers cannot be used across process boundaries. When a client wants to
access an object in another process COM uses proxies and stubs.
vTable Binding - Binding to an object at compile-time using the vTable of an object's interface. This type
of binding is much faster than either late
binding or early
binding.
References
On-Line Resources
Home�������� Credentials�������� Publications������ White Papers
� 1999�2001 Innovatia. All Rights Reserved.
Email Address: [email protected]
Phone Number: (330)665-9629
Last Revised: March
13, 2001