I have some of the business logic implemented in .NET and some in Delphi. Now i am planning to upgrade to Delphi XE2.
Do we have any provision to consume .net assembly from Delphi XE2?
Update: I heard about Hydra framework which enable us to integrate managed and unmanaged code. Can anyone explain more about it with a small demo / code snippet?
Update: I have tried few things on Trial version of this Hydra Framework. But it requires to modify your .NET assembly as well to create interface so that we can map this with Delphi code.
Is there any way to consume .NET assembly without modifying it?
Nilesh, I can only answer this from the presepctive of Delphi 6, so please bear in mind that Delphi XE2 may have newer .NET interop options.
So to consume (your) .NET assembly functionality from (your) Delphi 6 app the simplest way is the modify the .NET assembly to be COM visible and simply consume said COM interface the normal way in Delphi.
From the .NET project; extract the functionality you need into an interface (or interfaces) apply a GUI attribute to those interfaces. In the project options mark the project as "COM Visible" and rebuild. You'll need to register the assembly with COM (run regsvr from the command line on it if memory serves!)
From Delphi; perform an import of the type library to get the TLB from the assembly DLL, then just CoCreate() with the approriate GUID and consume just like any other COM librabry.