STARTUPINFO si = {sizeof(STARTUPINFO)};
PROCESS_INFORMATION pi;
si.cb = sizeof(STARTUPINFO);
printf("CreateProcess(n): %x\nGLE: %x\n", CreateProcess(L"C:\\Windows\\System32\\osk.exe", NULL, 0, 0, false, NULL, 0, 0, &si, &pi), GetLastError());
Prints CreateProcess(n): 0\nGLE: 0
and no program is started.
Whereas, when I replace the file location with C:\\Windows\\Notepad.exe
, notepad launches.
(x64 project executing on x64 Windows 10).