https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #19 from O. Nykyforchyn oleh.nyk@gmail.com --- Those two patches seemed to be way too radical :) so I submitted two more discreet, with only minimal changes:
https://source.winehq.org/patches/data/217275 https://source.winehq.org/patches/data/217276
The same is attached in one patch, for convenience of potential testers. It is against wine-6.19, but applies cleanly to wine-git.
I also run 16 bit editor WinEdt under both unpatched and patched Wine, and parts of a log for the patched version with WINEDEBUG=+module,+process is attached (most lines unrelated to 16 bit are cut out). Observe that krnl386.exe16.so is found in its real location and loaded, as well as other 16 bit modules.
For vanilla Wine there is simply:
0104:trace:module:load_dll looking for L"krnl386.exe16" in (null) 0104:warn:module:load_dll Failed to load module L"krnl386.exe16"; status=c0000131 0104:err:module:import_dll Loading library krnl386.exe16 (which is needed by L"C:\windows\syswow64\winevdm.exe") failed (error c0000131).