Click or drag to resize
Xcalibur Systems LLC Logo

ServiceHelperOpenService Method

Opens an existing service.

OpenService function


Namespace: Xcalibur.NativeMethods.V2.Services
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static IntPtr OpenService(
	IntPtr managerHandle,
	string serviceName,
	uint desiredAccess
)

Parameters

managerHandle  IntPtr
A handle to the service control manager database. The function returns this handle.
serviceName  String
The name of the service to be opened. This is the name specified by the serviceName parameter of the function when the service object was created, not the service display name that is shown by user interface applications to identify the service. The maximum string length is 256 characters.The service control manager database preserves the case of the characters, but service name comparisons are always case insensitive. Forward-slash(/) and backslash(\) are invalid service name characters.
desiredAccess  UInt32
The access to the service.

Return Value

IntPtr
See Also