COM Features

COM Objects

Before you continue with the lesson, run the Chap05.exe animation located on the CD-ROM. This animation explains the difference between objects created in object-oriented programming languages and COM objects.

COM objects are reusable software components that are specifically designed for use in other applications. Prior to COM, objects created within an object-oriented programming (OOP) language could only be reused within that same language. The COM technology can package and further encapsulate OOP objects into reusable DLLs, ActiveX (OCX) controls, or executable files for widespread use among various software applications or programming languages. For example, a component created in Visual C++ can be used in a Visual Basic application.

Object Structure and Interaction

COM does not specify how components are structured; it specifies how they interact. The programming language and development environment determines the internal structure of a component. However, programming environments have no set standards for working with objects outside of the immediate application. COM, through language-independent interfaces, picks up where programming languages leave off to provide wide-range interoperability.

How COM Objects Provide Services

A COM object provides services to clients . A client is any piece of code (not necessarily an application) that accesses the services of an object. A server object is a piece of code that provides services to a client. These services are accessed through COM interfaces that can be called by client objects.

Two main types of COM objects, in-process and out-of-process objects, provide services. In-process objects are implemented as DLLs and always run on a local machine. Out-of-process objects are implemented as executable files and may reside either on a local or remote machine.



Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net