You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ChainLoader.cpp
+48-19Lines changed: 48 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -2,35 +2,64 @@
2
2
3
3
#include<filesystem>
4
4
#include<queue>
5
+
#include<fstream>
6
+
#include<string_view>
5
7
6
8
using std::string;
7
9
using std::vector;
8
10
9
-
#if _WIN32
10
-
staticconst string search_prefix = "dfhooks_";
11
-
staticconst string search_ext = ".dll";
12
-
#else
13
-
staticconst string search_prefix = "libdfhooks_";
14
-
# if __APPLE__
15
-
staticconst string search_ext = ".dylib";
16
-
# else
17
-
staticconst string search_ext = ".so";
18
-
# endif
19
-
#endif
11
+
using std::string_view_literals::operator""sv;
12
+
13
+
// look for libraries with these prefixes and extensions.
14
+
// .ini files are expected to contain a single line with the path to the library to load, which allows for loading libraries with non-standard names or from non-standard locations
15
+
// note that if both a .ini and a .dll/.so are present _both_ will be loaded, which may have unintended consequences if they point to the same library, so use with caution
0 commit comments