remove overly defensive programming (that doesnt even work)
This commit is contained in:
parent
41f80622cb
commit
79bcc7d6e1
@ -17,6 +17,5 @@
|
|||||||
// Mutex
|
// Mutex
|
||||||
|
|
||||||
#define ITH_HOOKMAN_MUTEX_ L"VNR_HOOKMAN_" // ITH_HOOKMAN_%d
|
#define ITH_HOOKMAN_MUTEX_ L"VNR_HOOKMAN_" // ITH_HOOKMAN_%d
|
||||||
#define ITH_GRANTPIPE_MUTEX L"VNR_GRANT_PIPE" // ITH_GRANT_PIPE
|
|
||||||
|
|
||||||
// EOF
|
// EOF
|
||||||
|
@ -28,8 +28,7 @@ void CreatePipe()
|
|||||||
{
|
{
|
||||||
DWORD count = 0;
|
DWORD count = 0;
|
||||||
BYTE buffer[PIPE_BUFFER_SIZE] = {};
|
BYTE buffer[PIPE_BUFFER_SIZE] = {};
|
||||||
HANDLE hostPipe = ::hookPipe = INVALID_HANDLE_VALUE,
|
HANDLE hostPipe = ::hookPipe = INVALID_HANDLE_VALUE;
|
||||||
pipeAcquisitionMutex = CreateMutexW(nullptr, TRUE, ITH_GRANTPIPE_MUTEX);
|
|
||||||
|
|
||||||
while (::hookPipe == INVALID_HANDLE_VALUE || hostPipe == INVALID_HANDLE_VALUE)
|
while (::hookPipe == INVALID_HANDLE_VALUE || hostPipe == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
@ -49,9 +48,6 @@ void CreatePipe()
|
|||||||
*(DWORD*)buffer = GetCurrentProcessId();
|
*(DWORD*)buffer = GetCurrentProcessId();
|
||||||
WriteFile(::hookPipe, buffer, sizeof(DWORD), &count, nullptr);
|
WriteFile(::hookPipe, buffer, sizeof(DWORD), &count, nullptr);
|
||||||
|
|
||||||
ReleaseMutex(pipeAcquisitionMutex);
|
|
||||||
CloseHandle(pipeAcquisitionMutex);
|
|
||||||
|
|
||||||
ConsoleOutput("NextHooker: pipe connected");
|
ConsoleOutput("NextHooker: pipe connected");
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
ConsoleOutput("Hooks don't work on x64, only read codes work. Engine disabled.");
|
ConsoleOutput("Hooks don't work on x64, only read codes work. Engine disabled.");
|
||||||
|
Loading…
Reference in New Issue
Block a user