Build 0.9.3

This commit is contained in:
DavidXanatos 2021-08-08 14:00:07 +02:00
parent d9a9627792
commit a3a01c16c4
5 changed files with 16 additions and 2 deletions

View File

@ -17,7 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- fixed issue with language auto detection [#1018](https://github.com/sandboxie-plus/Sandboxie/issues/1018)
- fixed issue with multiple files with same name, by always showing the extension [#1041](https://github.com/sandboxie-plus/Sandboxie/issues/1041)
- fixed multiple program grouping issues with the sandman ui [#1054](https://github.com/sandboxie-plus/Sandboxie/issues/1054)
- fixed no disk error [#966](https://github.com/sandboxie-plus/Sandboxie/issues/966)
## [0.9.2 / 5.51.2] - 2021-08-07

View File

@ -2419,6 +2419,8 @@ RtlNtStatusToDosError(NTSTATUS Status);
__declspec(dllimport) void __stdcall RtlRaiseStatus(NTSTATUS Status);
NTSTATUS NTAPI RtlSetThreadErrorMode(IN ULONG NewMode, OUT PULONG OldMode);
__declspec(dllimport) PULONG __stdcall
RtlSubAuthoritySid(
_In_ PSID Sid,

View File

@ -357,12 +357,15 @@ _FX ULONG File_GetVolumeSN(const FILE_DRIVE *drive)
InitializeObjectAttributes(
&objattrs, &objname, OBJ_CASE_INSENSITIVE, NULL, NULL);
ULONG OldMode;
RtlSetThreadErrorMode(0x10u, &OldMode);
NTSTATUS status = NtCreateFile(
&handle, GENERIC_READ | SYNCHRONIZE, &objattrs,
&iosb, NULL, 0, FILE_SHARE_VALID_FLAGS,
FILE_OPEN,
FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT,
NULL, 0);
RtlSetThreadErrorMode(OldMode, 0i64);
Dll_Free(objname.Buffer);

View File

@ -132,6 +132,7 @@
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
<PreprocessorDefinitions>QSBIEAPI_LIB;UNICODE;_UNICODE;WIN32;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -178,6 +179,7 @@
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
<PreprocessorDefinitions>QSBIEAPI_LIB;UNICODE;_UNICODE;WIN32;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

View File

@ -812,6 +812,10 @@ typedef struct _FILE_FS_VOLUME_INFORMATION {
WCHAR VolumeLabel[1];
} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
extern "C" {
NTSTATUS NTAPI RtlSetThreadErrorMode(IN ULONG NewMode, OUT PULONG OldMode);
}
ULONG CSbieAPI__GetVolumeSN(wchar_t* path)
{
ULONG sn = 0;
@ -831,13 +835,16 @@ ULONG CSbieAPI__GetVolumeSN(wchar_t* path)
OBJECT_ATTRIBUTES objattrs;
InitializeObjectAttributes(
&objattrs, &objname, OBJ_CASE_INSENSITIVE, NULL, NULL);
ULONG OldMode;
RtlSetThreadErrorMode(0x10u, &OldMode);
NTSTATUS status = NtCreateFile(
&handle, GENERIC_READ | SYNCHRONIZE, &objattrs,
&iosb, NULL, 0, FILE_SHARE_VALID_FLAGS,
FILE_OPEN,
FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT,
NULL, 0);
RtlSetThreadErrorMode(OldMode, 0i64);
delete [] objname.Buffer;