X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=service.h;h=00428d0e170233288e561cc41d76d2a1d2834ed3;hb=6d0e20215772e976fcf364f16e005199d4f3b726;hp=2eb2b4209cf47bc175f729fd30e022a087f4a6f5;hpb=fa2f3fe4a81e6958717ae05f6d37af2da91bcd66;p=nssm.git diff --git a/service.h b/service.h index 2eb2b42..00428d0 100644 --- a/service.h +++ b/service.h @@ -1,8 +1,6 @@ #ifndef SERVICE_H #define SERVICE_H -#include - /* MSDN says the commandline in CreateProcess() is limited to 32768 characters and the application name to MAX_PATH. @@ -19,7 +17,6 @@ #define ACTION_LEN 16 -#define NSSM_LOCALSYSTEM_ACCOUNT _T("LocalSystem") #define NSSM_KERNEL_DRIVER _T("SERVICE_KERNEL_DRIVER") #define NSSM_FILE_SYSTEM_DRIVER _T("SERVICE_FILE_SYSTEM_DRIVER") #define NSSM_WIN32_OWN_PROCESS _T("SERVICE_WIN32_OWN_PROCESS") @@ -53,11 +50,11 @@ typedef struct { TCHAR *env_extra; unsigned long env_extralen; unsigned long priority; + unsigned long no_console; TCHAR stdin_path[PATH_LENGTH]; unsigned long stdin_sharing; unsigned long stdin_disposition; unsigned long stdin_flags; - HANDLE stdin_pipe; TCHAR stdout_path[PATH_LENGTH]; unsigned long stdout_sharing; unsigned long stdout_disposition; @@ -101,6 +98,7 @@ typedef struct { LARGE_INTEGER throttle_duetime; FILETIME creation_time; FILETIME exit_time; + TCHAR *initial_env; } nssm_service_t; void WINAPI service_main(unsigned long, TCHAR **); @@ -118,14 +116,13 @@ 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); +SC_HANDLE open_service_manager(unsigned long); +SC_HANDLE open_service(SC_HANDLE, TCHAR *, unsigned long, 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 *); int get_service_startup(const TCHAR *, SC_HANDLE, const QUERY_SERVICE_CONFIG *, unsigned long *); int get_service_username(const TCHAR *, const QUERY_SERVICE_CONFIG *, TCHAR **, size_t *); -int grant_logon_as_service(const TCHAR *); int pre_install_service(int, TCHAR **); int pre_remove_service(int, TCHAR **); int pre_edit_service(int, TCHAR **);