+ if (exitcode == STILL_ACTIVE || get_process_exit_time(process_handle, &exit_time)) GetSystemTimeAsFileTime(&exit_time);\r
+ CloseHandle(process_handle);\r
+\r
+ /*\r
+ Log that the service ended BEFORE logging about killing the process\r
+ tree. See below for the possible values of the why argument.\r
+ */\r
+ if (! why) {\r
+ _snprintf(code, sizeof(code), "%d", exitcode);\r
+ log_event(EVENTLOG_INFORMATION_TYPE, NSSM_EVENT_ENDED_SERVICE, exe, service_name, code, 0);\r
+ }\r