9 Mar
2015
9 Mar
'15
10:55 a.m.
Hi Nikolay, On 03/09/15 06:41, Nikolay Sivov wrote:
+ if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, 0, NULL, NULL, &si, &info)) + return HRESULT_FROM_WIN32(GetLastError()); + + hr = WshExec_create(&info, ret); + if (FAILED(hr)) { + TerminateProcess(info.hProcess, hr);
This is questionable error handling. You wouldn't need that if you called WshExec_create before CreateProcessW. Cheers, Jacek