function CreateCallback(Method: AnyMethod): Longword;
Allows you to perform direct callbacks from DLL functions (like Windows API functions) to functions in your script.
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: Longword): Longword; external 'SetTimer@user32.dll stdcall'; var TimerCount: Integer; procedure MyTimerProc(Arg1, Arg2, Arg3, Arg4: Longword); begin Inc(TimerCount); WizardForm.BeveledLabel.Caption := ' Timer! ' + IntToStr(TimerCount); WizardForm.BeveledLabel.Visible := True; end; procedure InitializeWizard; begin SetTimer(0, 0, 1000, CreateCallback(@MyTimerProc)); end;