Trouble referencing of COM DLL libraries

omgitsSNOOP

New member
Joined
Jul 31, 2007
Messages
3
Programming Experience
3-5
Hey guys, thank you for the great forum. First timer on this particular one and hopefully it will be my last. Cutting the chit chat I have recently come across a weird problem and I havent been able to find a lot of help, and I might have one particular solution which is quite lengthy so I was hoping for a "back to the normal state quick fix".

I have been writing a small report processing application which uses crystal reports 9 library. I have referenced the dll sucessfuly and have been writing the application for about 3 weeks now and today it suddenly started crashing on me with following error (non debug mode)

System.TypeInitializationException: The type initializer for 'PhantomServer.initApp' threw an exception. ---> System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {AF3768D0-6120-4E28-96DD-63FD2DC27B7A} failed due to the following error: 80040154.
at PhantomServer.initApp..cctor() in C:\Documents and Settings\SnOoP\My Documents\Visual Studio 2005\BRCS\PhantomServer\Global\initApp.vb:line 41


etc etc ...


now the problem is I am using some other COM dll's as well but they seem to be no longer referenced. (fax

Now me writing a wrapper would take me quite a while now to extract all of the functions. What i really want is for my application state to go back to normal.

and also when I try referencing the dll's again it just spits out an error stating to make sure it is acessible and dat it is a valid assembly or com component.

I have a feeling it has sumfin to do with registering the dll or perhaps re-registering it... perhaps something to do with GAC?

Appreciate any suggestions guys.


PS. I am using VS 2005 (VB.NET) framework 2.0
 
Problem registering interop assembly

I am having some major issues referencing my COM DLL's. They were working absolutely perfect for the last three weeks and suddenly lost their reference mapping. I tried reloading them but VS did not want to except them anymore stating that it is not a COM or assembly library.

1. Reloading them didn't work.
2. re-registering them didn't work (without strong naming)
3. using the command line arguments to export to DLL /basecode didn't work also.

It compiles fine to until a typeinitalizationexception --> System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {AF3768D0-6120-4E28-96DD-63FD2DC27B7A} failed due to the following error: 80040154.

Any suggestion would help?... Perhaps I am not exporting the DLL? or an old CLSID is still embedded within the registry?

My head has been done in hard for the past two days. Only thing i dont understand why does the VS no longer want to accept the referencing of the COM dll's.
 
May i mention this was not a reporting/printing issue :)


Problem was fixed. I reinstalled crystal reports which de-registered DLL's referencing them back to original state.

My second interoping problem was solved by wiping out associated associated COM and Interop dll's ... using regsvr32 to unregister the acquired dll and then register it back again which placed it back on the com reference table.
 
Back
Top