6 |
|
|
7 |
STARTUPINFO si; |
STARTUPINFO si; |
8 |
PROCESS_INFORMATION pi; |
PROCESS_INFORMATION pi; |
9 |
|
BOOL proc_ok; |
10 |
|
|
11 |
//printf("start_process: '%s'\n", filename); |
//printf("start_process: '%s'\n", filename); |
12 |
|
|
16 |
ZeroMemory(&pi,sizeof(pi)); |
ZeroMemory(&pi,sizeof(pi)); |
17 |
|
|
18 |
// actually do something now... |
// actually do something now... |
19 |
CreateProcess( |
proc_ok = CreateProcess( |
20 |
NULL, filename, |
NULL, filename, |
21 |
NULL, NULL, FALSE, 0, |
NULL, NULL, FALSE, 0, |
22 |
NULL, NULL, |
NULL, NULL, |
23 |
&si, |
&si, |
24 |
&pi |
&pi |
25 |
); |
); |
26 |
check_alert_error("CreateProcess"); |
|
27 |
|
// did something fail? |
28 |
|
if (!proc_ok) { |
29 |
|
check_alert_error("CreateProcess"); |
30 |
|
return FALSE; |
31 |
|
} |
32 |
|
|
33 |
// 1. background mode |
// 1. background mode |
34 |
if (background) { |
if (background) { |