Baidu said path have Spaces with double quotes, also have to say to want to add terminator, all but also useless,
STARTUPINFO si={0};
Si. Cb=sizeof (STARTUPINFO);
ZeroMemory (& amp; Si, sizeof (si));
Si. HStdError=hPipeWrite;
Si. HStdOutput=hPipeWrite;
Si. DwFlags=STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
Si. WShowWindow=SW_HIDE;//SW_SHOW;
PROCESS_INFORMATION PI={0};
ZeroMemory (& amp; PI, sizeof (PI));
Cstrings szDest=_T (" \ "") + sCmdText + _T (" \ " 0 ");
Cstrings hebing=szDest + _T (" ") + parameter;
BOOL bProcess=CreateProcess (NULL, LPWSTR hebing (LPCTSTR), NULL, NULL, TRUE, 0, NULL, NULL, & amp; Si, & amp; PI);
CodePudding user response:
You print hebing, format should be wrong