Use close_handle().
[nssm.git] / process.h
index 1bfc273..3b4aab9 100644 (file)
--- a/process.h
+++ b/process.h
@@ -1,11 +1,13 @@
 #ifndef PROCESS_H\r
 #define PROCESS_H\r
 \r
+#include <psapi.h>\r
 #include <tlhelp32.h>\r
 \r
 typedef struct {\r
   TCHAR *name;\r
   HANDLE process_handle;\r
+  unsigned long depth;\r
   unsigned long pid;\r
   unsigned long exitcode;\r
   unsigned long stop_method;\r
@@ -19,6 +21,9 @@ typedef struct {
   int signalled;\r
 } kill_t;\r
 \r
+typedef int (*walk_function_t)(nssm_service_t *, kill_t *);\r
+\r
+HANDLE get_debug_token();\r
 void service_kill_t(nssm_service_t *, kill_t *);\r
 int get_process_creation_time(HANDLE, FILETIME *);\r
 int get_process_exit_time(HANDLE, FILETIME *);\r
@@ -30,7 +35,9 @@ int kill_console(nssm_service_t *, kill_t *);
 int kill_console(kill_t *);\r
 int kill_process(nssm_service_t *, kill_t *);\r
 int kill_process(kill_t *);\r
-void kill_process_tree(nssm_service_t *, kill_t *, unsigned long);\r
+int print_process(nssm_service_t *, kill_t *);\r
+int print_process(kill_t *);\r
+void walk_process_tree(nssm_service_t *, walk_function_t, kill_t *, unsigned long);\r
 void kill_process_tree(kill_t *, unsigned long);\r
 \r
 #endif\r