-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
In PowerShell repository we have to use pinvoke to support WindowStyle without UseShellExecute.
Today .Net supports WindowStyle only if UseShellExecute is true
runtime/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Win32.cs
Lines 23 to 30 in 58719ec
| private bool StartCore(ProcessStartInfo startInfo) | |
| { | |
| return startInfo.UseShellExecute | |
| ? StartWithShellExecuteEx(startInfo) | |
| : StartWithCreateProcess(startInfo); | |
| } | |
| private unsafe bool StartWithShellExecuteEx(ProcessStartInfo startInfo) |
Current request is to add support for WindowStyle (on Windows) if UseShellExecute is false
runtime/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs
Line 427 in 58719ec
| private unsafe bool StartWithCreateProcess(ProcessStartInfo startInfo) |
It looks like a very simple implementation.
We would like confirmation soon from the .Net team that this can be implemented in .Net 8 so that we can avoid unnecessary work in the PowerShell repository.