"COM Principles and Applications" Learning notes-the first part of the COM principle

Source: Internet
Author: User

⊙ the first chapter outlines

===================================================

What is COM

---------------------------------------------------

COM is a component standard proposed by Microsoft that not only defines the standards for interaction between component programs, but also provides the environment required for component programs to run. In COM standards, a component program is also called a module, which can be a dynamic link library, called an in-process component (in-process component), or an executable (i.e. EXE) program, called an out-of-process component (out-of-process component). A component program can contain one or more component objects. Because COM is a model of objects as the base unit, when communicating between programs and programs, both sides of the communication should be component objects, also known as COM objects, and component programs (or COM programs) are the code vectors that provide COM objects.

COM objects are different from object concepts in general object-oriented languages such as C + + language, COM objects are based on binary executable code levels, and objects in languages such as C + + are based on the source code level, so COM objects are language Independent. This feature makes it possible to interact with component objects developed in different programming languages.

---------------------------------------------------

COM Objects and Interfaces

---------------------------------------------------

Similar to the concept of an object in C + +, an object is an instance of a class (class), and a group is a definition of a set of related data and functions. Using an object's application (or another object) is called a customer, sometimes called an object's user.

An interface is a set of logically related functions that are also called interface member functions. By custom, interface names are often prefixed with "I". objects provide various forms of service to customers through interface member functions.

In the COM model, the object itself is not visible to the customer, and the customer requests the service only through the interface. Each interface is identified by a 128-bit globally unique identifier (Guid,global unique Identifier). The customer obtains the pointer to the interface through the GUID, and then through the interface pointer, the customer can call its corresponding member function.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.