Added mandatory restart delay.
[nssm.git] / registry.h
1 #ifndef REGISTRY_H\r
2 #define REGISTRY_H\r
3 \r
4 #define NSSM_REGISTRY _T("SYSTEM\\CurrentControlSet\\Services\\%s\\Parameters")\r
5 #define NSSM_REG_EXE _T("Application")\r
6 #define NSSM_REG_FLAGS _T("AppParameters")\r
7 #define NSSM_REG_DIR _T("AppDirectory")\r
8 #define NSSM_REG_ENV _T("AppEnvironment")\r
9 #define NSSM_REG_ENV_EXTRA _T("AppEnvironmentExtra")\r
10 #define NSSM_REG_EXIT _T("AppExit")\r
11 #define NSSM_REG_RESTART_DELAY _T("AppRestartDelay")\r
12 #define NSSM_REG_THROTTLE _T("AppThrottle")\r
13 #define NSSM_REG_STOP_METHOD_SKIP _T("AppStopMethodSkip")\r
14 #define NSSM_REG_KILL_CONSOLE_GRACE_PERIOD _T("AppStopMethodConsole")\r
15 #define NSSM_REG_KILL_WINDOW_GRACE_PERIOD _T("AppStopMethodWindow")\r
16 #define NSSM_REG_KILL_THREADS_GRACE_PERIOD _T("AppStopMethodThreads")\r
17 #define NSSM_REG_STDIN _T("AppStdin")\r
18 #define NSSM_REG_STDOUT _T("AppStdout")\r
19 #define NSSM_REG_STDERR _T("AppStderr")\r
20 #define NSSM_REG_STDIO_SHARING _T("ShareMode")\r
21 #define NSSM_REG_STDIO_DISPOSITION _T("CreationDisposition")\r
22 #define NSSM_REG_STDIO_FLAGS _T("FlagsAndAttributes")\r
23 #define NSSM_REG_ROTATE _T("AppRotateFiles")\r
24 #define NSSM_REG_ROTATE_SECONDS _T("AppRotateSeconds")\r
25 #define NSSM_REG_ROTATE_BYTES_LOW _T("AppRotateBytes")\r
26 #define NSSM_REG_ROTATE_BYTES_HIGH _T("AppRotateBytesHigh")\r
27 #define NSSM_REG_PRIORITY _T("AppPriority")\r
28 #define NSSM_REG_AFFINITY _T("AppAffinity")\r
29 #define NSSM_STDIO_LENGTH 29\r
30 \r
31 HKEY open_registry(const TCHAR *, const TCHAR *, REGSAM sam);\r
32 HKEY open_registry(const TCHAR *, REGSAM sam);\r
33 int create_messages();\r
34 int create_parameters(nssm_service_t *, bool);\r
35 int create_exit_action(TCHAR *, const TCHAR *, bool);\r
36 int set_environment(TCHAR *, HKEY, TCHAR *, TCHAR **, unsigned long *);\r
37 int format_environment(TCHAR *, unsigned long, TCHAR **, unsigned long *);\r
38 int unformat_environment(TCHAR *, unsigned long, TCHAR **, unsigned long *);\r
39 int expand_parameter(HKEY, TCHAR *, TCHAR *, unsigned long, bool, bool);\r
40 int expand_parameter(HKEY, TCHAR *, TCHAR *, unsigned long, bool);\r
41 int set_expand_string(HKEY, TCHAR *, TCHAR *);\r
42 int set_number(HKEY, TCHAR *, unsigned long);\r
43 int get_number(HKEY, TCHAR *, unsigned long *, bool);\r
44 int get_number(HKEY, TCHAR *, unsigned long *);\r
45 void override_milliseconds(TCHAR *, HKEY, TCHAR *, unsigned long *, unsigned long, unsigned long);\r
46 int get_parameters(nssm_service_t *, STARTUPINFO *);\r
47 int get_exit_action(const TCHAR *, unsigned long *, TCHAR *, bool *);\r
48 \r
49 #endif\r