Remove A calls in favour of W calls

This commit is contained in:
gingerBill
2022-05-12 14:21:25 +01:00
parent d1fc9d3073
commit 0c45a46aab
6 changed files with 33 additions and 123 deletions
+16 -16
View File
@@ -451,20 +451,20 @@ run_as_user :: proc(username, password, application, commandline: string, pi: ^P
nil, // lpProcessAttributes,
nil, // lpThreadAttributes,
false, // bInheritHandles,
0, // creation flags
nil, // environment,
nil, // current directory: inherit from parent if nil
&si,
pi,
))
if ok {
if wait {
WaitForSingleObject(pi.hProcess, INFINITE)
CloseHandle(pi.hProcess)
CloseHandle(pi.hThread)
}
return true
} else {
return false
}
0, // creation flags
nil, // environment,
nil, // current directory: inherit from parent if nil
&si,
pi,
))
if ok {
if wait {
WaitForSingleObject(pi.hProcess, INFINITE)
CloseHandle(pi.hProcess)
CloseHandle(pi.hThread)
}
return true
} else {
return false
}
}