other-licenses/nsis/Contrib/ExDLL/exdll_with_unit.dpr
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Mon, 15 Aug 2022 14:25:51 +0000
changeset 696200 857d60b8c66a9908cc3c9013cb446df03aa5e702
parent 23964 ba15a84af7e6c364570feb7b5a66cea87ba460c8
permissions -rw-r--r--
No bug - tagging 2f34e91889e56eb02a10a180e880aaaf4540a120 with FIREFOX_RELEASE_104_BASE a=release DONTBUILD CLOSED TREE

{
  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;

procedure ex_dll(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer); cdecl;
begin
  // set up global variables
  Init(hwndParent, string_size, variables, stacktop);

  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 user var $0');
end;

exports ex_dll;

begin
end.