| 161 | static HMODULE gNTDll = NULL; |
| 162 | |
| 163 | static void ImportNTDll() |
| 164 | { |
| 165 | if (gNTDll != NULL) |
| 166 | return; |
| 167 | |
| 168 | WCHAR path[MAX_PATH]; |
| 169 | GetSystemDirectory(path, MAX_PATH); |
| 170 | wcscat(path, L"\\ntdll.dll"); |
| 171 | gNTDll = GetModuleHandle(path); |
| 172 | if (gNTDll == NULL) |
| 173 | { |
| 174 | return; |
| 175 | } |
| 176 | gNtQuerySystemInformation = (NtQuerySystemInformation_t)GetProcAddress(gNTDll, "NtQuerySystemInformation"); |
| 177 | } |
| 178 | |
| 179 | typedef HRESULT(WINAPI* SetThreadDescription_t)(HANDLE hThread, PCWSTR lpThreadDescription); |
| 180 | typedef HRESULT(WINAPI* GetThreadDescription_t)(HANDLE hThread, PWSTR* lpThreadDescription); |
no outgoing calls
no test coverage detected