Reputation: 21
At the moment I am trying to use VB6 (.dll) file in a .NET environment, but I am running against an error what I cannot resolve.
Error:
System.Runtime.InteropServices.COMException: 'Retrieving the COM class factory for component with CLSID {7A96757E-32E3-456E-9724-8D561B43BB7D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Code:
Guid clsid = new Guid("7A96757E-32E3-456E-9724-8D561B43BB7D");
Type objType = Type.GetTypeFromCLSID(clsid);
dynamic comObject = Activator.CreateInstance(objType);
Location of the VB6 (.dll) file: Computer\HKEY_CLASSES_ROOT\WOW6432Node\CLSID\ {7A96757E-32E3-456E-9724-8D561B43BB7D}
Platform target in Visual Studio 2019: x86
Enable 32-Bit Applications in IIS: True
Upvotes: 1
Views: 184