shell32.ShellMessageBoxW redirects to shlwapi.ShellMessageBoxWrapW.
However the latter one (shlwapi) is exported by ordinal only.
Trying to use in shell32.spec file the following syntax:
182 varargs ShellMessageBoxW() shlwapi.ShellMessageBoxWrapW
will therefore fail at runtime, because Windows/ReactOS will fail to
snap shlwapi.ShellMessageBoxWrapW.
Using instead an export by orginal:
182 varargs ShellMessageBoxW() shlwapi.#388
actually fails as well, but at link time, by both MSVC' LINK and GNU's
dlltool.
This generates a .def file containing the line:
ShellMessageBoxW=shlwapi.#388 @182
It is not clear why it fails, because according to:
https://docs.microsoft.com/en-us/cpp/build/reference/exports?view=vs-2019
and
https://devblogs.microsoft.com/oldnewthing/20121116-00/?p=6073
this should be possible.
However one encounters the same errors as those described at:
https://groups.google.com/forum/#!topic/microsoft.public.vc.language/AVnx-EnYdsY
and
https://www.xspdf.com/questions/22333.shtml
...
So instead we use another trick, that appears to be already in use in
the shell32.spec. Since the shlwapi functions are imported because we
link to it, this means that ShellMessageBoxWrapW() is already available
through this import. So we can specify it in the .spec file as is,
without a full name prefixed with "shlwapi." .
Therefore the associated shell32.ShellMessageBoxW function will instead
link to the small ShellMessageBoxWrapW() import stub that is generated
automatically.