Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-17264

Regression: Rapps does no longer start on Windows XP x32



    • Improvement
    • Resolution: Fixed
    • Major
    • 0.4.15
    • Applications
    • VirtualBox 5.1.38.

    • 0.4.15-dev-710-g10c0ff7416d6e8066c170bb3abdfb22303c472ed


      In order to test this, simply copy rapps.exe from ReactOS (extract from ISO or copy from installed system), and try to launch it on 32-bit version of Windows XP SP3 or earlier.

      Up to 0.4.15-dev-709-4482d0f4557ec3df12e3982c148353724ac3ebf3 - Rapps start succesfully.
      Starting from 0.4.15-dev-710-g10c0ff7416d6e8066c170bb3abdfb22303c472ed - it does no longer start, complains on missing RegDeleteKeyExW function in advapi32.dll.

      Indeed, using this function has been introduced by the guilty commit.
      According to MSDN: https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regdeletekeyexw, RegDeleteKeyExW has been added only starting from XP x64 and Server 2003 SP1. Windows XP x32 has only less fuctional RegDeleteKeyW instead. Since ReactOS is compatible with 2003, it has this function, unlike XP x32, so current Rapps starts there successfully.

      So only one solution to fix the problem, is using RegDeleteKeyW instead of RegDeleteKeyExW in the Rapps code. Ftr, it's used in the CInstalledApplicationInfo::RemoveFromRegistry function, which deletes the app's key with all values from registry: https://git.reactos.org/?p=reactos.git;a=blob;f=base/applications/rapps/installed.cpp;hb=bca076269f0acb7833f915b735a0f1ecb0134edf#l143. Doing that fixes the problem for me, and Rapps starts successfully again on XP 32-bit.

      I think by using non-Ex function, we will not lose anything, because accodring to the documentation, the last two additional parameters that Ex function has, don't play major role: the first one is x64-specific, it detects the system architecture an then opens appropriate platform-specific registry key. But since x32 ROS port currently has more priority then x64 one, that parameter will haven't any effect on x32. The second one is reserved and is not used/does  nothing at all.

      Of course, ideally it would be better to use the appropriate function for each platform accordingly, depending on NTDDI_VERSION macro. I already tried that: for NTDDI_WS03 and earlier, use non-Ex function, and for NTDDI_WS03SP1+ use the Ex one. But it for some reason doesn't work for me: Rapps still shows an error about missing advapi32.dll!RegDeleteKeyExW. So only forcing the function for all versions of Windows instead, without using NTDDI_VERSION macro, works for me.

      Here's the rapps_antiregression.patch with suggested changes that fixes the regression for me. PR will be follow soon.




            Oleg Dubinskij Oleg Dubinskiy
            Oleg Dubinskij Oleg Dubinskiy
            5 Vote for this issue
            3 Start watching this issue