This commit is contained in:
DavidXanatos 2023-03-13 20:49:27 +01:00
parent 2a4da9ff13
commit d6fcbd94e9
3 changed files with 9 additions and 15 deletions

View File

@ -404,7 +404,13 @@ bool CSbieModel::Sync(const CSandBoxPtr& pBox, const QList<QVariant>& Path, cons
QVariant Value;
switch (section)
{
case eName: Value = pProcess->GetProcessName(); break;
case eName: {
QString Name = pProcess->GetProcessName();
if (pProcess->IsWoW64())
Name += " *32";
Value = Name;
break;
}
case eProcessId: Value = pProcess->GetProcessId(); break;
case eStatus: Value = pProcess->GetStatusStr(); break;
case eTitle: Value = theAPI->GetProcessTitle(pProcess->GetProcessId()); break;

View File

@ -91,15 +91,6 @@ QString CSbieProcess::ImageTypeToStr(quint32 type)
}
}
QString CSbieProcess::GetProcessName() const
{
QString Name = CBoxedProcess::GetProcessName();
if (m_bIsWoW64)
Name += " *32";
return Name;
}
QString CSbieProcess::GetStatusStr() const
{
QString Status;
@ -138,11 +129,9 @@ void CSbieProcess::InitProcessInfoImpl(void* ProcessHandle)
{
CBoxedProcess::InitProcessInfoImpl(ProcessHandle);
HANDLE TokenHandle = NULL;
if(m_pBox->GetBool("NoSecurityIsolation") || m_pBox->GetBool("OriginalToken"))
HANDLE TokenHandle = (HANDLE)m_pBox->Api()->QueryProcessInfo(m_ProcessId, 'ptok');
if (!TokenHandle)
NtOpenProcessToken(ProcessHandle, TOKEN_QUERY, &TokenHandle);
else
TokenHandle = (HANDLE)m_pBox->Api()->QueryProcessInfo(m_ProcessId, 'ptok');
if (TokenHandle)
{
ULONG returnLength;

View File

@ -8,7 +8,6 @@ class CSbieProcess : public CBoxedProcess
public:
CSbieProcess(quint32 ProcessId, class CSandBox* pBox);
virtual QString GetProcessName() const;
virtual QString GetStatusStr() const;
virtual void BlockProgram() { GetBox()->BlockProgram(m_ImageName); }