374 |
OSVERSIONINFOA osver; |
OSVERSIONINFOA osver; |
375 |
memset (&osver, 0, sizeof (osver)); |
memset (&osver, 0, sizeof (osver)); |
376 |
osver.dwOSVersionInfoSize = sizeof (osver); |
osver.dwOSVersionInfoSize = sizeof (osver); |
377 |
|
|
|
log_debug("check OS version"); |
|
378 |
if (!GetVersionEx (&osver)) { |
if (!GetVersionEx (&osver)) { |
379 |
MessageBox (NULL, _("Could not read the OS version."), _("WinPT Error"), MB_ERR); |
MessageBox (NULL, _("Could not read the OS version."), _("WinPT Error"), MB_ERR); |
380 |
return 0; |
return 0; |
404 |
int first_start = 0, start_gpgprefs = 0; |
int first_start = 0, start_gpgprefs = 0; |
405 |
int winpt_inst_found = 0; |
int winpt_inst_found = 0; |
406 |
int start_manager = 0; |
int start_manager = 0; |
407 |
|
|
408 |
|
log_debug("check OS version"); |
409 |
if (!check_os_version ()) |
if (!check_os_version ()) |
410 |
return 0; |
return 0; |
411 |
|
|
414 |
/* Allow to shutdown the process, for instance by an installer */ |
/* Allow to shutdown the process, for instance by an installer */ |
415 |
if (cmdline && stristr (cmdline, "--stop")) { |
if (cmdline && stristr (cmdline, "--stop")) { |
416 |
hwnd = FindWindow ("WinPT", "WinPT"); |
hwnd = FindWindow ("WinPT", "WinPT"); |
417 |
if (hwnd != NULL) |
if (hwnd != NULL) { |
418 |
|
log_debug("shutdown an existing WinPT process"); |
419 |
PostMessage (hwnd, WM_DESTROY, 0, 0); |
PostMessage (hwnd, WM_DESTROY, 0, 0); |
420 |
|
} |
421 |
return 0; |
return 0; |
422 |
} |
} |
423 |
|
|