This question is genrally asked in interview and the answer is
DLL:
1)it is not self executable
2)it runs in application process memory
3)it has no entry point
4)it is reusable
5)Out Process Server
Exe:
1)it is self executable
2)it runs in own memory
3)it have main function(Entry point)
4)it is self executable
5) In Process Server
-------------------------------
Some differnce related to Space
-----------------------------------------------------------------------------------
In process server:A library (DLL) running in the same process space as the client, for example, an ActiveX control embedded in a Web page viewed under Internet Explorer or Netscape. Here, the ActiveX control is downloaded to the client machine and invoked within the same process as the Web browser.The client communicates with the in-process server using direct calls to the COM interface.
Out process server:Another application (EXE) running in a different process space but on the same machine as the client. For example, an Excel spreadsheet embedded in a Word document are two separate applications running on the same machine.The local server uses COM to communicate with the client.
DLL:
1)it is not self executable
2)it runs in application process memory
3)it has no entry point
4)it is reusable
5)Out Process Server
Exe:
1)it is self executable
2)it runs in own memory
3)it have main function(Entry point)
4)it is self executable
5) In Process Server
-------------------------------
Some differnce related to Space
DLL file is a Library File which supports a executable file.
DLL stands for Dynamic Link Library - it is a library file which is linked at runtime (ie. dynamically) rather than at compile-time.an exe has its own individual address space, whereas a dll have one address space, thus it can be shared.A dll can be "dynamically" loaded and unloaded from memory, allowing an application to take up less space than it normally would when its not using the functions in that dll.-----------------------------------------------------------------------------------
when we read above differnce then there are one Question what is IN process server and out process server
then the answer is
- Out-of-process server components. Out-of-process server components are always EXE files.
- In-process server components. In-process server components are always DLL files.
The difference between these server component types is with respect to the client application.
When a server component runs out-of-process with respect to its client, it has the following characteristics:
- It can run as a standalone application completely apart from the client.
- It does not share the same address space under the operating system.
When a server component runs in-process with its client, it has these important features:
- The server component and client share the same executable space under the operating system.
- The server component and client share some of the same memory.
As you might imagine, there are pros and cons to both in-process and out-of-process server components.
----------------------------------------------------------------------------------------------In process server:A library (DLL) running in the same process space as the client, for example, an ActiveX control embedded in a Web page viewed under Internet Explorer or Netscape. Here, the ActiveX control is downloaded to the client machine and invoked within the same process as the Web browser.The client communicates with the in-process server using direct calls to the COM interface.
Out process server:Another application (EXE) running in a different process space but on the same machine as the client. For example, an Excel spreadsheet embedded in a Word document are two separate applications running on the same machine.The local server uses COM to communicate with the client.
please update 5th point in difference as in explanation you mentioned dll as in process server and vice versa
ReplyDelete