Log CreateProcessW() error code on Windows

Refs #2838 <https://github.com/Genymobile/scrcpy/issues/2838>
fix_win7
Romain Vimont 3 years ago
parent cb8713eb1f
commit 86c91e183d

@ -154,7 +154,9 @@ sc_process_execute_p(const char *const argv[], HANDLE *handle, unsigned flags,
dwCreationFlags, NULL, NULL, &si.StartupInfo, &pi);
free(wide);
if (!ok) {
if (GetLastError() == ERROR_FILE_NOT_FOUND) {
int err = GetLastError();
LOGE("CreateProcessW() error %d", err);
if (err == ERROR_FILE_NOT_FOUND) {
ret = SC_PROCESS_ERROR_MISSING_BINARY;
}
goto error_free_attribute_list;

Loading…
Cancel
Save