diff --git a/include/wine/svcctl.idl b/include/wine/svcctl.idl index 36bf476e04e..1e9aae25e58 100644 --- a/include/wine/svcctl.idl +++ b/include/wine/svcctl.idl @@ -94,13 +94,40 @@ typedef struct _SERVICE_DESCRIPTIONW { LPWSTR lpDescription; } SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW; -#define SERVICE_CONFIG_DESCRIPTION 1 +typedef enum _SC_ACTION_TYPE { + SC_ACTION_NONE = 0, + SC_ACTION_RESTART = 1, + SC_ACTION_REBOOT = 2, + SC_ACTION_RUN_COMMAND = 3 +} SC_ACTION_TYPE; + +typedef struct _SC_ACTION { + SC_ACTION_TYPE Type; + DWORD Delay; +} SC_ACTION,*LPSC_ACTION; + +typedef struct _SERVICE_FAILURE_ACTIONSW { + DWORD dwResetPeriod; + [unique] LPWSTR lpRebootMsg; + [unique] LPWSTR lpCommand; + DWORD cActions; + [size_is(cActions)] SC_ACTION *lpsaActions; +} SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW; + +#define SERVICE_CONFIG_DESCRIPTION 1 +#define SERVICE_CONFIG_FAILURE_ACTIONS 2 +#define SERVICE_CONFIG_DELAYED_AUTO_START_INFO 3 +#define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG 4 +#define SERVICE_CONFIG_SERVICE_SID_INFO 5 +#define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6 +#define SERVICE_CONFIG_PRESHUTDOWN_INFO 7 cpp_quote("#endif") typedef [switch_type(DWORD)] union { [case (SERVICE_CONFIG_DESCRIPTION)] SERVICE_DESCRIPTIONW descr; + [case (SERVICE_CONFIG_FAILURE_ACTIONS)] SERVICE_FAILURE_ACTIONSW actions; } SERVICE_CONFIG2W; /* Compatible with Windows function 0x00 */ diff --git a/programs/services/rpc.c b/programs/services/rpc.c index cbb825e2cc9..9fd66a23348 100644 --- a/programs/services/rpc.c +++ b/programs/services/rpc.c @@ -631,7 +631,12 @@ DWORD svcctl_ChangeServiceConfig2W( SC_RPC_HANDLE hService, DWORD level, SERVICE service_unlock( service->service_entry ); } break; - + case SERVICE_CONFIG_FAILURE_ACTIONS: + WINE_FIXME( "SERVICE_CONFIG_FAILURE_ACTIONS not implemented: period %u msg %s cmd %s\n", + config->actions.dwResetPeriod, + wine_dbgstr_w(config->actions.lpRebootMsg), + wine_dbgstr_w(config->actions.lpCommand) ); + break; default: WINE_FIXME("level %u not implemented\n", level); err = ERROR_INVALID_LEVEL;