diff --git a/vnrhook/include/defs.h b/vnrhook/include/defs.h index 0c2d7e9..e848366 100644 --- a/vnrhook/include/defs.h +++ b/vnrhook/include/defs.h @@ -14,7 +14,6 @@ //#define ITH_ENGINE_UX_DLL L"vnrengux.dll" #define ITH_DLL L"vnrhook.dll" -#define ITH_DLL_XP L"vnrhookxp.dll" // Pipes @@ -27,24 +26,7 @@ // Mutex -// jichi 7/12/2015: -// ITH IO name prefix, needed by Windows 10 for NT event and mutex APIs -// Otherwise, NT functions will return status = STATUS_OBJECT_PATH_SYNTAX_BAD -//#define ITH_PATH_ L"\\BaseNamedObjects\\" -#define ITH_PATH_ L"" - -#define ITH_PROCESS_MUTEX_ ITH_PATH_ L"VNR_PROCESS_" // ITH_%d #define ITH_HOOKMAN_MUTEX_ ITH_PATH_ L"VNR_HOOKMAN_" // ITH_HOOKMAN_%d -#define ITH_DETACH_MUTEX_ ITH_PATH_ L"VNR_DETACH_" // ITH_DETACH_%d - #define ITH_GRANTPIPE_MUTEX ITH_PATH_ L"VNR_GRANT_PIPE" // ITH_GRANT_PIPE -#define ITH_CLIENT_MUTEX ITH_PATH_ L"VNR_CLIENT" // ITH_DLL_RUNNING -#define ITH_SERVER_MUTEX ITH_PATH_ L"VNR_SERVER" // ITH_RUNNING -#define ITH_SERVER_HOOK_MUTEX ITH_PATH_ L"VNR_SERVER_HOOK" // original - -// Events - -#define ITH_REMOVEHOOK_EVENT ITH_PATH_ L"VNR_REMOVE_HOOK" // ITH_REMOVE_HOOK - // EOF diff --git a/vnrhook/src/main.cc b/vnrhook/src/main.cc index 57a7290..c6fb780 100644 --- a/vnrhook/src/main.cc +++ b/vnrhook/src/main.cc @@ -94,14 +94,8 @@ BOOL WINAPI DllMain(HINSTANCE hModule, DWORD fdwReason, LPVOID unused) wchar_t hm_mutex[0x100]; swprintf(hm_mutex, ITH_HOOKMAN_MUTEX_ L"%d", GetCurrentProcessId()); ::hmMutex = CreateMutexW(nullptr, FALSE, hm_mutex); - } - { - wchar_t dll_mutex[0x100]; - swprintf(dll_mutex, ITH_PROCESS_MUTEX_ L"%d", GetCurrentProcessId()); - DWORD exists; - ::hMutex = CreateMutexW(nullptr, TRUE, dll_mutex); // jichi 9/18/2013: own is true, make sure the injected dll is singleton - if (GetLastError() == ERROR_ALREADY_EXISTS) - return FALSE; + if (GetLastError() == ERROR_ALREADY_EXISTS) + return FALSE; } ::running = true;