Skip to content

Commit e391c98

Browse files
committed
Code quality
1 parent 1a8334f commit e391c98

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Flow.Launcher.Infrastructure/Win32Helper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ public static unsafe bool RunAsDesktopUser(string app, string cmdLine, string cu
827827
if (!PInvoke.LookupPrivilegeValue(null, PInvoke.SE_INCREASE_QUOTA_NAME, out var luid))
828828
{
829829
errorInfo = $"LookupPrivilegeValue failed: {Marshal.GetLastWin32Error()}";
830-
hProcessToken.Dispose();//PInvoke.CloseHandle(hProcessToken);
830+
hProcessToken.Dispose();
831831
return false;
832832
}
833833

@@ -846,7 +846,7 @@ public static unsafe bool RunAsDesktopUser(string app, string cmdLine, string cu
846846

847847
PInvoke.AdjustTokenPrivileges(hProcessToken, false, &tp, 0, null, null);
848848
var lastError = Marshal.GetLastWin32Error();
849-
hProcessToken.Dispose();//PInvoke.CloseHandle(hProcessToken);
849+
hProcessToken.Dispose();
850850

851851
if (lastError != 0)
852852
{
@@ -915,10 +915,10 @@ public static unsafe bool RunAsDesktopUser(string app, string cmdLine, string cu
915915
fixed (char* currentDirPtr = currentDir)
916916
{
917917
if (!PInvoke.CreateProcessWithToken(hPrimaryToken,
918-
0 /*CREATE_PROCESS_LOGON_FLAGS.LOGON_WITH_PROFILE*/,
918+
0,
919919
appPtr,
920920
cmdLinePtr,
921-
0/*PROCESS_CREATION_FLAGS.CREATE_NEW_CONSOLE*/,
921+
0,
922922
null,
923923
currentDirPtr,
924924
&si,

0 commit comments

Comments
 (0)