X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=registry.h;h=25ba0917798b06509cc32f768b6d1340ab2ca0b3;hb=62f28c55d444d846579159133dbe091809a2c08b;hp=3e380b4ef4a22f665f5b1450ae35d0385e94341c;hpb=a90eade7d022451e92bedcebe816651df7bf0d17;p=nssm.git diff --git a/registry.h b/registry.h index 3e380b4..25ba091 100644 --- a/registry.h +++ b/registry.h @@ -1,7 +1,8 @@ #ifndef REGISTRY_H #define REGISTRY_H -#define NSSM_REGISTRY _T("SYSTEM\\CurrentControlSet\\Services\\%s\\Parameters") +#define NSSM_REGISTRY _T("SYSTEM\\CurrentControlSet\\Services\\%s") +#define NSSM_REG_PARAMETERS _T("Parameters") #define NSSM_REGISTRY_GROUPS _T("SYSTEM\\CurrentControlSet\\Control\\ServiceGroupOrder") #define NSSM_REG_GROUPS _T("List") #define NSSM_REG_EXE _T("Application") @@ -24,20 +25,26 @@ #define NSSM_REG_STDIO_DISPOSITION _T("CreationDisposition") #define NSSM_REG_STDIO_FLAGS _T("FlagsAndAttributes") #define NSSM_REG_STDIO_COPY_AND_TRUNCATE _T("CopyAndTruncate") +#define NSSM_REG_HOOK_SHARE_OUTPUT_HANDLES _T("AppRedirectHook") #define NSSM_REG_ROTATE _T("AppRotateFiles") #define NSSM_REG_ROTATE_ONLINE _T("AppRotateOnline") #define NSSM_REG_ROTATE_SECONDS _T("AppRotateSeconds") #define NSSM_REG_ROTATE_BYTES_LOW _T("AppRotateBytes") #define NSSM_REG_ROTATE_BYTES_HIGH _T("AppRotateBytesHigh") #define NSSM_REG_ROTATE_DELAY _T("AppRotateDelay") +#define NSSM_REG_TIMESTAMP_LOG _T("AppTimestampLog") #define NSSM_REG_PRIORITY _T("AppPriority") #define NSSM_REG_AFFINITY _T("AppAffinity") #define NSSM_REG_NO_CONSOLE _T("AppNoConsole") +#define NSSM_REG_HOOK _T("AppEvents") #define NSSM_STDIO_LENGTH 29 +HKEY open_service_registry(const TCHAR *, REGSAM sam, bool); +long open_registry(const TCHAR *, const TCHAR *, REGSAM sam, HKEY *, bool); HKEY open_registry(const TCHAR *, const TCHAR *, REGSAM sam, bool); HKEY open_registry(const TCHAR *, const TCHAR *, REGSAM sam); HKEY open_registry(const TCHAR *, REGSAM sam); +long enumerate_registry_values(HKEY, unsigned long *, TCHAR *, unsigned long); int create_messages(); int create_parameters(nssm_service_t *, bool); int create_exit_action(TCHAR *, const TCHAR *, bool); @@ -54,9 +61,14 @@ int get_number(HKEY, TCHAR *, unsigned long *, bool); int get_number(HKEY, TCHAR *, unsigned long *); int format_double_null(TCHAR *, unsigned long, TCHAR **, unsigned long *); int unformat_double_null(TCHAR *, unsigned long, TCHAR **, unsigned long *); +int copy_double_null(TCHAR *, unsigned long, TCHAR **); +int append_to_double_null(TCHAR *, unsigned long, TCHAR **, unsigned long *, TCHAR *, size_t, bool); +int remove_from_double_null(TCHAR *, unsigned long, TCHAR **, unsigned long *, TCHAR *, size_t, bool); void override_milliseconds(TCHAR *, HKEY, TCHAR *, unsigned long *, unsigned long, unsigned long); int get_io_parameters(nssm_service_t *, HKEY); int get_parameters(nssm_service_t *, STARTUPINFO *); int get_exit_action(const TCHAR *, unsigned long *, TCHAR *, bool *); +int set_hook(const TCHAR *, const TCHAR *, const TCHAR *, TCHAR *); +int get_hook(const TCHAR *, const TCHAR *, const TCHAR *, TCHAR *, unsigned long); #endif