On Mon, Nov 26, 2018 at 1:15 PM Dmitry Timoshkov dmitry@baikal.ru wrote:
Fabian Maurer dark.shadow4@web.de wrote:
This would need more tests, but it's pretty unlikely that it would search only the exe directory. Probably it should be using something like SearchPathW.
Thanks, sounds sensible.
Apart from current working directory and PE directory, which paths should I best write tests for?
Create temp path with an image, add it to %PATH%, call LoadImage, and see what happens?
The behavior may also be dependent upon the setting of NeedCurrentDirectoryForExePath ( https://msdn.microsoft.com/en-us/library/windows/desktop/ms684269(v=vs.85).a... ). I have a staging patch for CreateProcess that checks this, but it's possible that the behavior is implemented at a lower level.
Best, Erich