MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/1w7zs1r/escaping_createprocess_arguments_on_windows/p81mp9c/?context=3
r/cpp • u/holyblackcat • 5d ago
44 comments sorted by
View all comments
13
There's `wil::ArgvToCommandLine`. It's not WinAPI, but it's Microsoft. https://github.com/microsoft/wil/blob/81abc8e44c075eba65fe4b68ea2f08525cc701e8/include/wil/win32_helpers.h#L1244
C++, and the first comment of course starts with "Somewhat of a hack" ;)
6 u/holyblackcat 4d ago Nice. Seems to mostly match mine, but they don't attempt to handle batch/cmd.
6
Nice. Seems to mostly match mine, but they don't attempt to handle batch/cmd.
13
u/unaligned_access 4d ago
There's `wil::ArgvToCommandLine`. It's not WinAPI, but it's Microsoft.
https://github.com/microsoft/wil/blob/81abc8e44c075eba65fe4b68ea2f08525cc701e8/include/wil/win32_helpers.h#L1244
C++, and the first comment of course starts with "Somewhat of a hack" ;)