56 SC_HANDLE manager, service =
NULL;
98 hr = IWbemClassObject_SpawnInstance( sig, 0, &
out_params );
102 IWbemClassObject_Release( sig );
107 if (
hr !=
S_OK)
goto done;
114 IWbemClassObject_Release( sig );
143 hr = IWbemClassObject_SpawnInstance( sig, 0, &
out_params );
147 IWbemClassObject_Release( sig );
152 if (
hr !=
S_OK)
goto done;
159 IWbemClassObject_Release( sig );
171 SC_HANDLE manager, service =
NULL;
212 hr = IWbemClassObject_SpawnInstance( sig, 0, &
out_params );
216 IWbemClassObject_Release( sig );
221 if (
hr !=
S_OK)
goto done;
228 IWbemClassObject_Release( sig );
257 hr = IWbemClassObject_SpawnInstance( sig, 0, &
out_params );
261 IWbemClassObject_Release( sig );
266 if (
hr !=
S_OK)
goto done;
273 IWbemClassObject_Release( sig );
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define ERROR_ACCESS_DENIED
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
void set_variant(VARTYPE type, LONGLONG val, void *val_ptr, VARIANT *ret)
HRESULT service_stop_service(IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out)
static HRESULT control_service(const WCHAR *name, DWORD control, VARIANT *retval)
HRESULT service_pause_service(IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out)
HRESULT service_resume_service(IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out)
HRESULT service_start_service(IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out)
static UINT map_error(DWORD error)
static HRESULT start_service(const WCHAR *name, VARIANT *retval)
static void out_params(void)
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
BOOL WINAPI ControlService(SC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus)
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCWSTR *lpServiceArgVectors)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
static const WCHAR class_serviceW[]
static const WCHAR method_pauseserviceW[]
static const WCHAR method_startserviceW[]
static const WCHAR method_resumeserviceW[]
static const WCHAR param_returnvalueW[]
static const WCHAR prop_nameW[]
static const WCHAR method_stopserviceW[]
DWORD WINAPI GetLastError(void)
#define ERROR_SERVICE_ALREADY_RUNNING
#define ERROR_SERVICE_NOT_ACTIVE
#define ERROR_DEPENDENT_SERVICES_RUNNING
#define ERROR_SERVICE_REQUEST_TIMEOUT
#define ERROR_INVALID_SERVICE_CONTROL
#define ERROR_SERVICE_CANNOT_ACCEPT_CTRL
#define SC_MANAGER_ENUMERATE_SERVICE
#define SERVICE_PAUSE_CONTINUE
#define SERVICE_CONTROL_CONTINUE
#define SERVICE_CONTROL_STOP
#define SERVICE_CONTROL_PAUSE