MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / GetSingleThreadInfo

Method GetSingleThreadInfo

WinArk/ProcessThreadTable.cpp:365–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365std::wstring CProcessThreadTable::GetSingleThreadInfo(std::shared_ptr<WinSys::ThreadInfo>& info) {
366 CString text;
367 CString s;
368 const auto& tx = GetThreadInfoEx(info.get());
369
370 s = ThreadStateToString(info->ThreadState);
371 s += L"\t";
372 text += s;
373
374 s.Format(L"%d (0x%05X)", info->Id, info->Id);
375 s += L"\t";
376 text += s;
377
378 s.Format(L"%d (0x%05X)", info->ProcessId, info->ProcessId);
379 s += L"\t";
380 text += s;
381
382 s = info->GetProcessImageName().c_str();
383 s += L"\t";
384 text += s;
385
386 s = FormatHelper::TimeSpanToString(info->UserTime + info->KernelTime);
387 s += L"\t";
388 text += s;
389
390 s = info->CreateTime < (1LL << 32) ? CString() : FormatHelper::TimeToString(info->CreateTime);
391 s += L"\t";
392 text += s;
393
394 s.Format(L"%d", info->Priority);
395 s += L"\t";
396 text += s;
397
398 s.Format(L"%d", info->BasePriority);
399 s += L"\t";
400 text += s;
401
402 if (info->TebBase != nullptr) {
403 s.Format(L"0x%p", info->TebBase);
404 s += L"\t";
405 text += s;
406 }
407 s = info->ThreadState == WinSys::ThreadState::Waiting ? WaitReasonToString(info->WaitReason) : L"";
408 s += L"\t";
409 text += s;
410
411 if (info->StartAddress) {
412 s.Format(L"0x%p", info->StartAddress);
413 s += L"\t";
414 text += s;
415 }
416 if (info->Win32StartAddress != info->StartAddress) {
417 s.Format(L"0x%p", info->Win32StartAddress);
418 s += L"\t";
419 text += s;
420 }
421
422 s.Format(L"0x%p", info->StackBase);

Callers

nothing calls this directly

Calls 5

GetProcessImageNameMethod · 0.80
GetStringMethod · 0.80
GetIoPriorityMethod · 0.45
GetMemoryPriorityMethod · 0.45
GetComFlagsMethod · 0.45

Tested by

no test coverage detected