2.1 What Is COM?

only for RuBoard - do not distribute or recompile

2.1 What Is COM?

COM is an architecture. It is a standard for developing components that can interact with each other, regardless of the language in which they were written. This means that components that are written in C++, Java, and VB can all work together unaware of the language in which the other was written. This happens because COM is a binary standard . Simply put, when a COM component is loaded into memory, it looks a certain way. It's that simple. COM defines the rules that components use to interact with each other and the outside world. It is not a language. But any language that can call a function through a pointer can be used to write COM components.

A language like C++ offers a source code standard. This allows C++ programmers to reuse code at the source level. In other words, it provides the means for source code reusability. COM, on the other hand, has a much loftier goal. It promises code reuse at the binary level. Unlike C++ source code, a COM component does not need to be recompiled when it is used with a new C++ project. It does not have to be written in C++ either, for that matter. Once that finely tuned sorting algorithm has been placed in a COM server, it is available to any language that supports COM. There is also no need to worry about compiler specifics.

To avoid any confusion, the terms object, component, and COM component are all used interchangeably. One or more objects can exist in a server, whether that server is a DLL or an EXE. COM servers will also be referred to as ActiveX DLLs.

only for RuBoard - do not distribute or recompile


Visual Basic Shell Programming
Visual Basic Shell Programming
ISBN: B00007FY99
EAN: N/A
Year: 2000
Pages: 128

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