service.h 827 B

123456789101112131415161718192021222324
  1. #ifndef SERVICE_H
  2. #define SERVICE_H
  3. #define ACTION_LEN 16
  4. void WINAPI service_main(unsigned long, char **);
  5. char *service_control_text(unsigned long);
  6. void log_service_control(char *, unsigned long, bool);
  7. unsigned long WINAPI service_control_handler(unsigned long, unsigned long, void *, void *);
  8. SC_HANDLE open_service_manager();
  9. int pre_install_service(int, char **);
  10. int pre_remove_service(int, char **);
  11. int install_service(char *, char *, char *);
  12. int remove_service(char *);
  13. void set_service_recovery(SC_HANDLE, char *);
  14. int monitor_service();
  15. int start_service();
  16. int stop_service(unsigned long, bool, bool);
  17. void CALLBACK end_service(void *, unsigned char);
  18. void throttle_restart();
  19. int await_shutdown(char *, char *, SERVICE_STATUS_HANDLE, SERVICE_STATUS *, HANDLE, unsigned long);
  20. #endif