Do ActiveX objects run in their own process?

B

Brett

Do ActiveX objects run in their own process or app domain? Referecing this
article http://www.codeproject.com/buglist/iefix.asp, he gets events from
ActiveX object to his IE object via marshalling. I thought marshalling was
use for communication between processes. General comments to clarify are
welcome.

If something is running in another app domain (within the same process), do
I need to use marshalling to communicate with it or is Reflection used
instead?

Thanks,
Brett
 
M

Mattias Sjögren

Do ActiveX objects run in their own process or app domain?

In general no (though it is possible to create out-of process ActiveX
servers).

I thought marshalling was
use for communication between processes. General comments to clarify are
welcome.

Marshaling is needed whenever you need to transform data from one
representation or context to another. In this case it refers to the
work of translating between COM automation types and .NET types or
vice versa.

If something is running in another app domain (within the same process), do
I need to use marshalling to communicate with it or is Reflection used
instead?

Yes there will be some marshaling work taking place, but it's pretty
well hidden by Remoting.



Mattias
 
B

Brett

Mattias Sjögren said:
In general no (though it is possible to create out-of process ActiveX
servers).



Marshaling is needed whenever you need to transform data from one
representation or context to another. In this case it refers to the
work of translating between COM automation types and .NET types or
vice versa.



Yes there will be some marshaling work taking place, but it's pretty
well hidden by Remoting.



Mattias

Thanks. Perhaps you have a suggestion for a particular problem I'm having
with IE, related to the above. I get the DocumentComplete event but as
mentioned on the link I provided, its timing is off. So the event fires
before the page has completely loaded. This is an issue with how .NET
handles the events. I did try the IE ActiveX object on a form and
marshalled the events into .NET (example in link). That worked fine.
However, my app doesn't have forms so I can't use the ActiveX object.

When the IE DocumentComplete() event fires, it goes from COM to .NET and
this throws off the timing. Do you know of any possible way to detect that
a (non ActiveX) IE page has completely rendered? I'm open to any ideas.

Thanks,
Brett
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top