windows-rs CreateProcessW with EXTENDED_STARTUPINFO_PRESENT

Yuwei Ba 1 Reputation point
2021-09-12T14:28:44.01+00:00

I'm using the Rust binding windows-rs to call Win32 APIs to create processes with ConPty.

However the CreateProcessW can only run "some" programs, for example, "notepad.exe",

If I ran "cmd.exe", "powershell.exe", "ping.exe", the program won't start and exit with code: exitcode: 3221225794.

I have a repro at: https://github.com/ibigbug/windows-rs-CreateProcessW

To run different programs, change https://github.com/ibigbug/windows-rs-CreateProcessW/blob/9ba54f27fdbefd07aa8fd03fed96373aeca046f6/src/main.rs#L131

and "cargo r"

related Github issue: https://github.com/microsoft/windows-rs/issues/1121

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,523 questions
{count} votes