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