I got a full string in the Dolphi.
//Delphi
function text(p: ShortString): integer; stdcall; //integer ->string etc, not work.
var
buf: string;
i: Integer;
begin
buf := '';
for i := 0 to Length(p) do
begin
if Chr(Ord(p[i])) in [' '..'~'] then
begin
buf := buf + Chr(Ord(p[i]));
end else
begin
Break;
end;
end;
buf:=Trim(buf);
ShowMessage(buf);
end;
function ReceiveAGKPtr(): Integer; stdcall;
begin
end;
exports
ReceiveAGKPtr,
text;
The most interesting thing is that if you change the type of result from numeric to another, it does not work
//Commands.txt
text,0,S,text,0,0,0,0
//AGK
#import_plugin myplugin
myplugin.text('Sum: '+str(1+2))
Tell me please how to get the string back to AGK.
https://www.instagram.com/qugurun/