Is it possible to use a .NET DLL in Delphi 2007 for Win32? I've tried to import the DLL in the same way I've done for an ActiveX component, but it doesn't appear to work (Component Menu -> Import Component -> Import .NET Assembly.
Is it possible and if so what are the steps?
If you want a Delphi specific article on doing that:
Using a .NET Assembly via COM by Jim McKeeth
It is pretty straight forward once you have all the steps.
CrossTalk from Atozed Software allows to use .NET assemblies from Delphi without using COM, no DLL registration and can use original assemblies without modification.
http://atozed.com/CrossTalk
Sure you can. You just have to tell it what parts of your code should be accessible that way. You can do that through the ComVisibleAttribute. The quickest fix is putting [assembly:ComVisible(True)] in your .dpk which makes everything public visible. Then you can use the method you tried to import the assembly.
You can also do unmanaged exports which can be called like regular dll files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With