I created a client in C# in MS Visual Studio 2022 (.NET 6) using the third-party provided API.dll file — my code compiles without any error.
The purpose of the client above is to connect to a server, which uses DCOM and OPC technologies. I have never worked with these technologies.
I successfully built my OPC server and client using OPC packages I found online. OPC server client development was straightforward.
I can not use these packages to build the client's connection to this particular Server using DCOM technology.
When I build the client with the API.dll file provided by the 3rd party and try to connect to Server, I get the following error:
Retrieving the COM class factory for component with CLSID {5044B1D9-6D96-47CD-9DD2-A8A06EB99B6C} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).
I was advised to register my application dll file using
Код: Выделить всё
regsvr32
Код: Выделить всё
regasm myClient.dll /tlb:myClient.tlb
Код: Выделить всё
regsvr32
Код: Выделить всё
thirdpary.dll
I can not understand why I should register a client DCOM application. Please advise.
Источник: https://stackoverflow.com/questions/781 ... com-server