Benefits/Disavantages of using Activex EXE over DLL/OCX 
Author Message
 Benefits/Disavantages of using Activex EXE over DLL/OCX

Hello,

I'm a little confused about the differences between an ActiveX EXE and DLL.
I would like to have some executable features in my libraries, but don't
know the fundamental differences between an ActiveX EXE and DLL.  I assume
that the EXE is ou-of-process so it must have more overhead.  Beofre
choosing to use an ActiveX EXE I would appreciate it if someone can shed
some light on the major differences and if possible some links to articles
dealing with this issue.

Thank you in advance,

SL



Wed, 27 Aug 2003 08:22:27 GMT  
 Benefits/Disavantages of using Activex EXE over DLL/OCX
Hi,

Yes, you are right - an ActiveX EXE IS out of process.
What this means is that each time your object calls a method (or sets/gets a
property) from that ActiveX EXE object, a process called "marshaling" is used
to transfer the function call and data between your process and the object's
process.
I heard once (from a good source) that a test was made, and calls to an in-proc
object were about 1000 times faster than out-of-proc.

So, why use an ActiveX EXE?
That depends on what you are trying to do. Since tha ActiveX EXE is in its own
process, it can do things "in the background" - that is, you may ask it to do
something and continue working, and when it finishes it can raise an event to
tell you about it.
There is also another good reason for EXEs - and that is DCOM.
DCOM is about calling objects which are on a remote system (a different
computer through the network, sometimes even over the internet). This can only
be achieved through out-of-process servers, since you can't run something on a
different PC and still have the same process...

Here are two question you should ask yourself, and only if the answer is "yes"
to one of them you will want an ActiveX EXE:
1. Might the object you need have to be on a different machine?
2. Does the object do things in the background (this could include processing
something that takes a while, but shouldn't interfere with the user's ability
to do other things)?

Hope this helps,


P.S. I mentioned DCOM as a reason for ActiveX EXEs. Today there are also other
ways for remoting, such as using MTS and COM+, which I am not well aquainted
with, that can handle DLLs - but what they mostly do is "wrap" the DLL with an
EXE...

Quote:

> Hello,

> I'm a little confused about the differences between an ActiveX EXE and DLL.
> I would like to have some executable features in my libraries, but don't
> know the fundamental differences between an ActiveX EXE and DLL.  I assume
> that the EXE is ou-of-process so it must have more overhead.  Beofre
> choosing to use an ActiveX EXE I would appreciate it if someone can shed
> some light on the major differences and if possible some links to articles
> dealing with this issue.

> Thank you in advance,

> SL



Fri, 29 Aug 2003 19:21:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ActiveX DLL, ActiveX EXE & ActiveX OCX version

2. ActiveX DLL, ActiveX EXE & ActiveX OCX version

3. ActiveX Exe Using ActiveX Dll?

4. ActiveX exe, dll, ocx difference

5. ActiveX.exe or ActiveX DLL or ActiveX Control?????????????

6. Specify DLL version when using mc.exe, rc.exe and/or link.exe

7. Using an ocx in Unattended Execution mode for ActiveX DLL

8. using MSINET.OCX in an ActiveX DLL

9. ActiveX exe vs ActiveX dll

10. ActiveX DLL to ActiveX EXE

11. ActiveX DLL vs ActiveX EXE

12. Why DCOM ActiveX Exe is Working and ActiveX Dll is not working

 

 
Powered by phpBB® Forum Software