Hi,
this procedure
procedure MyStringFunction(var AString: PAnsiChar); stdcall;
begin
AString := 'some string';
end;
exported in a DLL, works with Installaware "Call DLL" - BUT! the word "some string" is not returned - just garbage. What am I doing wrong?
/Anders
Writing DLL in Delphi, passing strings
Re: Writing DLL in Delphi, passing strings
I haven't touched Delphi yet myself, but what if you call that procedure from within a Delphi app to test it?
From the looks of it, you'll want to use a function, not a procedure.
http://www.delphibasics.co.uk/Article.asp?Name=Routines
Hopefully that gets you pointed in the right direction.
From the looks of it, you'll want to use a function, not a procedure.
http://www.delphibasics.co.uk/Article.asp?Name=Routines
Hopefully that gets you pointed in the right direction.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

