|
ServiceHelperStartService Method |
Namespace: Xcalibur.NativeMethods.V2.ServicesAssembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax [DllImportAttribute("advapi32", SetLastError = true)]
public static bool StartService(
IntPtr serviceHandle,
int serviceArgsCount,
string[] serviceArgVectors
)
<DllImportAttribute("advapi32", SetLastError := true>]
Public Shared Function StartService (
serviceHandle As IntPtr,
serviceArgsCount As Integer,
serviceArgVectors As String()
) As Boolean
public:
[DllImportAttribute(L"advapi32", SetLastError = true)]
static bool StartService(
IntPtr serviceHandle,
int serviceArgsCount,
array<String^>^ serviceArgVectors
)
[<DllImportAttribute("advapi32", SetLastError = true)>]
static member StartService :
serviceHandle : IntPtr *
serviceArgsCount : int *
serviceArgVectors : string[] -> bool
Parameters
- serviceHandle IntPtr
- A handle to the service. This handle is returned by the
or function, and it must have
the access right.
- serviceArgsCount Int32
- The number of strings in the serviceArgVectors array. If
serviceArgVectors is NULL, this parameter can be zero.
- serviceArgVectors String
- The null-terminated strings to be passed to the ServiceMain
function for the service as arguments. If there are no arguments, this parameter can be
NULL. Otherwise, the first argument (serviceArgVectors[0]) is the name of the service,
followed by any additional arguments (serviceArgVectors[1] through
lpServiceArgVectors[dwNumServiceArgs-1]).
Driver services do not receive these arguments.
Return Value
BooleanSee Also Reference
CreateService(IntPtr, String, String, UInt32, ServiceTypes, ServiceStartTypes, ServiceErrors, String, String, String, String, String, String)