Scenario - I am writing a console application. Need to use a certain DLL called Interop.ABCServer.DLL [I'm new to COM, so really don't know where it comes into picture here, but i have checked this DLL through ILDASM, it opens and shows metadata. So, i guess it's a .NET DLL and not a COM DLL]
Now when i try to use it by initiating certain class from it, it gives me an exception - Retrieving the COM class factory for component with CLSID<1111-1111....> failed due to following error:80040154.
Questions - supposing COM component is an old technology and requires component to be registered first, we need to register it somehow. How do i register this component (remembering it's a .NET dll and not a COM dll)?
Is above registration the resolution of the problem? IF not, then how to resolve it.
Now i have registered ABCServer.dll using regsvr32.dll. But,
I have code like,
try
{
Ilookup LP = New LoopUpClass();
IServer Svr = LP.LookUpServer(hostname, port);
}
catch(Exception ex)
{
}
Line 1 that was giving error previously now just terminates the application. I'hv even added break points on line 1 and line 2 while debugging. But control never reaches line 2, application just terminates as soon as i press F10 while on line 1.
Basically, once i have registered the COM, how do i use it. Do i need to register it from COM tab in ADD REFERENCE dialog, OR do i need to create a INTEROP.ABCServer.DLL afresh OR can i use the original INTEROP.ABCServer.DLL that i was provided.