remove unneeded code from host

This commit is contained in:
Akash Mozumdar 2018-08-11 12:48:43 -04:00
parent 2fcdf141c5
commit d535ece5a3

View File

@ -26,15 +26,6 @@ HWND dummyWindow;
#define HOST_LOCK CriticalSectionLocker hostLocker(&hostCs) // Synchronized scope for accessing private data #define HOST_LOCK CriticalSectionLocker hostLocker(&hostCs) // Synchronized scope for accessing private data
void GetDebugPrivileges() // Artikash 5/19/2018: Is it just me or is this function 100% superfluous?
{
HANDLE processToken;
TOKEN_PRIVILEGES Privileges = { 1, {0x14, 0, SE_PRIVILEGE_ENABLED} };
OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &processToken);
AdjustTokenPrivileges(processToken, FALSE, &Privileges, 0, nullptr, nullptr);
CloseHandle(processToken);
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID unused) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID unused)
{ {
switch (fdwReason) switch (fdwReason)
@ -62,7 +53,6 @@ namespace Host
} }
else else
{ {
GetDebugPrivileges();
InitializeCriticalSection(&hostCs); InitializeCriticalSection(&hostCs);
onAttach = onDetach = nullptr; onAttach = onDetach = nullptr;
onCreate = onRemove = nullptr; onCreate = onRemove = nullptr;