Update 0.9.8b
This commit is contained in:
parent
e7836475f9
commit
4e28860059
|
@ -21,8 +21,8 @@
|
|||
#ifndef _MY_VERSION_H
|
||||
#define _MY_VERSION_H
|
||||
|
||||
#define MY_VERSION_BINARY 5,53,0
|
||||
#define MY_VERSION_STRING "5.53.0"
|
||||
#define MY_VERSION_BINARY 5,53,1
|
||||
#define MY_VERSION_STRING "5.53.1"
|
||||
#define MY_VERSION_COMPAT "5.53.0" // this refers to the driver ABI compatibility
|
||||
|
||||
// These #defines are used by either Resource Compiler, or by NSIC installer
|
||||
|
|
|
@ -1311,7 +1311,7 @@ _FX HWND Gui_CreateWindowExW(
|
|||
TlsData->gui_hooks_installed = TRUE;
|
||||
}
|
||||
|
||||
Taskbar_SetProcessAppUserModelId();
|
||||
//Taskbar_SetProcessAppUserModelId();
|
||||
}
|
||||
|
||||
hwndResult = __sys_CreateWindowExW(
|
||||
|
@ -1419,7 +1419,7 @@ _FX HWND Gui_CreateWindowExA(
|
|||
TlsData->gui_hooks_installed = TRUE;
|
||||
}
|
||||
|
||||
Taskbar_SetProcessAppUserModelId();
|
||||
//Taskbar_SetProcessAppUserModelId();
|
||||
}
|
||||
|
||||
hwndResult = __sys_CreateWindowExA(
|
||||
|
|
|
@ -499,49 +499,50 @@ _FX WCHAR *Taskbar_CreateAppUserModelId(const WCHAR *AppId)
|
|||
// Taskbar_SetProcessAppUserModelId
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
//extern ULONG Dll_Windows;
|
||||
_FX void Taskbar_SetProcessAppUserModelId(void)
|
||||
{
|
||||
static BOOLEAN _done = FALSE;
|
||||
|
||||
P_SetCurrentProcessExplicitAppUserModelID
|
||||
SetCurrentProcessExplicitAppUserModelID;
|
||||
|
||||
if ((Dll_OsBuild < 7600) || (! Dll_InitComplete))
|
||||
return;
|
||||
|
||||
if (Taskbar_SavedAppUserModelId || _done)
|
||||
return;
|
||||
|
||||
//
|
||||
// make sure the necessary function from shell32 is available
|
||||
//
|
||||
// if(Dll_Windows < 10) {
|
||||
SetCurrentProcessExplicitAppUserModelID =
|
||||
(P_SetCurrentProcessExplicitAppUserModelID) Ldr_GetProcAddrNew(DllName_shell32, L"SetCurrentProcessExplicitAppUserModelID","SetCurrentProcessExplicitAppUserModelID");
|
||||
|
||||
// }
|
||||
/*
|
||||
else {
|
||||
|
||||
SetCurrentProcessExplicitAppUserModelID = (P_SetCurrentProcessExplicitAppUserModelID)
|
||||
GetProcAddress(LoadLibraryW(DllName_shell32),"SetCurrentProcessExplicitAppUserModelID");
|
||||
}
|
||||
*/
|
||||
if (! SetCurrentProcessExplicitAppUserModelID)
|
||||
return;
|
||||
|
||||
//
|
||||
// override AppUserModelId
|
||||
//
|
||||
|
||||
_done = TRUE;
|
||||
|
||||
if (Taskbar_ShouldOverrideAppUserModelId()) {
|
||||
|
||||
SetCurrentProcessExplicitAppUserModelID(Dll_ImageName);
|
||||
}
|
||||
}
|
||||
//_FX void Taskbar_SetProcessAppUserModelId(void)
|
||||
//{
|
||||
// static BOOLEAN _done = FALSE;
|
||||
//
|
||||
// P_SetCurrentProcessExplicitAppUserModelID
|
||||
// SetCurrentProcessExplicitAppUserModelID;
|
||||
//
|
||||
// if ((Dll_OsBuild < 7600) || (! Dll_InitComplete))
|
||||
// return;
|
||||
//
|
||||
// if (Taskbar_SavedAppUserModelId || _done)
|
||||
// return;
|
||||
//
|
||||
// //
|
||||
// // make sure the necessary function from shell32 is available
|
||||
// //
|
||||
//// if(Dll_Windows < 10) {
|
||||
// SetCurrentProcessExplicitAppUserModelID =
|
||||
// (P_SetCurrentProcessExplicitAppUserModelID) Ldr_GetProcAddrNew(DllName_shell32, L"SetCurrentProcessExplicitAppUserModelID","SetCurrentProcessExplicitAppUserModelID");
|
||||
//
|
||||
// // }
|
||||
// /*
|
||||
// else {
|
||||
//
|
||||
// SetCurrentProcessExplicitAppUserModelID = (P_SetCurrentProcessExplicitAppUserModelID)
|
||||
// GetProcAddress(LoadLibraryW(DllName_shell32),"SetCurrentProcessExplicitAppUserModelID");
|
||||
// }
|
||||
// */
|
||||
// if (! SetCurrentProcessExplicitAppUserModelID)
|
||||
// return;
|
||||
//
|
||||
// //
|
||||
// // override AppUserModelId
|
||||
// //
|
||||
//
|
||||
// _done = TRUE;
|
||||
//
|
||||
// if (Taskbar_ShouldOverrideAppUserModelId()) {
|
||||
//
|
||||
// SetCurrentProcessExplicitAppUserModelID(Dll_ImageName);
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -590,9 +591,15 @@ _FX void Taskbar_SetWindowAppUserModelId(HWND hwnd)
|
|||
// set explicit AppUserModelID for the window
|
||||
//
|
||||
|
||||
// Note: without the right value we may end up with multiple window groups
|
||||
// so don't do anythign if we dont have Taskbar_SavedAppUserModelId
|
||||
// see also disabled Taskbar_SetProcessAppUserModelId
|
||||
if (!Taskbar_SavedAppUserModelId)
|
||||
return;
|
||||
|
||||
AppId = Taskbar_SavedAppUserModelId;
|
||||
if (! AppId)
|
||||
AppId = Dll_ImageName;
|
||||
//if (! AppId)
|
||||
// AppId = Dll_ImageName;
|
||||
|
||||
v.vt = VT_BSTR;
|
||||
v.bstrVal = Taskbar_AllocBSTR(AppId);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
BOOLEAN Taskbar_Init(HMODULE);
|
||||
|
||||
void Taskbar_SetProcessAppUserModelId(void);
|
||||
//void Taskbar_SetProcessAppUserModelId(void);
|
||||
|
||||
void Taskbar_SetWindowAppUserModelId(HWND hwnd);
|
||||
|
||||
|
|
|
@ -830,21 +830,8 @@ ULONG SbieIniServer::CacheConfig()
|
|||
|
||||
if (hFile == INVALID_HANDLE_VALUE) {
|
||||
DWORD err = GetLastError();
|
||||
if (err == ERROR_FILE_NOT_FOUND) {
|
||||
|
||||
m_pConfigIni = new SConfigIni;
|
||||
m_pConfigIni->Encoding = 0;
|
||||
|
||||
// set a ini header with a descriptive comment
|
||||
m_pConfigIni->Sections.push_back(SIniSection{ L"" });
|
||||
m_pConfigIni->Sections.back().Entries.push_back(SIniEntry{ L"", L"#" });
|
||||
m_pConfigIni->Sections.back().Entries.push_back(SIniEntry{ L"", L"# Sandboxie-Plus configuration file" });
|
||||
m_pConfigIni->Sections.back().Entries.push_back(SIniEntry{ L"", L"#" });
|
||||
|
||||
m_pConfigIni->Sections.push_back(SIniSection{ L"GlobalSettings" });
|
||||
|
||||
if (err == ERROR_FILE_NOT_FOUND)
|
||||
status = STATUS_SUCCESS; // the file does not exist that's ok
|
||||
}
|
||||
else
|
||||
SbieApi_LogEx(m_session_id, 2322, L"[23 / %d]", err);
|
||||
goto finish;
|
||||
|
@ -855,7 +842,7 @@ ULONG SbieIniServer::CacheConfig()
|
|||
//
|
||||
|
||||
LARGE_INTEGER fileSize;
|
||||
if (!GetFileSizeEx(hFile, &fileSize) || fileSize.QuadPart >= CONF_LINE_LEN * CONF_MAX_LINES) {
|
||||
if (!GetFileSizeEx(hFile, &fileSize) || fileSize.QuadPart >= CONF_LINE_LEN * 2 * CONF_MAX_LINES) {
|
||||
status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
SbieApi_LogEx(m_session_id, 2322, L"[24 / %d]", status);
|
||||
goto finish;
|
||||
|
@ -940,6 +927,20 @@ finish:
|
|||
|
||||
HeapFree(GetProcessHeap(), 0, IniPath);
|
||||
|
||||
if (NT_SUCCESS(status) && m_pConfigIni == NULL) {
|
||||
|
||||
m_pConfigIni = new SConfigIni;
|
||||
m_pConfigIni->Encoding = 0;
|
||||
|
||||
// set a ini header with a descriptive comment
|
||||
m_pConfigIni->Sections.push_back(SIniSection{ L"" });
|
||||
m_pConfigIni->Sections.back().Entries.push_back(SIniEntry{ L"", L"#" });
|
||||
m_pConfigIni->Sections.back().Entries.push_back(SIniEntry{ L"", L"# Sandboxie-Plus configuration file" });
|
||||
m_pConfigIni->Sections.back().Entries.push_back(SIniEntry{ L"", L"#" });
|
||||
|
||||
m_pConfigIni->Sections.push_back(SIniSection{ L"GlobalSettings" });
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
@ -1195,7 +1195,7 @@ QString CSbieAPI::SbieIniGet(const QString& Section, const QString& Setting, qui
|
|||
|
||||
WCHAR out_buffer[CONF_LINE_LEN] = { 0 };
|
||||
|
||||
__declspec(align(8)) UNICODE_STRING64 Output = { 0, CONF_LINE_LEN - 4 , (ULONG64)out_buffer };
|
||||
__declspec(align(8)) UNICODE_STRING64 Output = { 0, sizeof(out_buffer) - 4 , (ULONG64)out_buffer };
|
||||
__declspec(align(8)) ULONG64 parms[API_NUM_ARGS];
|
||||
|
||||
memset(parms, 0, sizeof(parms));
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -63,6 +63,8 @@
|
|||
<file>Actions/Duplicate.png</file>
|
||||
<file>Actions/Up.png</file>
|
||||
<file>Actions/Down.png</file>
|
||||
<file>Actions/All.png</file>
|
||||
<file>Actions/Save.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/Boxes">
|
||||
<file alias="Empty3">Boxes/sandbox-b-empty.png</file>
|
||||
|
|
|
@ -103,9 +103,15 @@ CTraceView::CTraceView(QWidget* parent) : CPanelWidget<QTreeViewEx>(parent)
|
|||
connect(m_pTraceStatus, SIGNAL(currentIndexChanged(int)), this, SLOT(OnSetFilter()));
|
||||
m_pTraceToolBar->addWidget(m_pTraceStatus);
|
||||
|
||||
m_pAllBoxes = new QCheckBox(tr("Show All Boxes"));
|
||||
connect(m_pAllBoxes, SIGNAL(stateChanged(int)), this, SLOT(OnSetFilter()));
|
||||
m_pTraceToolBar->addWidget(m_pAllBoxes);
|
||||
m_pAllBoxes = m_pTraceToolBar->addAction(CSandMan::GetIcon("All"), tr("Show All Boxes"), this, SLOT(OnSetFilter()));
|
||||
m_pAllBoxes->setCheckable(true);
|
||||
m_pAllBoxes->setChecked(theConf->GetBool("Options/UseLogTree"));
|
||||
|
||||
m_pTraceToolBar->addSeparator();
|
||||
|
||||
m_pSaveToFile = m_pTraceToolBar->addAction(CSandMan::GetIcon("Save"), tr("Save to file"), this, SLOT(SaveToFile()));
|
||||
m_pSaveToFile->setCheckable(true);
|
||||
m_pSaveToFile->setChecked(theConf->GetBool("Options/UseLogTree"));
|
||||
|
||||
m_pMainLayout->setSpacing(0);
|
||||
|
||||
|
@ -325,3 +331,37 @@ void CTraceView::OnSetFilter()
|
|||
}
|
||||
|
||||
|
||||
void CTraceView::SaveToFile()
|
||||
{
|
||||
QString Path = QFileDialog::getSaveFileName(this, tr("Save trace log to file"), "", QString("Log files (*.log)")).replace("/", "\\");
|
||||
|
||||
QFile File(Path);
|
||||
if (!File.open(QFile::WriteOnly)) {
|
||||
QMessageBox::critical(this, "Sandboxie-Plus", tr("Failed to open log file for writing"));
|
||||
return;
|
||||
}
|
||||
|
||||
QVector<CTraceEntryPtr> ResourceLog = theAPI->GetTrace();
|
||||
for (int i = 0; i < ResourceLog.count(); i++)
|
||||
{
|
||||
CTraceEntryPtr pEntry = ResourceLog.at(i);
|
||||
|
||||
//int iFilter = CTraceView__Filter(pEntry, this);
|
||||
//if (!iFilter)
|
||||
// continue;
|
||||
|
||||
QStringList Line;
|
||||
Line.append(pEntry->GetTimeStamp().toString("hh:mm:ss.zzz"));
|
||||
QString Name = pEntry->GetProcessName();
|
||||
Line.append(Name.isEmpty() ? tr("Unknown") : Name);
|
||||
Line.append(QString("%1").arg(pEntry->GetProcessId()));
|
||||
Line.append(QString("%1").arg(pEntry->GetThreadId()));
|
||||
Line.append(pEntry->GetTypeStr());
|
||||
Line.append(pEntry->GetStautsStr());
|
||||
Line.append(pEntry->GetMessage());
|
||||
|
||||
File.write(Line.join("\t").toLatin1() + "\n");
|
||||
}
|
||||
|
||||
File.close();
|
||||
}
|
|
@ -28,6 +28,8 @@ private slots:
|
|||
void SetFilter(const QRegExp& Exp, bool bHighLight = false, int Col = -1); // -1 = any
|
||||
void SelectNext();
|
||||
|
||||
void SaveToFile();
|
||||
|
||||
protected:
|
||||
friend int CTraceView__Filter(const CTraceEntryPtr& pEntry, void* params);
|
||||
CTraceModel* m_pTraceModel;
|
||||
|
@ -45,10 +47,11 @@ protected:
|
|||
|
||||
QToolBar* m_pTraceToolBar;
|
||||
QAction* m_pTraceTree;
|
||||
QCheckBox* m_pAllBoxes;
|
||||
QComboBox* m_pTracePid;
|
||||
QComboBox* m_pTraceTid;
|
||||
QComboBox* m_pTraceType;
|
||||
QComboBox* m_pTraceStatus;
|
||||
QAction* m_pAllBoxes;
|
||||
QAction* m_pSaveToFile;
|
||||
|
||||
};
|
|
@ -597,14 +597,16 @@ void COptionsWindow::LoadIniSection()
|
|||
{
|
||||
QString Section;
|
||||
|
||||
/*
|
||||
m_Settings = m_pBox->GetIniSection(NULL, m_Template);
|
||||
|
||||
for (QList<QPair<QString, QString>>::const_iterator I = m_Settings.begin(); I != m_Settings.end(); ++I)
|
||||
Section += I->first + "=" + I->second + "\n";
|
||||
*/
|
||||
// Note: the service only caches sandboxie.ini not templates. ini hence for global tempaltes we need to load the section through the driver
|
||||
if (m_Template && m_pBox->GetName().mid(9, 6).compare("Local_", Qt::CaseInsensitive) != 0)
|
||||
{
|
||||
m_Settings = m_pBox->GetIniSection(NULL, m_Template);
|
||||
|
||||
Section = m_pBox->GetAPI()->SbieIniGetEx(m_pBox->GetName(), "");
|
||||
for (QList<QPair<QString, QString>>::const_iterator I = m_Settings.begin(); I != m_Settings.end(); ++I)
|
||||
Section += I->first + "=" + I->second + "\n";
|
||||
}
|
||||
else
|
||||
Section = m_pBox->GetAPI()->SbieIniGetEx(m_pBox->GetName(), "");
|
||||
|
||||
ui.txtIniSection->setPlainText(Section);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#define VERSION_MJR 0
|
||||
#define VERSION_MIN 9
|
||||
#define VERSION_REV 8
|
||||
#define VERSION_UPD 0
|
||||
#define VERSION_UPD 2
|
||||
|
||||
#ifndef STR
|
||||
#define STR2(X) #X
|
||||
|
|
Loading…
Reference in New Issue