registry.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef REGISTRY_H
  2. #define REGISTRY_H
  3. #define NSSM_REGISTRY "SYSTEM\\CurrentControlSet\\Services\\%s\\Parameters"
  4. #define NSSM_REG_EXE "Application"
  5. #define NSSM_REG_FLAGS "AppParameters"
  6. #define NSSM_REG_DIR "AppDirectory"
  7. #define NSSM_REG_ENV "AppEnvironment"
  8. #define NSSM_REG_ENV_EXTRA "AppEnvironmentExtra"
  9. #define NSSM_REG_EXIT "AppExit"
  10. #define NSSM_REG_THROTTLE "AppThrottle"
  11. #define NSSM_REG_STOP_METHOD_SKIP "AppStopMethodSkip"
  12. #define NSSM_REG_KILL_CONSOLE_GRACE_PERIOD "AppStopMethodConsole"
  13. #define NSSM_REG_KILL_WINDOW_GRACE_PERIOD "AppStopMethodWindow"
  14. #define NSSM_REG_KILL_THREADS_GRACE_PERIOD "AppStopMethodThreads"
  15. #define NSSM_REG_STDIN "AppStdin"
  16. #define NSSM_REG_STDOUT "AppStdout"
  17. #define NSSM_REG_STDERR "AppStderr"
  18. #define NSSM_REG_STDIO_SHARING "ShareMode"
  19. #define NSSM_REG_STDIO_DISPOSITION "CreationDisposition"
  20. #define NSSM_REG_STDIO_FLAGS "FlagsAndAttributes"
  21. #define NSSM_STDIO_LENGTH 29
  22. int create_messages();
  23. int create_parameters(nssm_service_t *);
  24. int create_exit_action(char *, const char *);
  25. int set_environment(char *, HKEY, char *, char **, unsigned long *);
  26. int expand_parameter(HKEY, char *, char *, unsigned long, bool, bool);
  27. int expand_parameter(HKEY, char *, char *, unsigned long, bool);
  28. int set_expand_string(HKEY, char *, char *);
  29. int set_number(HKEY, char *, unsigned long);
  30. int get_number(HKEY, char *, unsigned long *, bool);
  31. int get_number(HKEY, char *, unsigned long *);
  32. void override_milliseconds(char *, HKEY, char *, unsigned long *, unsigned long, unsigned long);
  33. int get_parameters(nssm_service_t *, STARTUPINFO *);
  34. int get_exit_action(char *, unsigned long *, unsigned char *, bool *);
  35. #endif