This is a Visual Studio 2022 project which generates (pseudo) version.dll. Since it passes all arguments to genuine version.dll, virtually both of them have same functionality as version.dll.
Since many Windows executables load version.dll, you can use this project to add functionalities/hooks/hacks to target executable.
This project also provides same functionality for lz32.dll, hid.dll and msimg32.dll.
For hooking purpose, you may also interest in API hook library minhook.
- Run build-vs2022.bat
- Artifacts will be put under artifacts/
- If you need, you can rename
version.dlltolz32.dll,hid.dllormsimg32.dll.
- If you need, you can rename
- Check your target executable by
Dependencies.- If your target doesn't use
version.dllor supported DLLs, you can't use this project.
- If your target doesn't use
- Put
artifacts/version.dll(or renamed one) into your tareget's directory. Executable and DLL must be put on the same directory.- If your target is
<PATH>/<TO>/<YOUR>/<TARGET>.exeyou must putversion.dllin<PATH>/<TO>/<YOUR>/version.dll
- If your target is
- Put
artifacts/plugins/example_plugin.dllto<PATH>/<TO>/<YOUR>/<TARGET>.exe.plugins/example_plugin.dll - Open DebugView
- Run your
<TARGET>.exe- DebugView shows
CreateFileW()activities which is hooked byexample_plugin.dll.
- DebugView shows
version.dllloads all DLLs which are placed inYOUR-TARGET.exe-PATH/YOUR-TARGET.exe.plugins/.- DLLs are loaded from mutiple directories recursively.
- If directory's or file's name is started with
., they're ignored. e.g..my-private-dir/,.my-private-file.dll, etc.
- If directory's or file's name is started with
- DLL loading order is decided by
std::sort()forstd::wstringpaths of DLLs.- e.g.
YOUR-PATH\01\*.dllis loaded beforeYOUR-PATH\99\*.dll
- e.g.
- DLLs are loaded from mutiple directories recursively.