Delphi / .NET interop – Atozed announced Crosstalk
Posted by jpluimers on 2009/05/06
On 20090504, Atozed announced Crosstalk: a technology that allows native Delphi code to consume .NET assemblies in a really intuitive and transparent way.
The announcement contains a FAQ.
It is a promising technology, not only because it is dead easy to use, but also because it is backed by Atozed: a team of people that have made complex technology like Web Apps easy to use by creating IntraWeb.
Expect demos soon (maybe even at Delphi Live!).
Here is a short example:
program TestLeft; {$APPTYPE CONSOLE} uses SysUtils, CT_System_Text in 'CT_System_Text.pas'; var MyStringBuilder: StringBuilder; begin WriteLn('Start'); MyStringBuilder := StringBuilder.Create('Hello CrossTalk!!!'); WriteLn('Length: ', MyStringBuilder.Length); MyStringBuilder.Append('More'); WriteLn('Length: ', MyStringBuilder.Length); WriteLn(MyStringBuilder.ToString()); Write('Finished -- Press <Enter>'); ReadLn; end.
Output:
Start
Length: 18
Length: 22
Hello CrossTalk!!!More
Finished -- Press <Enter>
Nice!
–jeroen
Jason said
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_27388108.html
Jason said
How do you handle the conflicting FPU settings between Delphi($1372) and .Net runtime(0x027F)? The .net 4 runtime will throw a stack overflow triggered by a delphi application after the runtime is loaded into the delphi process. (i.e. start delphi app, load .net dll, then in delphi app divide by zero a couple times in a row).
Prior to .net 4, the suggested fix was to toggle the FPU to $133F before the .net call then restore it afterward, this does not appear to work in .net 4. I’m using CreateOleObject to create the .net instance.
jpluimers said
I’m not sure; if you create a small reproducible example and post that to http://stackoverflow.com you have the best chance of finding an answer fast.
–jeroen