wimlib-imagex.exe cannot find libwim-15.dll in path with ;

Comments, questions, bug reports, etc.
Post Reply
abbodi86
Posts: 8
Joined: Wed Jan 11, 2017 4:14 pm

wimlib-imagex.exe cannot find libwim-15.dll in path with ;

Post by abbodi86 » Wed Nov 06, 2019 1:09 pm

Hello,

i don't know if this is a known/intended behavior, or unknown bug

if wimlib-imagex.exe (and libwim-15.dll) exist in a directory path name that contain path separator character ;
in this case:

- executing wimlib-imagex.exe directly referencing the full path = fail to load libwim-15.dll

- changing current directory (cmd location) to that path and executing wimlib-imagex.exe = success

- if wimlib-imagex.exe exist in subdirectory in that path (e.g. .\bin\), changing current directory to that path and executing bin\wimlib-imagex.exe = fail to load libwim-15.dll

- adding the subdirectory to PATH environment and executing wimlib-imagex.exe = success

i know this is a very special condition and such paths should not be used, specially with command line tools, but i just accidentally ran into that scenario when i was testing something else

and not to sound ungrateful, but i then used Process Monitor Procmon to test the scenario situations for both wimlib-imagex.exe and 7z.exe
7z.exe always worked, and judging by the captured events, it seems to use a little different steps to locate 7z.dll

i can attach the filtered events for reference if you need

Best regards, and thanks for the great tool.

synchronicity
Site Admin
Posts: 321
Joined: Sun Aug 02, 2015 10:31 pm

Re: wimlib-imagex.exe cannot find libwim-15.dll in path with ;

Post by synchronicity » Fri Jun 05, 2020 1:08 am

Sorry, I missed this post.

wimlib-imagex.exe is just linked to libwim-15.dll in the standard way. I.e., it doesn't use LoadLibrary().

Therefore the DLL search order is just the standard way for Windows: https://docs.microsoft.com/en-us/window ... plications

Normally that means you have to have the DLL in the same directory as the EXE.

I don't think there's anything I should do here? This is just the normal behavior for Windows binaries.

Post Reply