Создание клиента DCOM в .NET 6 с помощью C# для стороннего сервера OPC DCOMC#

Место общения программистов C#
Ответить Пред. темаСлед. тема
Гость
 Создание клиента DCOM в .NET 6 с помощью C# для стороннего сервера OPC DCOM

Сообщение Гость »


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
and

Код: Выделить всё

regasm myClient.dll /tlb:myClient.tlb 
Both commands failed, indicating that it was not the correct dll file. I did run

Код: Выделить всё

regsvr32
on the

Код: Выделить всё

thirdpary.dll
API file, and it worked without any problem. Even after that, when I ran my client application, it failed with the same error.

I can not understand why I should register a client DCOM application. Please advise.


Источник: https://stackoverflow.com/questions/781 ... com-server
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «C#»