mirror of
https://github.com/reactos/reactos.git
synced 2026-05-23 15:50:29 +08:00
The setuplib DLL, used also by the text-mode USETUP, isn't placed in the standard DLL search paths list. It isn't in the "current" directory nor in the one where reactos.exe is, nor in the running OS' SystemRoot or System32 directories. The DLL is instead placed in the System32 sub-directory of the ReactOS installation source. Note that this isn't a problem for USETUP, because it is already started from that directory. To control its loading, delay-load the DLL and use a delay-load hook, following the technique explained in: https://stackoverflow.com/a/75325443 https://devblogs.microsoft.com/oldnewthing/20170126-00/?p=95265 The hook is also invoked in case of loading failure, showing a more user-friendly hard-error popup and killing the installer, instead of throwing a debugger exception.