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

Method GetAttributes

WinArk/ProcessInfoEx.cpp:23–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23ProcessAttributes ProcessInfoEx::GetAttributes(const WinSys::ProcessManager& pm) const {
24 if (_attributes == ProcessAttributes::NotComputed) {
25 _attributes = ProcessAttributes::None;
26 if (_process) {
27 if (_process->IsManaged())
28 _attributes |= ProcessAttributes::Managed;
29 if (_process->IsProtected())
30 _attributes |= ProcessAttributes::Protected;
31 if (_process->IsImmersive())
32 _attributes |= ProcessAttributes::Immersive;
33 if (_process->IsSecure())
34 _attributes |= ProcessAttributes::Secure;
35 if (_process->IsInJob())
36 _attributes |= ProcessAttributes::InJob;
37 auto parent = pm.GetProcessById(_pi->ParentId);
38 if (parent && ::_wcsicmp(parent->GetImageName().c_str(), L"services.exe") == 0)
39 _attributes |= ProcessAttributes::Service;
40 if (_process->IsWow64Process())
41 _attributes |= ProcessAttributes::Wow64;
42 }
43 }
44 return _attributes;
45}
46
47const std::wstring& ProcessInfoEx::GetExecutablePath() const {
48 if (_executablePath.empty() && _pi->Id != 0) {

Callers 2

InitProcessMethod · 0.80
ParseTableEntryMethod · 0.80

Calls 7

IsProtectedMethod · 0.80
IsImmersiveMethod · 0.80
IsSecureMethod · 0.80
IsInJobMethod · 0.80
IsWow64ProcessMethod · 0.80
IsManagedMethod · 0.45
GetProcessByIdMethod · 0.45

Tested by

no test coverage detected