New Delphi unit for NSIS plug-ins by Bernhard Mayer
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2791 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
1e438b3e87
commit
aec369dfbc
2 changed files with 157 additions and 0 deletions
37
Contrib/ExDLL/exdll_with_unit.dpr
Normal file
37
Contrib/ExDLL/exdll_with_unit.dpr
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
NSIS ExDLL2 example
|
||||
Original is ExDLL
|
||||
(C) 2001 - Peter Windridge
|
||||
|
||||
Changed with delphi unit nsis.pas
|
||||
by bernhard mayer
|
||||
|
||||
Tested in Delphi 7.0
|
||||
}
|
||||
|
||||
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;
|
||||
begin
|
||||
// set up global variables
|
||||
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;
|
||||
end;
|
||||
|
||||
exports ex_dll;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Add table
Add a link
Reference in a new issue