I am using 32 bit dll. in .net framework console application,If i set target platform as 32 bit, got below error
"Retrieving the COM class factory for component with CLSID {4E084A82-8FE7-11D0-9125-0004AC3617E1} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
If i set target platform as 64 bit, got below error
"System.InvalidCastException: 'Unable to cast COM object of type 'AutConnMgrTypeLibrary.AutConnMgrClass' to interface type 'AutConnMgrTypeLibrary.IAutConnMgr'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{4E084A81-8FE7-11D0-9125-0004AC3617E1}' "
On the whole, not able to use PCOMM dll
Reply: There may be two reasons:
1. This file has not been registered, so that it cannot be used correctly. First use the registration command to register pcomm.dll to the system registry, and then call it.
2. The version of this file is wrong, and it lacks some API interfaces, so some classes and GUIDs cannot survive.