Hello Friends,
I heard that Activex Dll is faster than the Activex Exe,is it really true,Can anyone here explain me the difference between the two.
Thanks for your help.
Regards,
Hello Friends,
I heard that Activex Dll is faster than the Activex Exe,is it really true,Can anyone here explain me the difference between the two.
Thanks for your help.
Regards,
ActiveX DLLs and ActiveX EXEs are almost exactly the same in the ways they are built and used. In both cases, you build one or more classes that applications can use to do something. The big difference lies in where they are used.
An ActiveX DLL's code is executed within the main program's address space. It behaves as if the class was created within the main program's code. Because the code lies inside the program's address space, calling methods is very fast.
An ActiveX EXE's code is run in a separate process. When the main program calls an ActiveX EXE's method, the system marshalls the call to translate the parameters into the ActiveX EXE's address space, calls the method, translates the results back into the main program's address space, and returns the result. This is slower than running an ActiveX DLL's method inside the main program's address space.
Because of the difference in speed, an ActiveX DLL is almost always preferable. The reason ActiveX EXEs are useful is they can run on a different computer than the main program while an ActiveX DLL must run on the same computer as the main program.
An ActiveX Dll runs is an in process server running in the same memory space as the client process.
An ActiveX Exe is an out of process server which runs in it's own separate memory space.
Advantages of ActiveX Dll
-------------------------
1) An in-process component shares its client’s address space, so property and method calls don’t have to be marshaled. This results in much faster performance.
Advantages of ActiveX Exe
-------------------------
1) The component can run as a standalone desktop application, like Microsoft Excel or Microsoft Word, in addition to providing objects.
2) The component can process requests on an independent thread of execution, notifying the client of task completion using events or synchronous call-backs. This frees the client to respond to the user.
3)If an error occurs the client processes can continue to operate.
ActiveX EXE: Unlike a stand-alone EXE file, an ActiveX EXE file is designed to work as an OLE server, which is nothing more than a program designed to share information with another program. It has an .EXE file extension.
ActiveX DLL: ActiveX DLL files are not meant to be used by themselves. Instead, these types of files contain subprograms designed to function as building blocks when creating a stand-alone program. It has a .DLL file extension.
Bookmarks