private static IntPtr OpenSCManager(ServiceManager.ServiceManagerRights rights) { Logger.Info("{0}", (object)MethodBase.GetCurrentMethod().Name); IntPtr num = ServiceManager.OpenSCManager((string)null, (string)null, rights); if (!(num == IntPtr.Zero)) { return(num); } throw new Exception("Could not connect to service control manager."); }
private static extern IntPtr OpenSCManager( string lpMachineName, string lpDatabaseName, ServiceManager.ServiceManagerRights dwDesiredAccess);