L2Bot2.0/InjectionLibrary/Injector.h
2023-01-16 15:33:32 +04:00

24 lines
528 B
C++

#pragma once
#include <windows.h>
#include <string>
namespace InjectLibrary
{
class Injector
{
public:
Injector(const std::string& mutexName, int windowsMessage);
virtual ~Injector() = default;
void CALLBACK SetHook(const HINSTANCE moduleHandle = nullptr);
private:
static const LRESULT CALLBACK HookMessageProcedure(const DWORD code, const DWORD wParam, const DWORD lParam);
private:
static HHOOK _hookHandle;
HANDLE _mutexHandle = nullptr;
int _windowsMessage = 0;
const std::string _mutexName;
};
};