> Sorry but where can I find "RegisterServiceCtrlHandlerEx" ? I could > only find "servicemanager.RegisterServiceCtrlHandler" which is different and > do not catch logon/logoff events.
servicemanager.RegisterServiceCtrlHandler() automatically calls RegisterServiceCtrlHandlerEx on 2k and later. See PythonService.cpp: if (g_RegisterServiceCtrlHandlerEx) { // Use 2K/XP extended registration if available pe->sshStatusHandle = g_RegisterServiceCtrlHandlerEx(szName, service_ctrl_ex, pe); } else { // Otherwise fall back to NT pe->sshStatusHandle = RegisterServiceCtrlHandler(szName, service_ctrl); } This also gives us the theoretical capability of hosting more than 1 service in a python instance, but I've never tried that. Cheers, Mark _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32