Importing dll dll in Delphi 6 loses information

I have a .net dll that I could import into Delphi 6. But it loses some information.

I have a demo application on VB.net to use this DLL, which shows 2 interfaces called IRedeemTransactionItemBundle and ITransactionItemBundle . In Visual Studio 2008, I saw that ITransactionItemBundle is the base type of IRedeemTransactionItemBundle . Therefore, when I declare a variable of type IRedeemTransactionItemBundle , I could access all the properties of both interfaces.

But when I import the dll into Delphi 6, I could see part of the IRedeemTransactionItemBundle and ITransactionItemBundle . But there is no information that shows that ITransactionItemBundle is the base type of IRedeemTransactionItemBundle . Also, when I declare a variable of type IRedeemTransactionItemBundle in Delphi, I cannot access the properties of ITransactionItemBundle (base type).

When I tried to register the library in the tlb editor by setting the base type IRedeemTransactionItemBundle to ITransactionItemBundle , I get the error: "The parent interface already has a member with id: 1610743808." I could see that the properties of both interfaces have the same identifier in the tlb editor.

I tried to import the same DLL using Delphi 7. But no help.

Is this a problem with Delphi? Have any of you experienced such a problem when importing, kindly give me some thoughts?

+4
source share
2 answers

I would suggest you make COM a visible wrapper for a DLL in C # or VB.NET, which will import the necessary functions in how Delphi can interact correctly.

0
source

In addition to using COM interoperability, you can perform unmanaged exports . Simply put, you need a new concrete version of .net dll.

For more information on a method using Delphi, go through.

0
source

Source: https://habr.com/ru/post/1344496/


All Articles