Reputation: 5653
I've got an old project written in Delphi 4. I'm looking for a way to:
Is that possible? What will i need for that?
Thanks
Upvotes: 3
Views: 2730
Reputation: 6460
You could have a look at Remobjects Hydra This will allow you to mix win32 and .net assemblies. Not sure if Delphi 4 is supported, but you should have no problem porting to a later version of Delphi that is supported.
Upvotes: 4
Reputation: 125669
Unfortunately, no.
CodeGear never supported Delphi for .NET in Visual Studio in any version, and VCL for .NET died after Delphi 2007.
The new "Delphi" .NET solution is Delphi Prism, which does work in Visual Studio; unfortunately, it isn't backwardly compatible with Delphi code. Rem Objects (the actual owners of the Prism compiler, formerly known as Oxygene) has made available a utility application that attempts to convert the syntax differences automatically, but I haven't tried it on anything yet.
You might be able to reuse some of your old Delphi 4 code by converting what you can to ActiveX controls and using COM to make them available in .NET. Then you can use C# in Visual Studio (along with Prism, if you want or need it) to do what you need.
Upvotes: 11
Reputation: 17121
If your Delphi code is already in the form on COM-based libraries, it can be called from .net through a RCW (runtime callable wrapper,) which is auto-generated by the IDE when you add a COM component as a reference. Similarly, any component you would like to call from Delphi can be wrapped in a CCW (COM callable wrapper) and called as if it were native.
Upvotes: 2