Hi,
this is the only way. Activator.GetObject does not make a connection, it
just creates the proxy. The connection is made upon the first method
call.
Sunny
In article <fdeaf0d8qv9r86tgg8gv50pa958gv2hlfi@4ax.com>, jaha@tmbg.org
says...
[quoted text, click to view] > Hi All,
> I was wondering if there was a good way to test if
> Activator.GetObject succeeded. If it fails it doesn't throw an
> exception. Also, it returns an interface pointer when it fails. It
> only throws an exception when you try to execute a method. So what
> I've been doing is trying to execute a Test() empty method to see if
> it was successful - but it seems to be a weird way to go about it. Any
> thoughts?
>
> Rob Conde
Hi All,
I was wondering if there was a good way to test if
Activator.GetObject succeeded. If it fails it doesn't throw an
exception. Also, it returns an interface pointer when it fails. It
only throws an exception when you try to execute a method. So what
I've been doing is trying to execute a Test() empty method to see if
it was successful - but it seems to be a weird way to go about it. Any
thoughts?