return set_number(key, value, number);\r
}\r
\r
+int delete_createfile_parameter(HKEY key, TCHAR *prefix, TCHAR *suffix) {\r
+ TCHAR value[NSSM_STDIO_LENGTH];\r
+\r
+ if (_sntprintf_s(value, _countof(value), _TRUNCATE, _T("%s%s"), prefix, suffix) < 0) {\r
+ log_event(EVENTLOG_ERROR_TYPE, NSSM_EVENT_OUT_OF_MEMORY, suffix, _T("delete_createfile_parameter()"), 0);\r
+ return 1;\r
+ }\r
+\r
+ if (RegDeleteValue(key, value)) return 0;\r
+ return 1;\r
+}\r
+\r
HANDLE append_to_file(TCHAR *path, unsigned long sharing, SECURITY_ATTRIBUTES *attributes, unsigned long disposition, unsigned long flags) {\r
HANDLE ret;\r
\r
\r
int get_createfile_parameters(HKEY, TCHAR *, TCHAR *, unsigned long *, unsigned long, unsigned long *, unsigned long, unsigned long *, unsigned long);\r
int set_createfile_parameter(HKEY, TCHAR *, TCHAR *, unsigned long);\r
+int delete_createfile_parameter(HKEY, TCHAR *, TCHAR *);\r
HANDLE append_to_file(TCHAR *, unsigned long, SECURITY_ATTRIBUTES *, unsigned long, unsigned long);\r
void rotate_file(TCHAR *, TCHAR *, unsigned long, unsigned long, unsigned long);\r
int get_output_handles(nssm_service_t *, HKEY, STARTUPINFO *);\r