Module: wine Branch: master Commit: 746948551a1e49c9d5eb00ef3e7a29c077e5e695 URL: http://source.winehq.org/git/wine.git/?a=commit;h=746948551a1e49c9d5eb00ef3e...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Jan 27 11:27:45 2009 +0100
services: Add stub implementation for SERVICE_CONFIG_FAILURE_ACTIONS in ChangeServiceConfig2W.
---
include/wine/svcctl.idl | 29 ++++++++++++++++++++++++++++- programs/services/rpc.c | 7 ++++++- 2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/include/wine/svcctl.idl b/include/wine/svcctl.idl index 36bf476..1e9aae2 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 cbb825e..9fd66a2 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;