| 266 | |
| 267 | _IRQL_requires_max_(PASSIVE_LEVEL) |
| 268 | NTSTATUS QueryInformationThread( |
| 269 | HANDLE hThread, |
| 270 | THREADINFOCLASS ThreadInformationClass, |
| 271 | OUT PVOID ThreadInformation, |
| 272 | ULONG ThreadInformationLength, |
| 273 | OUT PULONG ReturnLength |
| 274 | ) { |
| 275 | using _ZwQueryInformationThread = NTSTATUS (NTAPI*)( |
| 276 | HANDLE hThread, |
| 277 | THREADINFOCLASS ThreadInformationClass, |
| 278 | OUT PVOID ThreadInformation, |
| 279 | ULONG ThreadInformationLength, |
| 280 | OUT PULONG ReturnLength |
| 281 | ); |
| 282 | static auto _QueryInformationThread = |
| 283 | static_cast<_ZwQueryInformationThread>(Importer::GetKernelProcAddress(L"ZwQueryInformationThread")); |
| 284 | return _QueryInformationThread |
| 285 | ? _QueryInformationThread( |
| 286 | hThread, |
| 287 | ThreadInformationClass, |
| 288 | ThreadInformation, |
| 289 | ThreadInformationLength, |
| 290 | ReturnLength |
| 291 | ) |
| 292 | : STATUS_NOT_IMPLEMENTED; |
| 293 | } |
| 294 | |
| 295 | _IRQL_requires_max_(PASSIVE_LEVEL) |
| 296 | NTSTATUS SetInformationThread( |
no test coverage detected