Compare commits

...

10 Commits

Author SHA1 Message Date
爱编程的叶一笑 3cfcd20351
Merge d0ece79771 into 15588a4551 2024-05-02 06:29:00 +00:00
love-code-yeyixiao d0ece79771 Fix 2024-05-02 14:25:51 +08:00
DavidXanatos 15588a4551 update 2024-05-02 08:24:09 +02:00
love-code-yeyixiao dcb23086ce Add a check for zero value. 2024-05-02 14:19:53 +08:00
DavidXanatos f0403dcf36
Update CHANGELOG.md 2024-05-01 19:02:02 +02:00
love-code-yeyixiao 8bd2f0710b Fix 2024-04-27 12:49:10 +08:00
love-code-yeyixiao f23c5dffb9 Add hook. 2024-04-27 11:37:02 +08:00
love-code-yeyixiao 1c4fec5f1b FIX 2024-04-21 15:40:58 +08:00
love-code-yeyixiao 0efdf98e7c Fix. 2024-04-20 17:57:50 +08:00
love-code-yeyixiao 01fa98d947 Add Time changer. 2024-04-20 17:21:53 +08:00
6 changed files with 167 additions and 18 deletions

View File

@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [1.13.7 / 5.68.7] - 2024-04-
## [1.13.7 / 5.68.7] - 2024-05-01
### Added
- added file version information for SbieDll.dll and SbieSvc.exe in the Sandboxie Plus About dialog

View File

@ -25,8 +25,8 @@
#define STR(X) STR2(X)
#define VERSION_MJR 5
#define VERSION_MIN 70
#define VERSION_REV 0
#define VERSION_MIN 68
#define VERSION_REV 7
#define VERSION_UPD 0
#if VERSION_UPD > 0

View File

@ -416,7 +416,18 @@ _FX BOOLEAN Gui_Init(HMODULE module)
GUI_IMPORT___(ClipCursor);
GUI_IMPORT___(GetClipCursor);
GUI_IMPORT___(GetCursorPos);
GUI_IMPORT___(SetCursorPos);
GUI_IMPORT___(SetCursorPos);
GUI_IMPORT___(SetTimer);
HMODULE temp = module;
module = Dll_Kernel32;
GUI_IMPORT___(Sleep);
GUI_IMPORT___(SleepEx);
GUI_IMPORT___(GetTickCount);
GUI_IMPORT___(GetTickCount64);
GUI_IMPORT___(QueryUnbiasedInterruptTime);
GUI_IMPORT___(QueryPerformanceCounter);
module = temp;
GUI_IMPORT___(MsgWaitForMultipleObjects);
GUI_IMPORT_AW(PeekMessage);

View File

@ -100,6 +100,29 @@ typedef void (*P_SwitchToThisWindow)(HWND hWnd, BOOL fAlt);
typedef HWND(*P_SetActiveWindow)(HWND hWnd);
typedef DWORD(*P_GetTickCount)();
typedef ULONGLONG (*P_GetTickCount64)();
typedef BOOL(*P_QueryUnbiasedInterruptTime)(
PULONGLONG UnbiasedTime
);
typedef void(*P_Sleep)(DWORD dwMiSecond);
typedef DWORD(*P_SleepEx)(DWORD dwMiSecond, BOOL bAlert);
typedef BOOL (*P_QueryPerformanceCounter)(
LARGE_INTEGER* lpPerformanceCount
);
typedef UINT_PTR (*P_SetTimer)(
HWND hWnd,
UINT_PTR nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
);
typedef BOOL (*P_GetCursorPos)(LPPOINT lpPoint);
typedef BOOL (*P_SetCursorPos)(int x, int y);
@ -618,6 +641,14 @@ GUI_SYS_VAR_2(PostMessage)
GUI_SYS_VAR_2(PostThreadMessage)
GUI_SYS_VAR_2(DispatchMessage)
GUI_SYS_VAR(Sleep)
GUI_SYS_VAR(SleepEx)
GUI_SYS_VAR(GetTickCount)
GUI_SYS_VAR(QueryUnbiasedInterruptTime)
GUI_SYS_VAR(GetTickCount64)
GUI_SYS_VAR(QueryPerformanceCounter)
GUI_SYS_VAR(SetTimer)
GUI_SYS_VAR(MapWindowPoints)
GUI_SYS_VAR(ClientToScreen)
GUI_SYS_VAR(ScreenToClient)

