diff --git a/Contrib/ExDLL/exdll_with_unit.dpr b/Contrib/ExDLL/exdll_with_unit.dpr index a186a637..1eb216ba 100644 --- a/Contrib/ExDLL/exdll_with_unit.dpr +++ b/Contrib/ExDLL/exdll_with_unit.dpr @@ -63,11 +63,10 @@ end; function mynsiscallback(const NSPIM: TNSPIM): Pointer; cdecl; begin - Result := 0; + Result := nil; if NSPIM = NSPIM_UNLOAD then begin - // Note: Cannot use NSISDialog here because g_hwndParent has been destroyed at this point - MessageBox(0, PChar('NSPIM_UNLOAD is the final callback, goodbye...'), PChar('mynsiscallback'), MB_OK); + NSISDialog(PChar('NSPIM_UNLOAD is the final callback, goodbye...'), PChar('mynsiscallback'), MB_OK); end; end; diff --git a/Contrib/ExDLL/nsis.pas b/Contrib/ExDLL/nsis.pas index 6b3c227e..dd76e5d2 100644 --- a/Contrib/ExDLL/nsis.pas +++ b/Contrib/ExDLL/nsis.pas @@ -195,8 +195,12 @@ begin end; procedure NSISDialog(const text, caption: string; const buttons: integer); +var + hwndOwner: HWND; begin - MessageBox(g_hwndParent, PChar(text), PChar(caption), buttons); + hwndOwner := g_hwndParent; + if not IsWindow(g_hwndParent) then hwndOwner := 0; // g_hwndParent is not valid in NSPIM_[GUI]UNLOAD + MessageBox(hwndOwner, PChar(text), PChar(caption), buttons); end; begin diff --git a/Docs/src/history.but b/Docs/src/history.but index 46d72ebc..4fe29586 100644 --- a/Docs/src/history.but +++ b/Docs/src/history.but @@ -12,6 +12,12 @@ Released on ?, 201? \S2{} Minor Changes +\b Fixed minor issues in the Pascal NSIS plug-in SDK and removed the extrap global variable + +\S1{v3.0b2-cl} Changelog + +\S2{} Minor Changes + \b Windows 10 support \H{v3.0b1} 3.0 Beta 1