How to check if a COM object exists (registered / accessible / can work without problems) before starting actions with them?
My application should use other COM applications (InteropServices), but before I start any action, I want to check if I can create COM objects.
This is not a problem if COM is where in the same directory, but it is not.
In the example. I would like to check if this is the case:
CDNBase.ApplicationClass App = new CDNBase.ApplicationClass();
will throw exciting exceptions or something else. How could I create a good MessageBox and block some events until it is fixed. Any other solutions, such as checking for a namespace or sth, are also fine (I think: D)
I tried using try / catch, but it fails, Google did not bring me anything special about this, so I ask you for help.
Thanks in advance
source share