Static link, dynamic link, COM, COM + concepts

Source: Internet
Author: User


Because Com Components and . Net Components depend on different internal structures, so they are inherentlyIncompatible. But fortunately Microsoft Company in . Net SDK Some tools are provided. . Net Component generation Com Proxy, or Com Component generation . Net Agents, with these agents and other technologies, each company can . Net Used in the project Com And you can . Net ApplicationProgramUsed in . Net Component.

 

Static Link

CodeIn the early stage of program development, developers need to use# IncludeStatement to connect the library file with the main program file. After compilation, the utility function and the program that calls the utility function are statically linked together to form an executable file!

Two defects of static links:

1Because it sends the same function to multiple executable files, the storage space is greatly wasted.

2If an error is found in one of the functions, you must re-compile and re-release each executable file that calls the function.

 

Dynamic Link

To avoid this problem, developers compile the function library into an independent binary file, and each executable file can be dynamically linked to those binary files. In this way, several executable programs can share the same binary library file, that is, the dynamic link library.(DLL). To modify a utility, you only need to re-releaseDLLInstead of re-Compiling and releasing all executable files that call functions.

 

Although DLL It is very convenient and effective, but it has a major drawback: DLL Is related to a specific language, that is C Source codeCompiled DLL Only C Client program reference.

 

ComIt refers to the component object model.(Component Object Model)

Com This is the result of the evolution of code reusability. Use Com , Which can be used by programmers C ++ And compile the library. Then, you can Com Compatible languages ( For example Dephi Or Visual Basic And so on ) Use the class in the library. Com Is a more basic technology than other technologies, such Ole (Object Linking and Embedding) And ActiveX Controls, etc!

 

COM + services

COM + services Yes Com The latest version of technology, COM technology Initial cause Microsoft Transaction Server Well-known. Now, COM + services Yes Windows2000 A component of the operating system. Com The component can be called. Windows2000 Operating system to meet the general functional needs of components.

 

The above text is taken from 《C #Advanced Programming

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.