Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we call .net(2.0) dll from Delphi 5 application

Tags:

.net

delphi

Can we call a dll built in .Net2.0 from Delphi 5 windows application. If yes, how.

like image 574
Ratan Deep Singh Avatar asked Jan 20 '11 09:01

Ratan Deep Singh


1 Answers

You could expose this .NET assembly as COM object using the regasm.exe tool:

regasm.exe /tlb /codebase Foo.dll

For this to work your assembly (or the type you are willing to expose as COM object) needs to be marked with the [ComVisible(true)] attribute.

Then you could consume it as you would consume a normal COM object from Delphi: by importing the type library.

like image 146
Darin Dimitrov Avatar answered Oct 29 '22 21:10

Darin Dimitrov