22 skip(
"OpenProcessToken() has failed to get the process' token (error code: %lu)!\n",
GetLastError());
39 skip(
"DuplicateToken() has failed to get the process' token (error code: %lu)!\n",
GetLastError());
55 skip(
"AdjustTokenPrivileges() has failed to disable the privileges (error code: %lu)!\n",
GetLastError());
static VOID DisableTokenPrivileges(_In_ HANDLE Token)
static HANDLE GetDuplicateToken(_In_ HANDLE Token)
static HANDLE GetTokenFromCurrentProcess(VOID)
#define ok_hex(expression, result)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
BOOL WINAPI DuplicateToken(IN HANDLE ExistingTokenHandle, IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, OUT PHANDLE DuplicateTokenHandle)
#define GetCurrentProcess()
NTSTATUS NTAPI NtCompareTokens(_In_ HANDLE FirstTokenHandle, _In_ HANDLE SecondTokenHandle, _Out_ PBOOLEAN Equal)
Compares tokens if they're equal or not.
#define STATUS_ACCESS_VIOLATION
DWORD WINAPI GetLastError(void)
#define TOKEN_ADJUST_PRIVILEGES