Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/System.Management.Automation/engine/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ internal static Process Start(ProcessStartInfo startInfo, ProcessWindowStyle win
var shellExecuteInfo = new NativeMethods.ShellExecuteInfo();
shellExecuteInfo.fMask = NativeMethods.SEE_MASK_NOCLOSEPROCESS;
shellExecuteInfo.fMask |= NativeMethods.SEE_MASK_FLAG_NO_UI;

switch (windowStyle)
{
case ProcessWindowStyle.Hidden:
Expand All @@ -1546,7 +1546,7 @@ internal static Process Start(ProcessStartInfo startInfo, ProcessWindowStyle win
try
{
if (startInfo.FileName.Length != 0)
shellExecuteInfo.lpFile = Marshal.StringToHGlobalUni(startInfo.FileName);
shellExecuteInfo.lpFile = Marshal.StringToHGlobalUni(startInfo.FileName);
if (!string.IsNullOrEmpty(verb))
shellExecuteInfo.lpVerb = Marshal.StringToHGlobalUni(verb);
if (startInfo.Arguments.Length != 0)
Expand All @@ -1569,7 +1569,7 @@ internal static Process Start(ProcessStartInfo startInfo, ProcessWindowStyle win
}
}
finally
{
{
if (shellExecuteInfo.lpFile != (IntPtr)0) Marshal.FreeHGlobal(shellExecuteInfo.lpFile);
if (shellExecuteInfo.lpVerb != (IntPtr)0) Marshal.FreeHGlobal(shellExecuteInfo.lpVerb);
if (shellExecuteInfo.lpParameters != (IntPtr)0) Marshal.FreeHGlobal(shellExecuteInfo.lpParameters);
Expand Down Expand Up @@ -1690,7 +1690,7 @@ private static class NativeMethods
public const int NtQueryProcessBasicInfo = 0;

[StructLayout(LayoutKind.Sequential)]
internal class ShellExecuteInfo
internal class ShellExecuteInfo
{
public int cbSize = 0;
public int fMask = 0;
Expand All @@ -1708,7 +1708,7 @@ internal class ShellExecuteInfo
public IntPtr hIcon = (IntPtr)0;
public IntPtr hProcess = (IntPtr)0;

public ShellExecuteInfo()
public ShellExecuteInfo()
{
cbSize = Marshal.SizeOf(this);
}
Expand Down