~ubuntu-branches/ubuntu/lucid/nsis/lucid

« back to all changes in this revision

Viewing changes to Contrib/ExDLL/exdll_with_unit.dpr

  • Committer: Bazaar Package Importer
  • Author(s): Paul Wise
  • Date: 2008-09-01 07:20:44 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080901072044-mjev9xfej6i2d63t
Tags: 2.37-3
Add nsDialogs stack corruption fix from nsis 2.38

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{
2
 
  NSIS ExDLL2 example
3
 
  Original is ExDLL
4
 
  (C) 2001 - Peter Windridge
5
 
 
6
 
  Changed with delphi unit nsis.pas
7
 
  by bernhard mayer
8
 
 
9
 
  Tested in Delphi 7.0
10
 
}
11
 
 
12
 
library exdll;
13
 
 
14
 
uses
15
 
  nsis, windows;
16
 
 
17
 
procedure ex_dll(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer); cdecl;
18
 
begin
19
 
  // set up global variables
20
 
  Init(hwndParent, string_size, variables, stacktop);
21
 
 
22
 
  NSISDialog(GetUserVariable(INST_0), 'The value of $0', MB_OK);
23
 
  NSISDialog(PopString, 'pop', MB_OK);
24
 
  PushString('Hello, this is a push');
25
 
  SetUserVariable(INST_0, 'This is user var $0');
26
 
end;
27
 
 
28
 
exports ex_dll;
29
 
 
30
 
begin
31
 
end.
 
1
{
 
2
  NSIS ExDLL2 example
 
3
  Original is ExDLL
 
4
  (C) 2001 - Peter Windridge
 
5
 
 
6
  Changed with delphi unit nsis.pas
 
7
  by bernhard mayer
 
8
 
 
9
  Tested in Delphi 7.0
 
10
}
 
11
 
 
12
library exdll;
 
13
 
 
14
uses
 
15
  nsis, windows;
 
16
 
 
17
procedure ex_dll(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer); cdecl;
 
18
begin
 
19
  // set up global variables
 
20
  Init(hwndParent, string_size, variables, stacktop);
 
21
 
 
22
  NSISDialog(GetUserVariable(INST_0), 'The value of $0', MB_OK);
 
23
  NSISDialog(PopString, 'pop', MB_OK);
 
24
  PushString('Hello, this is a push');
 
25
  SetUserVariable(INST_0, 'This is user var $0');
 
26
end;
 
27
 
 
28
exports ex_dll;
 
29
 
 
30
begin
 
31
end.