Open mediabuff opened 3 years ago
Also, please check the following:
set PATH=c:\my_path;%PATH%
DependenciesGui.exe
In this case c:\my_path
is not used in dll search, and so I see dlls not found.
But if I run my application from the same terminal, it can run. (without set PATH
it did not)
you can add folder to search in "Options/Customize Folders".
Example with C:\Windows\System32\ntoskrnl.exe :
Adding C:\Windows\System32\drivers as a valid folder :
Result :
All kext resolved to *.sys files have been correctly found
Thanks, I noticed that option, but was too lazy to enter around 10 additional paths I had from ROS.
Would be nice if both app path and current PATH were used automatically.
hmm, weird I actually tried to look into PATH env var :
// 7. Find in PATH
string PATH = Environment.GetEnvironmentVariable("PATH");
List<String> PATHFolders = new List<string>(PATH.Split(';'));
// Filter out empty paths, since it resolve to the current working directory
// fix https://github.com/lucasg/Dependencies/issues/51
PATHFolders = PATHFolders.Where(path => path.Length != 0).ToList();
FoundPePath = FindPeFromPath(ModuleName, PATHFolders, ProcessorArch);
I'll look into it
Using just the value of %PATH%
in the incorrect order may not be the best way to do it. It might be better to follow the existing, established DLL search algorithm so that the same DLLs will be found in the same order as when the target application is launched normally.
This algorithm is documented here.
Peace!
-=- James.
Suggest to use the windows search path algorithm to determine the depend DLLs. In the example below the dependent DLL (cpprestxx.dll) is in the same working directory as the chosen DLL (videodata.dll)
Or provide a mechanism to select or set the search path/directory.