Problems with COM/Assemblies

  • Thread starter Thread starter Chris Uttenreither
  • Start date Start date
C

Chris Uttenreither

Hello everyone. I'm trying to write a C# application which will make
use of a COM object. We'll call it x_server. I've added a reference to
this COM object in my C# Project, done what I needed to do, and it
compiles. Below is some stuff I can see in the OLE/COM Object Viewer
after adding this reference.


Under "Type Libraries" tab:

8FA0973F-0D61-11D3-9971-0060B086F989 (xserver)

Under "All Objects" tab:

8FA0973B-0D61-11D3-9971-0060B086F989 (xserver.x_server)
8FA0973E-0D61-11D3-9971-0060B086F989 (xserver.connector_class)

So, in a nutshell, using this reference gives you access to two objects
in the xserver namespace, plus a bunch of cool events and properties.
When trying to run my application, I get this exception:

Exception caught: System.Runtime.InteropServices.COMException
(0x80040154): COM object with CLSID
{8FA0973B-0D61-11D3-9971-0060B086F989} is either not valid or not
registered.
...

Note that this exception is not thrown for the xserver itself -- it's
thrown for xserver.x_server. (And presumably it would be thrown for
xserver.connector_class as well, were it checking that first.) It
appears that I have access to the xserver COM object itself, but not the
classes it contains. Any suggestions? This is really got me stumped.

Thanks!
 
hi Chris
This is an exception that is thrown by the com object, not by your C#
application. When a com object returns a failure HRESULT it raised to the
managed caller in a ComException object. So you might need to get back to
the com object that you are calling to see what failure happens there ,
then returned to you application .. hope that helps
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
Back
Top