| 260 | } |
| 261 | |
| 262 | DWORD CThread::GetProcessId() |
| 263 | { |
| 264 | THREAD_BASIC_INFORMATION ThreadInfo; |
| 265 | auto ntStatus = g_winapiApiTable->NtQueryInformationThread(m_hThread, ThreadBasicInformation, &ThreadInfo, sizeof(ThreadInfo), NULL); |
| 266 | if (!NT_SUCCESS(ntStatus)) |
| 267 | { |
| 268 | DEBUG_LOG(LL_ERR, xorstr("NtQueryInformationThread fail! Thread: %p Status: %p").crypt_get(), m_hThread, ntStatus); |
| 269 | return g_winapiApiTable->GetCurrentProcessId(); |
| 270 | } |
| 271 | return (DWORD)ThreadInfo.ClientId.UniqueProcess; |
| 272 | } |
| 273 | |
| 274 | std::string CThread::GetThreadOwnerFullName() |
| 275 | { |
no outgoing calls
no test coverage detected