@@ -62,23 +62,23 @@ def openscmanagerw(rhost, access = SC_MANAGER_ALL_ACCESS)
62
62
# Calls CreateServiceW() to create a system service. Returns a handle to
63
63
# the service on success, or nil.
64
64
#
65
- # @param scm_handle [String] the SCM handle (from dce_openscmanagerw() ).
65
+ # @param scm_handle [String] the SCM handle (from {#openscmanagerw} ).
66
66
# @param service_name [String] the service name.
67
67
# @param display_name [String] the display name.
68
68
# @param binary_path [String] the path of the binary to run.
69
- # @param opts [Hash] a hash containing the following keys and values:
70
- # access [Fixnum] the access level (default is maximum) .
71
- # type [Fixnum] the type of service (default is interactive,
72
- # own process) .
73
- # start [Fixnum] the start options (default is on demand) .
74
- # errors [Fixnum] the error options (default is ignore) .
75
- # load_order_group [Fixnum] the load order group.
76
- # dependencies [Fixnum] the dependencies of the service.
77
- # service_start [Fixnum]
78
- # password1 [Fixnum]
79
- # password2 [Fixnum]
80
- # password3 [Fixnum]
81
- # password4 [Fixnum]
69
+ # @param opts [Hash] arguments for CreateServiceW()
70
+ # @option opts [Fixnum] : access (SERVICE_ALL_ACCESS) the access level .
71
+ # @option opts [Fixnum] : type (SERVICE_WIN32_OWN_PROCESS ||
72
+ # SERVICE_INTERACTIVE_PROCESS) the type of service .
73
+ # @option opts [Fixnum] : start (SERVICE_DEMAND_START) the start options .
74
+ # @option opts [Fixnum] :errors (SERVICE_ERROR_IGNORE) the error options.
75
+ # @option opts [Fixnum] :load_order_group (0) the load order group.
76
+ # @option opts [Fixnum] :dependencies (0) the dependencies of the service.
77
+ # @option opts [Fixnum] :service_start (0)
78
+ # @option opts [Fixnum] :password1 (0)
79
+ # @option opts [Fixnum] :password2 (0)
80
+ # @option opts [Fixnum] :password3 (0)
81
+ # @option opts [Fixnum] :password4 (0)
82
82
#
83
83
# @return [String, Integer] a handle to the created service, windows
84
84
# error code.
@@ -177,7 +177,7 @@ def closehandle(handle)
177
177
178
178
# Calls OpenServiceW to obtain a handle to an existing service.
179
179
#
180
- # @param scm_handle [String] the SCM handle (from dce_openscmanagerw() ).
180
+ # @param scm_handle [String] the SCM handle (from {#openscmanagerw} ).
181
181
# @param service_name [String] the name of the service to open.
182
182
# @param access [Fixnum] the level of access requested (default is maximum).
183
183
#
@@ -204,8 +204,7 @@ def openservicew(scm_handle, service_name, access = SERVICE_ALL_ACCESS)
204
204
# Calls StartService() on a handle to an existing service in order to start
205
205
# it. Returns true on success, or false.
206
206
#
207
- # @param svc_handle [String] the handle of the service to start (from
208
- # dce_openservicew()).
207
+ # @param svc_handle [String] the handle of the service (from {#openservicew}).
209
208
# @param magic1 [Fixnum] an unknown value.
210
209
# @param magic2 [Fixnum] another unknown value.
211
210
#
@@ -228,8 +227,7 @@ def startservice(svc_handle, magic1 = 0, magic2 = 0)
228
227
229
228
# Stops a running service.
230
229
#
231
- # @param svc_handle [String] the handle of the service to stop (from
232
- # dce_openservicew()).
230
+ # @param svc_handle [String] the handle of the service (from {#openservicew}).
233
231
#
234
232
# @return [Integer] Windows error code
235
233
def stopservice ( svc_handle )
@@ -238,8 +236,7 @@ def stopservice(svc_handle)
238
236
239
237
# Controls an existing service.
240
238
#
241
- # @param svc_handle [String] the handle of the service to control
242
- # (from dce_openservicew()).
239
+ # @param svc_handle [String] the handle of the service (from {#openservicew}).
243
240
# @param operation [Fixnum] the operation number to perform (1 = stop
244
241
# service; others are unknown).
245
242
#
@@ -260,8 +257,7 @@ def controlservice(svc_handle, operation)
260
257
261
258
# Calls DeleteService() to delete a service.
262
259
#
263
- # @param svc_handle [String] the handle of the service to delete (from
264
- # dce_openservicew()).
260
+ # @param svc_handle [String] the handle of the service (from {#openservicew}).
265
261
#
266
262
# @return [Integer] Windows error code
267
263
def deleteservice ( svc_handle )
@@ -280,8 +276,7 @@ def deleteservice(svc_handle)
280
276
281
277
# Calls QueryServiceStatus() to query the status of a service.
282
278
#
283
- # @param svc_handle [String] the handle of the service to query (from
284
- # dce_openservicew()).
279
+ # @param svc_handle [String] the handle of the service (from {#openservicew}).
285
280
#
286
281
# @return [Fixnum] Returns 0 if the query failed (i.e.: a state was returned
287
282
# that isn't implemented), 1 if the service is running, and
0 commit comments