LPCTSTR applicationName = NUL // NULL => module name from command line
string argument1 = "something";
string argument2 = "anotherthing";
LPTSTR commandLine = "childpath\\child.exe";
success = CreateProcess(
applicationName,
commandLine,
processSecurityAttrs,etc...)
我在这里尝试做的是尝试将父母的命令行参数传递给孩子。但它是LPTSTR
,我不知道如何组合string
和LPTSTR
输入并将其传递给孩子。它给了我类型def。错误。我使用 Visual Studio 2013 和 C++。