Reputation: 5533
I am using a 3rd party dll. Interop.CRYPTLib. I am trying to use it in my .net application but I'm getting this error
"Retrieving the COM class factory for component with CLSID {AF6AF735-6D30-4E16-8AFA-FD4317E87D1B} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."
I tried using regsvr32 but now I get this error
The module was loaded but the entry-point dllregisterserver was not found
I used regasm which says types registered successfully but it still fails with the first error, but when I use /tlb:Interop.cryptlib.tlb I get the error
Interop.CRYPTLib.dll' was imported from a type library and cannot be re-exported to a type library. Make sure the type library from
which the assembly was imported is registered.
My code is
var s = new CRYPTLib.EncryptDecryptClass();
Upvotes: 3
Views: 1633
Reputation: 31394
Interop.CRYPTLib
isn't a COM DLL - it is only a .NET wrapper for the CRYPTLib COM DLL. You need the DLL that implements CRYPTLib (probably CRYPTLib.dll) and install that DLL with regsvr32
.
Upvotes: 3