View File

@ -121,6 +121,27 @@ static BOOL Gui_ShutdownBlockReasonCreate(HWND hWnd, LPCWSTR pwszReason);
static EXECUTION_STATE Gui_SetThreadExecutionState(EXECUTION_STATE esFlags);
static DWORD Gui_GetTickCount();
static ULONGLONG Gui_GetTickCount64();
static BOOL Gui_QueryUnbiasedInterruptTime(
PULONGLONG UnbiasedTime
);
static void Gui_Sleep(DWORD dwMiSecond);
static DWORD Gui_SleepEx(DWORD dwMiSecond, BOOL bAlert);
static BOOL Gui_QueryPerformanceCounter(
LARGE_INTEGER* lpPerformanceCount
);
static UINT_PTR Gui_SetTimer(
HWND hWnd,
UINT_PTR nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
);
//---------------------------------------------------------------------------
@ -286,7 +307,7 @@ _FX BOOLEAN Gui_InitMisc(HMODULE module)
__sys_GetThreadDpiAwarenessContext = (P_GetThreadDpiAwarenessContext)
Ldr_GetProcAddrNew(DllName_user32, L"GetThreadDpiAwarenessContext","GetThreadDpiAwarenessContext");
HMODULE current = module;
if (SbieApi_QueryConfBool(NULL, L"BlockInterferePower", FALSE)) {
SBIEDLL_HOOK_GUI(ShutdownBlockReasonCreate);
@ -295,7 +316,26 @@ _FX BOOLEAN Gui_InitMisc(HMODULE module)
SBIEDLL_HOOK(Gui_, SetThreadExecutionState);
}
if (SbieApi_QueryConfBool(NULL, L"UseChangeSpeed", FALSE))
{
module = current;
P_SetTimer SetTimer = Ldr_GetProcAddrNew(DllName_user32, "SetTimer", "SetTimer");
if (SetTimer)
SBIEDLL_HOOK(Gui_, SetTimer);
module = Dll_Kernel32;
SBIEDLL_HOOK(Gui_, GetTickCount);
P_GetTickCount64 GetTickCount64 = Ldr_GetProcAddrNew(Dll_Kernel32, "GetTickCount64", "GetTickCount64");
if (GetTickCount64)
SBIEDLL_HOOK(Gui_, GetTickCount64);
P_QueryUnbiasedInterruptTime QueryUnbiasedInterruptTime = Ldr_GetProcAddrNew(Dll_Kernel32, "QueryUnbiasedInterruptTime", "QueryUnbiasedInterruptTime");
if (QueryUnbiasedInterruptTime)
SBIEDLL_HOOK(Gui_, QueryUnbiasedInterruptTime);
SBIEDLL_HOOK(Gui_, QueryPerformanceCounter);
SBIEDLL_HOOK(Gui_, Sleep);
SBIEDLL_HOOK(Gui_, SleepEx);
}
return TRUE;
}
@ -1699,3 +1739,70 @@ _FX void Gui_SwitchToThisWindow(HWND hWnd, BOOL fAlt)
return;
__sys_SwitchToThisWindow(hWnd, fAlt);
}
_FX DWORD Gui_GetTickCount() {
ULONG add = SbieApi_QueryConfNumber(NULL, L"AddTickSpeed", 1), low = SbieApi_QueryConfNumber(NULL, L"LowTickSpeed", 1);
if (low != 0)
return __sys_GetTickCount() * add / low;
else
return __sys_GetTickCount() * add;
}
_FX ULONGLONG Gui_GetTickCount64() {
ULONG add = SbieApi_QueryConfNumber(NULL, L"AddTickSpeed", 1), low = SbieApi_QueryConfNumber(NULL, L"LowTickSpeed", 1);
if (low != 0)
return __sys_GetTickCount64() * add / low;
else
return __sys_GetTickCount64() * add;
}
_FX BOOL Gui_QueryUnbiasedInterruptTime(
PULONGLONG UnbiasedTime
) {
BOOL rtn = __sys_QueryUnbiasedInterruptTime(UnbiasedTime);
ULONG add = SbieApi_QueryConfNumber(NULL, L"AddTickSpeed", 1), low = SbieApi_QueryConfNumber(NULL, L"LowTickSpeed", 1);
if (low != 0)
*UnbiasedTime *= add / low;
else
*UnbiasedTime *= add;
return rtn;
}
_FX void Gui_Sleep(DWORD dwMiSecond) {
ULONG add = SbieApi_QueryConfNumber(NULL, L"AddSleepSpeed", 1), low = SbieApi_QueryConfNumber(NULL, L"LowSleepSpeed", 1);
if (add != 0 && low != 0)
__sys_Sleep(dwMiSecond * add / low);
}
_FX DWORD Gui_SleepEx(DWORD dwMiSecond, BOOL bAlert) {
ULONG add = SbieApi_QueryConfNumber(NULL, L"AddSleepSpeed", 1), low = SbieApi_QueryConfNumber(NULL, L"LowSleepSpeed", 1);
if (add != 0 && low != 0)
return __sys_SleepEx(dwMiSecond * add / low, bAlert);
else
return 0;
}
_FX BOOL Gui_QueryPerformanceCounter(
LARGE_INTEGER* lpPerformanceCount
) {
ULONG add = SbieApi_QueryConfNumber(NULL, L"AddTickSpeed", 1),low= SbieApi_QueryConfNumber(NULL, L"LowTickSpeed", 1);
BOOL rtn = __sys_QueryPerformanceCounter(lpPerformanceCount);
if(add!=0&&low!=0)
lpPerformanceCount->QuadPart = lpPerformanceCount->QuadPart*add /low ;
return rtn;
}
_FX UINT_PTR Gui_SetTimer(
HWND hWnd,
UINT_PTR nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
)
{
ULONG add = SbieApi_QueryConfNumber(NULL, L"AddTimerSpeed", 1), low = SbieApi_QueryConfNumber(NULL, L"LowTimerSpeed", 1);
if (add != 0 && low != 0)
return __sys_SetTimer(hWnd, nIDEvent, uElapse * add / low, lpTimerFunc);
else
return 0;
}

