Jump to content

Recommended Posts

Posted (edited)

Hi,

 

I've upgrade a library to the new version, we usually import this library as Type Library (COM object) in Delphi (since "yesterday"). Now, in this new version the COM object are no longer supported, so I'm looking around.
 

image.png.3153ccd972fb5ce53960e0a22d822a6f.png

 

The new library support the C# .NET, C++ (unmanaged), C++ (managed) and C.

I know that I can use the C .dll with a Delphi wrapper but... Just out of curiosity I tried to import the .NET Assembly.

I never use the .NET Assembly before, and honestly I don't know very well what is the .NET Assembly.

I'm searching on google and I found some documentations, but before start reading I ask you if you know a good start point "Delphi and .NET Assembly".

 

Do you have experience with that?

 

After the import I get the wrapper with a lot of class/interface but they are all empty.

 

Eg:

// *********************************************************************//
// Interface: _HObject
// Flags:     (4432) Hidden Dual OleAutomation Dispatchable
// GUID:      {8E90512D-E586-352A-A70F-C7F1518E667D}
// *********************************************************************//
  _HObject = interface(IDispatch)
    ['{8E90512D-E586-352A-A70F-C7F1518E667D}']
  end;

// *********************************************************************//
// Interface: _HImage
// Flags:     (4432) Hidden Dual OleAutomation Dispatchable
// GUID:      {2D195846-332C-32E4-A6A3-8B089435BB54}
// *********************************************************************//
  _HImage = interface(IDispatch)
    ['{2D195846-332C-32E4-A6A3-8B089435BB54}']
  end;

 

Any suggestion will be appreciate.

Thank you, as always, for your time.

 

 

Edited by Davide Visconti

Share this post


Link to post

Very hard to see anything useful coming from this. Can't imagine any way for Delphi to directly consume a managed assembly other than COM. 

 

I'd consider making your own COM wrapper of the assembly, using C#, or writing a Delphi wrapper around the C interface. 

Share this post


Link to post
3 hours ago, David Heffernan said:

Very hard to see anything useful coming from this. Can't imagine any way for Delphi to directly consume a managed assembly other than COM. 

 

I'd consider making your own COM wrapper of the assembly, using C#, or writing a Delphi wrapper around the C interface. 

Thanks David, if I have to write a wrapper in C# to expose the COM.... I definitely prefer write a Delphi wrapper over C dll, that's what usually we do (.h --> .pas).

Thank you anyway for the suggestion.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×