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

Method GetColumnText

WinArk/LogonSessionsView.cpp:7–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <atlsecurity.h>
6
7CString CLogonSessionsView::GetColumnText(HWND, int row, int col) const {
8 const auto& item = m_Sessions[row];
9
10 switch (col){
11 case 0: return std::format(L"{:2d}", item.Index).c_str();
12 case 1: return std::format(L"{:#08x}`{:08X}", item.LogonId.HighPart, item.LogonId.LowPart).c_str();
13 case 2: return item.UserName.empty() ? L"" : (item.LogonDomain + L"\\" + item.UserName).c_str();
14 case 3: return item.LogonTime.QuadPart == 0 ? CString()
15 : CTime(*(FILETIME*)&item.LogonTime.QuadPart).Format(L"%D %X");
16 case 4: return std::format(L"{:d}", item.Session).c_str();
17 case 5: return LogonTypeToString(item.LogonType);
18 case 6: return item.AuthenticationPackage.c_str();
19 case 7: return item.Sid[0] == 0 ? L"" : CSid((const SID*)item.Sid).Sid();
20 default:
21 break;
22 }
23
24 return L"";
25}
26
27void CLogonSessionsView::DoSort(const SortInfo* si) {
28 if (si == nullptr)

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.80
SidMethod · 0.80

Tested by

no test coverage detected