407 |
|
|
408 |
if (cmdline && (stristr (cmdline, "--keymanager") |
if (cmdline && (stristr (cmdline, "--keymanager") |
409 |
|| stristr (cmdline, "--cardmanager"))) { |
|| stristr (cmdline, "--cardmanager"))) { |
410 |
|
/* If an instance of WinPT is running, just send the command |
411 |
|
to open the key manager. Otherwise start a new instance. |
412 |
|
*/ |
413 |
|
HWND tray = FindWindow ("WinPT", "WinPT"); |
414 |
|
if (tray != NULL) { |
415 |
|
PostMessage (tray, WM_COMMAND, ID_WINPT_KEY, 0); |
416 |
|
free_gnupg_table (); |
417 |
|
return 0; |
418 |
|
} |
419 |
update_keycache (GetDesktopWindow ()); |
update_keycache (GetDesktopWindow ()); |
420 |
if (stristr (cmdline, "keymanager")) |
if (stristr (cmdline, "keymanager")) |
421 |
dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_KEYMISC, |
dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_KEYMISC, |
430 |
IDS_WINPT_CARD_EDIT); |
IDS_WINPT_CARD_EDIT); |
431 |
gpg_card_release (crd); |
gpg_card_release (crd); |
432 |
} |
} |
433 |
|
/* |
434 |
keycache_release (0); |
keycache_release (0); |
435 |
free_gnupg_table (); |
free_gnupg_table (); |
436 |
return 0; |
return 0; |
437 |
|
*/ |
438 |
} |
} |
439 |
|
|
440 |
/* If we found another WinPT instance, just quit to avoid it |
/* If we found another WinPT instance, just quit to avoid it |