View File

@ -185,7 +185,7 @@
<message>
<location filename="Wizards/NewBoxWizard.cpp" line="748"/>
<source>Drop rights from Administrators and Power Users groups</source>
<translation type="unfinished">Retirer les droits des groupes Administrateurs et Utilisateurs Avancés</translation>
<translation>Abandonner les droits des groupes Administrateurs et Utilisateurs Avancés</translation>
</message>
<message>
<location filename="Wizards/NewBoxWizard.cpp" line="754"/>
@ -3759,22 +3759,22 @@ Ce fichier fait partie de Sandboxie et toute modification faite sur lui sera ann
<message>
<location filename="SandMan.cpp" line="4303"/>
<source>&lt;h3&gt;About Sandboxie-Plus&lt;/h3&gt;&lt;p&gt;Version %1&lt;/p&gt;&lt;p&gt;</source>
<translation type="unfinished"></translation>
<translation>&lt;h3&gt;À propos de Sandboxie-Plus&lt;/h3&gt;&lt;p&gt;Version %1&lt;/p&gt;&lt;p&gt;</translation>
</message>
<message>
<location filename="SandMan.cpp" line="4311"/>
<source>This copy of Sandboxie-Plus is certified for: %1</source>
<translation type="unfinished"></translation>
<translation>Cette copie de Sandboxie-Plus est attestée pour : %1</translation>
</message>
<message>
<location filename="SandMan.cpp" line="4313"/>
<source>Sandboxie-Plus is free for personal and non-commercial use.</source>
<translation type="unfinished"></translation>
<translation>Sandboxie-Plus est gratuit pour une utilisation personnelle et non commerciale.</translation>
</message>
<message>
<location filename="SandMan.cpp" line="4317"/>
<source>Sandboxie-Plus is an open source continuation of Sandboxie.&lt;br /&gt;Visit &lt;a href=&quot;https://sandboxie-plus.com&quot;&gt;sandboxie-plus.com&lt;/a&gt; for more information.&lt;br /&gt;&lt;br /&gt;%2&lt;br /&gt;&lt;br /&gt;Features: %3&lt;br /&gt;&lt;br /&gt;Installation: %1&lt;br /&gt;SbieDrv.sys: %4&lt;br /&gt; SbieSvc.exe: %5&lt;br /&gt; SbieDll.dll: %6&lt;br /&gt;&lt;br /&gt;Icons from &lt;a href=&quot;https://icons8.com&quot;&gt;icons8.com&lt;/a&gt;</source>
<translation type="unfinished"></translation>
<translation>Sandboxie-Plus est la poursuite en code source ouvert de Sandboxie.&lt;br /&gt;Visitez &lt;a href=&quot;https://sandboxie-plus.com&quot;&gt;sandboxie-plus.com&lt;/a&gt; pour plus d&apos;informations.&lt;br /&gt;&lt;br /&gt;%2&lt;br /&gt;&lt;br /&gt;Fonctions : %3&lt;br /&gt;&lt;br /&gt;Installation : %1&lt;br /&gt;SbieDrv.sys : %4&lt;br /&gt; SbieSvc.exe : %5&lt;br /&gt; SbieDll.dll : %6&lt;br /&gt;&lt;br /&gt;Icônes provenant de &lt;a href=&quot;https://icons8.com&quot;&gt;icons8.com&lt;/a&gt;</translation>
</message>
<message>
<source>Your Windows build exceeds the current support capabilities of your Sandboxie version, resulting in the disabling of token-based security isolation. Consequently, all applications will operate in application compartment mode without secure isolation.<byte value="xd"/>
@ -7173,7 +7173,7 @@ Idéal s&apos;il y a un grand nombre de petits fichiers, cela rendra l&apos;arch
<message>
<location filename="Forms/OptionsWindow.ui" line="1123"/>
<source>Drop rights from Administrators and Power Users groups</source>
<translation>Retirer les droits des groupes Administrateurs et Utilisateurs Avancés</translation>
<translation>Abandonner les droits des groupes Administrateurs et Utilisateurs Avancés</translation>
</message>
<message>
<location filename="Forms/OptionsWindow.ui" line="227"/>
@ -7514,7 +7514,7 @@ Idéal s&apos;il y a un grand nombre de petits fichiers, cela rendra l&apos;arch
<message>
<location filename="Forms/OptionsWindow.ui" line="1147"/>
<source>Note: Msi Installer Exemptions should not be required, but if you encounter issues installing a msi package which you trust, this option may help the installation complete successfully. You can also try disabling drop admin rights.</source>
<translation>Remarque : Les exemptions de l&apos;installeur MicroSoft (MSI) ne devraient pas être nécessaires, mais si vous rencontrez des problèmes lors de l&apos;installation d&apos;un paquetage MSI auquel vous faites confiance, cette option peut aider l&apos;installation à se terminer avec succès. Vous pouvez également essayer de désactiver la suppression des droits d&apos;administrateur.</translation>
<translation>Remarque : Les exemptions de l&apos;installeur MicroSoft (MSI) ne devraient pas être nécessaires, mais si vous rencontrez des problèmes lors de l&apos;installation d&apos;un paquetage MSI auquel vous faites confiance, cette option peut aider l&apos;installation à se terminer avec succès. Vous pouvez également essayer de désactiver l&apos;abandon des droits d&apos;administrateur.</translation>
</message>
<message>
<location filename="Forms/OptionsWindow.ui" line="244"/>
@ -8157,7 +8157,7 @@ Pour l&apos;accès aux fichiers, vous pouvez utiliser « Toujours direct » pour
<message>
<location filename="Forms/OptionsWindow.ui" line="1623"/>
<source>Drop critical privileges from processes running with a SYSTEM token</source>
<translation>Retirer les privilèges critiques des processus tournant avec un jeton SYSTÈME</translation>
<translation>Abandonner les privilèges critiques des processus tournant avec un jeton SYSTÈME</translation>
</message>
<message>
<location filename="Forms/OptionsWindow.ui" line="1616"/>
@ -8558,7 +8558,7 @@ au lieu de « * ».</translation>
<location filename="Forms/OptionsWindow.ui" line="823"/>
<source>Prevent move mouse, bring in front, and similar operations, this is likely to cause issues with games.</source>
<oldsource>Prevent move mouse, bring in front, and simmilar operations, this is likely to cause issues with games.</oldsource>
<translation type="unfinished">Empêcher les mouvements à la souris, la mise au premier plan, et les opérations similaires (activer ceci est susceptible de causer des problèmes avec les jeux).</translation>
<translation>Empêcher les mouvements à la souris, la mise au premier plan, et les opérations similaires (activer ceci est susceptible de causer des problèmes avec les jeux).</translation>
</message>
<message>
<location filename="Forms/OptionsWindow.ui" line="826"/>
@ -8569,7 +8569,7 @@ au lieu de « * ».</translation>
<location filename="Forms/OptionsWindow.ui" line="833"/>
<source>This feature does not block all means of obtaining a screen capture, only some common ones.</source>
<oldsource>This feature does not block all means of optaining a screen capture only some common once.</oldsource>
<translation type="unfinished">Cette fonction ne bloque pas tous les moyens d&apos;obtenir une capture d&apos;écran, seulement les plus communs.</translation>
<translation>Cette fonction ne bloque pas tous les moyens d&apos;obtenir une capture d&apos;écran, seulement les plus communs.</translation>
</message>
<message>
<location filename="Forms/OptionsWindow.ui" line="836"/>
@ -8673,7 +8673,7 @@ Veuillez noter que ces valeurs sont actuellement spécifiques à l&apos;utilisat
<message>
<location filename="Forms/OptionsWindow.ui" line="5050"/>
<source>To compensate for the lost protection, please consult the Drop Rights settings page in the Restrictions settings group.</source>
<translation>Pour compenser la perte de protection, veuillez consulter la page d&apos;abandon des droits dans le groupe de paramètres Restrictions.</translation>
<translation>Pour compenser la perte de protection, veuillez consulter la page d&apos;Abandon des droits dans le groupe de paramètres Restrictions.</translation>
</message>
<message>
<location filename="Forms/OptionsWindow.ui" line="4974"/>
@ -9458,7 +9458,7 @@ Ceci est fait pour empêcher les processus malveillants à l&apos;intérieur du
<location filename="Forms/SettingsWindow.ui" line="80"/>
<source>Hotkey for suspending all processes:</source>
<oldsource>Hotkey for suspending all process</oldsource>
<translation type="unfinished">Raccourci pour suspendre tous les processus :</translation>
<translation>Raccourci pour suspendre tous les processus :</translation>
</message>
<message>
<location filename="Forms/SettingsWindow.ui" line="632"/>