Can I have text as resultvalues from Call DLL Function?

Got a problem you cannot solve? Try here.
Post Reply
jls
Posts: 26
Joined: Wed Jun 06, 2007 5:17 am
Location: Norway

Can I have text as resultvalues from Call DLL Function?

Post by jls »

Can I have text as resultvalues from Call DLL Function?


Is this possible?


Jørgen Storlie
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

No, you cannot do this. You will need to pass text in one of the function parameters, using the allocated string buffer type.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
jls
Posts: 26
Joined: Wed Jun 06, 2007 5:17 am
Location: Norway

Post by jls »

Hello

I can not figure out how to make this work:

Delphi Code:

Code: Select all

function GETCLIENTID(var CLIENTID: PChar): boolean; stdcall;
begin
  StrCopy(CLIENTID, PChar('Test Result'));
  result := true;
end;

Script Code:

Code: Select all

Set Variable ARESULT to False
Set Variable CLIENTID to 
Call DLL Function $SUPPORTDIR$\\testdll.dll->GETCLIENTID (get result into variable ARESULT)

or as clipboard text:

~InstallAware Clipboard Data~
~Call DLL Function~
~{D358BB08-5A01-403B-8ACF-68597B36CB04}~
~$SUPPORTDIR$\\testdll.dll,GETCLIENTID,bool,ARESULT,"allocated string buffer (MAX_PATH length)",$CLIENTID$,$~
~mIDEFunc.dll\\mEXEFunc.dll~


Jørgen Storlie
mbond
Posts: 15
Joined: Thu Dec 12, 2013 9:37 am

Re: Can I have text as resultvalues from Call DLL Function?

Post by mbond »

I can not get this to work in IA18. I've searched these forums for over an hour. I'm sure I just don't have something configured correctly. Is there a clear solution/example/guide for doing this with Delphi? It should show the IA and the Delphi side of things. Thanks.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Can I have text as resultvalues from Call DLL Function?

Post by FrancescoT »

Dear User,

Honestly, I don't understand which is your problem with using the command ... anyway, you'll not find a Delphi sample with this forum.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply