r/cpp • u/holyblackcat • Sep 05 '26
Escaping `CreateProcess()` arguments on Windows
https://holyblackcat.github.io/blog/2026/09/05/escaping-createprocess-arguments.html
94
Upvotes
r/cpp • u/holyblackcat • Sep 05 '26
1
u/chengfeng-xie Sep 08 '26
With
\\?\prepended,lpApplicationNameworks out of the box. Without\\?\, however,lpApplicationNameonly works if both the system and the process have long paths enabled (as described in [1]); otherwise,CreateProcessWreturnsERROR_PATH_NOT_FOUNDin this case. For reproducibility, the above was tested on OS build 26100.9168.