4

I have a .net dll which I could import to Delphi 6. But it loses some information.

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

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

When I tried to register the library in tlb editor by setting the base type of IRedeemTransactionItemBundle to ITransactionItemBundle, I am getting the error: “Parent Interface already has a member with id:1610743808”. I could see properties of both interfaces have same ID in the tlb editor.

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

Is that a problem with Delphi? Have any of you experienced such a problem in importing kindly give me some thoughts?

VividD
  • 10,456
  • 6
  • 64
  • 111
sinu
  • 71
  • 1
  • 4
  • 2
    How do you export this? Through COM? Please show us the header of the C# class declaration. How do you import it? Type Library Editor? Please show us the header of the imported Pascal bit. – Jeroen Wiert Pluimers Mar 22 '11 at 08:19

2 Answers2

0

I would suggest you to make COM visible wrapper for the DLL in C# or VB.NET which will import necessary functionality in the way Delphi can interact with correctly.

0

Apart from using COM interop, you can do an unmanaged export. Simply put, you need a new specific version of the .net dll.

Please head to this post for details of the technique using Delphi.

Community
  • 1
  • 1
menjaraz
  • 7,551
  • 4
  • 41
  • 81