mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Use LoadLibrary instead of LoadModule
LoadLibrary increase the reference count to the library. So we make sure this library is still loaded when we shut down the hook.
This commit is contained in:
parent
fdeb5912d3
commit
f096a2d8a2
7 changed files with 27 additions and 24 deletions
|
|
@ -5,10 +5,6 @@
|
|||
|
||||
#ifndef NO_OVERLAY
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define VC_EXTRALEAN
|
||||
#include <Windows.h>
|
||||
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
|
|
@ -17,7 +13,7 @@ class Base_Hook
|
|||
protected:
|
||||
std::vector<std::pair<void**, void*>> _hooked_funcs;
|
||||
|
||||
HMODULE _dll;
|
||||
void* _library;
|
||||
bool _hooked;
|
||||
|
||||
Base_Hook(const Base_Hook&) = delete;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue