I am trying to use a third-party COM-DLL (I do not believe its .NET component) from a .NET service without registering a COM library, but I have not been lucky so far.
I copied the manifest files from here (http://stackoverflow.com/questions/465882/generate-manifest-files-for-registration-free-com) for use as a starting point (I generated a COM DLL using the reference file mt.exe /regsvr42.exe). However, all I get is the following error:
Exception: System.InvalidCastException Message: Cannot pass COM object of type "LOGICLib.LogicClass" to interface type "LOGICLib.ILogic". This operation failed because the call to the QueryInterface COM component for the IID interface '{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAA3E8FB4}' failed due to the following error: this interface is not supported (exception from HRESULT: 0x80004002 (E_NOINTERFACE) ), Source: Interop.LOGICLib in LOGICLib.LogicSecuredClass.Connect (String IP, UInt16, Int32 & Result) in My.Server.MyAssembly.Loader.Connect () in D: \ MyProject \ Source \ Server \ MyAssembly \ Loader. cs: line 461
In the application manifest after exe, which starts the service, I also tried to give it a name after the assembly, which calls the COM-DLL. I tried running on the command line and through the Visual Studio debugger. I also tried using a third-party Interop file and generating my own.
(Note: I tested only under Windows XP.)
I spent two days on this now and did not advance at all. Any ideas that I might have missed?
source share