Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

which to use? active x dll or active x exe 1

Status
Not open for further replies.

calvi

Technical User
May 26, 2003
87
NL
if I will make many and difficult calculations and programm it in a component which should i best use? the Active x dll or the active x exe?
thx.
 
To just pass some information, do necessary calculations and then return a result I would use an Active X dll.

zemp
 
Calvi, Zemp is right you want a DLL, but jsut to further this a little more and give you an explanation of the 2.

An ActiveX DLL holds code and nothing else.You call a function of the DLL, it does what you need and passes you back output. It doesn't remember what the ouput was the last time you called it, or keep any memory as it is created and destroyed on each call.

An ActiveX EXE, is a different beast. Just like a DLL it can be called from an outside program. However, it can remember values and keep an internal memory. It can also accept user input, i.e. displaying a form.

For what you want to do, which sound like just do calculations an ActiveX DLL is the best route to go.

Casper

There is room for all of gods creatures, "Right Beside the Mashed Potatoes".
 
I beg to differ, you can use or have forms in an Active X dll. Below are some differences and advantages between the two.

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.

Disadvantages of ActiveX Dll
----------------------------
1) If an unhandled error occurs it will cause the client process to stop operating.

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 asynchronous call-backs. This frees the client to respond to the user.
3)If an error occurs the client processes can continue to operate.

Disadvantages of ActiveX Exe
----------------------------
1) Generally slower than an ActiveX dll alternative.

For instancing see:


For project types see:



zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top