Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- using namespace std;
- void load_dll(const char* s) {
- HMODULE dll = LoadLibrary(s);
- if (dll == NULL) {
- std::cout << "Cannot load dll: " << s << "\n";
- exit(1);
- }
- char actualDllPath[255];
- GetModuleFileName(dll, actualDllPath, 255);
- std::cout << "dll loaded: " << actualDllPath << "\n";
- }
- int main() {
- load_dll("dir\\a.dll");
- load_dll("a.dll");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement