1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-10 07:38:06 -05:00

Pageant now detects if it is already running and refuses to start if so

[originally from svn r624]
This commit is contained in:
Simon Tatham 2000-09-25 10:56:56 +00:00
parent 603619cbfe
commit 1dc5147efb

View File

@ -545,6 +545,15 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
WNDCLASS wndclass;
MSG msg;
/*
* First bomb out totally if we are already running.
*/
if (FindWindow("Pageant", "Pageant")) {
MessageBox(NULL, "Pageant is already running", "Pageant Error",
MB_ICONERROR | MB_OK);
return 0;
}
instance = inst;
if (!prev) {