PDA

Click to See Complete Forum and Search --> : activex


Jan 17th, 2001, 12:00 AM
Irrespective of technical advantages and disadvantages

how to choose a activex dll and activex exe when
developing components

Bill Crawley
Jan 17th, 2001, 05:43 AM
This very much depends on the Application, and what else you are using. ActiveX DLL's run in the same process space as the application, ActiveX EXe's don't and run in there own process space. the DLL will generally be faster than an EXE because of marshalling. However if MTS is involved and you are using generic code, then you would want to use an Exe. MTS can only control EXE's. Also if your building a small n-tier system where all business logic is on the pc with the gui, then it would be easier to deploy as a DLL. If you later need to split the application becasue of growth, then a DLL will involve a little bit more work since you may have to recompile it as an EXE and also recompile the VB. THere are many compelling reasons to use either, there isn't o right or wrong answer to this.

Clunietp
Jan 17th, 2001, 09:53 AM
Correction Bill

MTS only controls DLLs, not EXEs

With the introduction of MTS/COM+, there are very few situations where you would need to use an ActiveX exe.

SmackAttack
Jan 24th, 2001, 06:38 PM
Also, because ActiveX .EXE's run in their own process space, they can do stuff asynchronously while your main app. is running. This is not possible with DLL's...when you make a call to a DLL, it is synchronous, meaning the calling app. has to wait until control is returned from the DLL.

Imagine if you wanted to perform lengthy calculations, report generations, etc -- this kind of thing could be placed into a separate ActiveX .EXE, and your main app could still run as normal, while the calculations were being performed in the background, on a separate process.

Tryster
Jan 27th, 2001, 07:53 AM
One instance in which I have found an ActiveX EXE very useful is if you need to force one particular section of code to use a different set of user details (eg if you have an NT service running as SYSTEM and you need to access network resouces) you can use the NT tool 'DCOMCNFG' to set the EXE to run in the context of a specified user.