public static extern bool ControlService(SafeServiceHandle hService, uint control, out SERVICE_STATUS serviceStatus);
public static extern bool ChangeServiceConfig2(SafeServiceHandle handle, uint dwInfoLevel, IntPtr pInfo);
public static extern bool CloseServiceHandle(SafeServiceHandle handle);
public static unsafe extern bool ChangeServiceConfig2(SafeServiceHandle hService, ServiceInfoLevel dwInfoLevel, void* lpInfo);
public static extern bool ChangeServiceConfig(SafeServiceHandle handle, uint serviceType, SERVICE_START_TYPE startType, uint errorControl, string binaryPathName, string loadOrderGroup, IntPtr tagId, string dependencies, string serviceStartName, string password, string displayName);
public static extern bool QueryServiceConfig(SafeServiceHandle handle, IntPtr pBuffer, uint bufferSize, out uint bytesNeeded);
public static extern bool QueryServiceStatus(SafeServiceHandle handle, out SERVICE_STATUS serviceStatus);
public static extern bool QueryServiceObjectSecurity( SafeServiceHandle hService, SECURITY_INFORMATION dwSecurityInformation, byte[] lpSecurityDescriptor, int cbBufSize, out int pcbBytesNeeded);
public static extern bool QueryServiceStatus(SafeServiceHandle hService, ref SERVICE_STATUS dwServiceStatus);
public static extern SafeServiceHandle OpenService(SafeServiceHandle hSCManager, string lpServiceName, ACCESS_MASK dwDesiredAccess);
public static extern bool StartService(SafeServiceHandle hService, int dwNumServiceArgs, string lpServiceArgVectors);
public static extern bool DeleteService(SafeServiceHandle hService);
public static extern SafeServiceHandle CreateService(SafeServiceHandle hSCManager, string lpServiceName, string lpDisplayName, ACCESS_MASK dwDesiredAccess, ServiceType dwServiceType, ServiceStartType dwStartType, ServiceErrorControl dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, int lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword);
public static extern bool ControlService(SafeServiceHandle hService, ServiceControl dwControl, ref SERVICE_STATUS lpServiceStatus);
public static extern IntPtr LockServiceDatabase(SafeServiceHandle hSCManager);
public static extern bool SetServiceObjectSecurity( SafeServiceHandle hService, SECURITY_INFORMATION dwSecurityInformation, byte[] lpSecurityDescriptor);
public static extern SafeServiceHandle OpenService(SafeServiceHandle hSCManager, string serviceName, SERVICE_ACCESS_TYPE desiredAccess);
public static unsafe extern bool EnumServicesStatus( SafeServiceHandle hSCManager, ServiceType dwServiceType, ServiceStateQuery dwServiceState, byte* lpServices, int cbBufSize, ref int pcbBytesNeeded, ref int lpServicesReturned, ref int lpResumeHandle);
public static extern bool QueryServiceLockStatus(SafeServiceHandle hSCManager, IntPtr lpLockStatus, uint cbBufSize, out uint pcbBytesNeeded);
public static unsafe extern bool QueryServiceStatusEx( SafeServiceHandle hService, SC_STATUS_TYPE InfoLevel, void* lpBuffer, int cbBufSize, out int pcbBytesNeeded);
public static extern bool StartService(SafeServiceHandle hService, uint numArgs, string[] args);
public static extern bool ChangeServiceConfig( SafeServiceHandle hService, ServiceType dwServiceType, ServiceStartType dwStartType, ServiceErrorControl dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, int lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword, string lpDisplayName);