How can I call a Delphi function that returns a string using JNA?
问题 I'm working on calling functions from a Delphi compiled *.so file from a Java program. After some research it seems like JNA is he way to go. Before diving into some complex Delphi code, I'm trying to play with some "Hello World" code but am having trouble getting a string returned by a Delphi function. The Delphi code (helloworld.pp): library HelloWorldLib; function HelloWorld(const myString: string): string; stdcall; begin WriteLn(myString); Result := myString; end; exports HelloWorld;