HANDLE process_handle;\r
unsigned long pid;\r
HANDLE wait_handle;\r
+ unsigned long exitcode;\r
bool stopping;\r
bool allow_restart;\r
unsigned long throttle;\r
CRITICAL_SECTION throttle_section;\r
bool throttle_section_initialised;\r
+ CRITICAL_SECTION hook_section;\r
+ bool hook_section_initialised;\r
CONDITION_VARIABLE throttle_condition;\r
HANDLE throttle_timer;\r
LARGE_INTEGER throttle_duetime;\r
+ FILETIME nssm_creation_time;\r
FILETIME creation_time;\r
FILETIME exit_time;\r
TCHAR *initial_env;\r
+ unsigned long last_control;\r
+ unsigned long start_requested_count;\r
+ unsigned long start_count;\r
+ unsigned long exit_count;\r
} nssm_service_t;\r
\r
void WINAPI service_main(unsigned long, TCHAR **);\r
int get_service_description(const TCHAR *, SC_HANDLE, unsigned long, TCHAR *);\r
int get_service_startup(const TCHAR *, SC_HANDLE, const QUERY_SERVICE_CONFIG *, unsigned long *);\r
int get_service_username(const TCHAR *, const QUERY_SERVICE_CONFIG *, TCHAR **, size_t *);\r
+void set_service_environment(nssm_service_t *);\r
+void unset_service_environment(nssm_service_t *);\r
int pre_install_service(int, TCHAR **);\r
int pre_remove_service(int, TCHAR **);\r
int pre_edit_service(int, TCHAR **);\r
int stop_service(nssm_service_t *, unsigned long, bool, bool);\r
void CALLBACK end_service(void *, unsigned char);\r
void throttle_restart(nssm_service_t *);\r
-int await_shutdown(nssm_service_t *, TCHAR *, unsigned long);\r
-int await_startup(nssm_service_t *);\r
+int await_single_handle(SERVICE_STATUS_HANDLE, SERVICE_STATUS *, HANDLE, TCHAR *, TCHAR *, unsigned long);\r
\r
#endif\r