Applied patch #838864 - String-friendly Delphi ExDLL

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3136 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-11-13 13:04:54 +00:00
parent d27d6dfb57
commit c775c5a3e8
3 changed files with 82 additions and 104 deletions

View file

@ -14,21 +14,15 @@ library exdll;
uses
nsis, windows;
function ex_dll(hwndParent: HWND; string_size: integer; variables: PChar; stacktop: pointer):integer; cdecl;
var
c: PChar;
buf: array[0..1024] of char;
procedure ex_dll(hwndParent: HWND; string_size: integer; variables: PChar; stacktop: pointer); cdecl;
begin
// set up global variables
Init(hwndParent,string_size,variables,stacktop);
Init(hwndParent, string_size, variables, stacktop);
c:=GetUserVariable(INST_0);
MessageBox(g_hwndParent,c,'The value of $0',MB_OK);
PopString(@buf);
MessageBox(g_hwndParent,@buf,'pop',MB_OK);
PushString(PChar('Hello, this is a push'));
Result:=1;
NSISDialog(GetUserVariable(INST_0), 'The value of $0', MB_OK);
NSISDialog(PopString, 'pop', MB_OK);
PushString('Hello, this is a push');
SetUserVariable(INST_0, 'This is 0');
end;
exports ex_dll;