MCPcopy Create free account
hub / github.com/NoMercy-ac/NoMercy / GetProcessId

Method GetProcessId

Source/Client/NM_Engine/ThreadHelper.cpp:262–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262DWORD 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
274std::string CThread::GetThreadOwnerFullName()
275{

Callers 15

IsRemoteThreadMethod · 0.95
OnScanThreadMethod · 0.80
EnumerateThreadsMethod · 0.80
ScanProcessThreadsMethod · 0.80
OnScanSectionMethod · 0.80
ScanProcessSectionsMethod · 0.80
ScanModuleHeaderFunction · 0.80
ScanModuleMethod · 0.80
ScanProcessModulesMethod · 0.80
Terminator.cppFile · 0.80
ScanForMMappedModulesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected