The experience of software calling EXE and DLL files in Delphi programming,

Source: Internet
Author: User

The experience of software calling EXE and DLL files in Delphi programming,

Experiences of software calling EXE and DLL files in Delphi programming

I. Definition
The EXE file is a complete "Windows form application" or "console application", which can be executed independently and called by the main EXE. It is composed of a series of classes or methods. During execution, all are loaded into the memory.

DLL file, the full name is Dynamic Link Libaray, that is, the Dynamic Link library, put the implementation of classes or methods required for Program (EXE) running in the dll file, its classes and methods cannot be directly executed. They must be loaded into the memory by calling an EXE file and obtained (executed) from the memory in the form of classes and methods ).

Ii. Same
1. the internal structures of the two are basically the same. They are composed of the Operating System Classes and methods of specific languages (C #, Delphi, Basic;
2. Read the memory and run the command again;
3. The internal structure of programming is basically the same;
4. can be called by another program in the main EXE file;
5. Read the memory when the call is complete;

Iii. Similarities and Differences
1. the EXE file can be directly executed to facilitate debugging and compilation. The dll must be called by an exe file and loaded into the memory for execution.
2. If the compilation direction is different, the EXE file is program and the DLL file is library;
3. In the DataSnap database application, when the EXE file method is called, The DataModule in the called EXE file is independent. In this way, the server generates a connection object independently, in addition, the main EXE occupies a connection object, resulting in an IP Client that occupies two servers for connection. (The server can only connect half of the client, reducing the number of server connections) by calling the DLL file, the DataModule In the DLL file is not independent, it is issued by the main EXE, it is connected to the master EXE and the common server. (How many clients can the server connect)
4. the EXE file is vulnerable to virus attacks and the DLL file is not vulnerable to virus attacks;
5. EXE file visibility (execution) is not easy to keep confidential. DLL files are invisible and highly confidential. (Of course, the EXE file can be entered as a password during execution and is not executed at Will)

Iv. Advantages
1. Saving space for executable files;
2. Implement modular management. Different modules are compiled into dll (EXE );
3. Facilitate Software Promotion and Distribution. for simultaneous users, compile different dll (EXE) to achieve function implementation.




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.