X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=service.h;h=8549fee726c1ef976d41410b325f61f3090feb63;hb=143238dfe314c16bc90a6807ab0f00220efd34a2;hp=29c237e2a0729137099b1d7a69f2d5b7a1f2fac4;hpb=9cf66b86846f97f0bd2efdfe2b8bd36ea0b00499;p=nssm.git diff --git a/service.h b/service.h index 29c237e..8549fee 100644 --- a/service.h +++ b/service.h @@ -44,9 +44,11 @@ typedef struct { TCHAR flags[VALUE_LENGTH]; TCHAR dir[MAX_PATH]; TCHAR *env; + __int64 affinity; unsigned long envlen; TCHAR *env_extra; unsigned long env_extralen; + unsigned long priority; TCHAR stdin_path[MAX_PATH]; unsigned long stdin_sharing; unsigned long stdin_disposition; @@ -55,15 +57,24 @@ typedef struct { unsigned long stdout_sharing; unsigned long stdout_disposition; unsigned long stdout_flags; + HANDLE stdout_pipe; + HANDLE stdout_thread; + unsigned long stdout_tid; TCHAR stderr_path[MAX_PATH]; unsigned long stderr_sharing; unsigned long stderr_disposition; unsigned long stderr_flags; + HANDLE stderr_pipe; + HANDLE stderr_thread; + unsigned long stderr_tid; bool rotate_files; + bool rotate_stdout_online; + bool rotate_stderr_online; unsigned long rotate_seconds; unsigned long rotate_bytes_low; unsigned long rotate_bytes_high; unsigned long default_exit_action; + unsigned long restart_delay; unsigned long throttle_delay; unsigned long stop_method; unsigned long kill_console_delay; @@ -92,10 +103,17 @@ TCHAR *service_control_text(unsigned long); void log_service_control(TCHAR *, unsigned long, bool); unsigned long WINAPI service_control_handler(unsigned long, unsigned long, void *, void *); +int affinity_mask_to_string(__int64, TCHAR **); +int affinity_string_to_mask(TCHAR *, __int64 *); +unsigned long priority_mask(); +int priority_constant_to_index(unsigned long); +unsigned long priority_index_to_constant(int); + nssm_service_t *alloc_nssm_service(); void set_nssm_service_defaults(nssm_service_t *); void cleanup_nssm_service(nssm_service_t *); SC_HANDLE open_service_manager(); +SC_HANDLE open_service(SC_HANDLE, TCHAR *, TCHAR *, unsigned long); QUERY_SERVICE_CONFIG *query_service_config(const TCHAR *, SC_HANDLE); int set_service_description(const TCHAR *, SC_HANDLE, TCHAR *); int get_service_description(const TCHAR *, SC_HANDLE, unsigned long, TCHAR *);