mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 17:04:12 +08:00
remove unneeded code from host
This commit is contained in:
parent
2fcdf141c5
commit
d535ece5a3
10
host/host.cc
10
host/host.cc
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user