How to register .net dll as COM correctly via codebase mode?

  • Thread starter Thread starter Tony Y Jia
  • Start date Start date
T

Tony Y Jia

Guest
I have registered my dll as COM via below command via admin access. C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe /codebase dllPath.

it showed Types registered successfully.

It was not work when i try to invoke the function.


Type t= Type.GetTypeFromProgID(progid);
dynamic o =Activator.CreateInstance(t);
string result=o.GetResult();

Retrieving the COM class factory for component with CLSID failed due to the following error:

80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Platform target: x64

VS Version: 15.5.0

Marked make assembly COM visible.

Continue reading...
 
Back
Top