diff --git a/README.md b/README.md index c9c5fd0..5e3f98a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Usage ----- Rename VersionShim.dll to `version.dll` and place it in the target application's search location, then create a file named `Libraries.txt` in the same directory and list the paths to all the libraries you'd like to load, -each on a new line. +each on a new line. Lines beginning with `#` will be skipped. Libraries.txt *MUST* use CRLF line endings and be encoded in UTF-8 with *no* BOM. diff --git a/VersionShim/dllmain.c b/VersionShim/dllmain.c index 178a405..08782f8 100644 --- a/VersionShim/dllmain.c +++ b/VersionShim/dllmain.c @@ -46,6 +46,9 @@ BOOL APIENTRY DllMain(const HMODULE hModule, const DWORD fdwReason, LPCVOID lpRe { charsInLine = TerminateLineCrlf(line); + if (*line == '#') + continue; + if (!LoadLibraryA(line)) { MessageBoxA(NULL, line, PROJECT_NAME" - Failed to load library", ErrBoxType);