public static extern unsafe bool ChangeServiceConfig( IntPtr serviceHandle, SC_SERVICE_TYPE ServiceType = SC_SERVICE_TYPE.SERVICE_NO_CHANGE, SC_START_TYPE StartType = SC_START_TYPE.SERVICE_NO_CHANGE, SC_ERROR_CONTROL ErrorControl = SC_ERROR_CONTROL.SERVICE_NO_CHANGE, string BinaryPathName = null, string LoadOrderGroup = null, string TagId = null, string Dependencies = null, string ServiceStartName = null, string Password = null, string DisplayName = null);
private static extern IntPtr CreateService(IntPtr hSCManager, string lpServiceName, string lpDisplayName, SC_MANAGER_ACCESS dwDesiredAccess, SC_SERVICE_TYPE dwServiceType, SC_START_TYPE dwStartType, SC_ERROR_CONTROL dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, IntPtr lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword );
public static string Localized(SC_ERROR_CONTROL ec) { switch (ec) { case SC_ERROR_CONTROL.SERVICE_ERROR_NORMAL: return(pserv4.Properties.Resources.SERVICE_ERROR_NORMAL); case SC_ERROR_CONTROL.SERVICE_ERROR_SEVERE: return(pserv4.Properties.Resources.SERVICE_ERROR_SEVERE); case SC_ERROR_CONTROL.SERVICE_ERROR_IGNORE: return(pserv4.Properties.Resources.SERVICE_ERROR_IGNORE); case SC_ERROR_CONTROL.SERVICE_ERROR_CRITICAL: return(pserv4.Properties.Resources.SERVICE_ERROR_CRITICAL); default: return(ec.ToString()); } }
public static string Localized(SC_ERROR_CONTROL ec) { switch (ec) { case SC_ERROR_CONTROL.SERVICE_ERROR_NORMAL: return pserv4.Properties.Resources.SERVICE_ERROR_NORMAL; case SC_ERROR_CONTROL.SERVICE_ERROR_SEVERE: return pserv4.Properties.Resources.SERVICE_ERROR_SEVERE; case SC_ERROR_CONTROL.SERVICE_ERROR_IGNORE: return pserv4.Properties.Resources.SERVICE_ERROR_IGNORE; case SC_ERROR_CONTROL.SERVICE_ERROR_CRITICAL: return pserv4.Properties.Resources.SERVICE_ERROR_CRITICAL; default: return ec.ToString(); } }
public static unsafe extern bool ChangeServiceConfig( IntPtr serviceHandle, SC_SERVICE_TYPE ServiceType = SC_SERVICE_TYPE.SERVICE_NO_CHANGE, SC_START_TYPE StartType = SC_START_TYPE.SERVICE_NO_CHANGE, SC_ERROR_CONTROL ErrorControl = SC_ERROR_CONTROL.SERVICE_NO_CHANGE, string BinaryPathName = null, string LoadOrderGroup = null, string TagId = null, string Dependencies = null, string ServiceStartName = null, string Password = null, string DisplayName = null);
internal static string DescribeErrorControl(SC_ERROR_CONTROL s) { switch (s) { case SC_ERROR_CONTROL.SERVICE_ERROR_CRITICAL: return IDS.SERVICE_ERROR_CRITICAL; case SC_ERROR_CONTROL.SERVICE_ERROR_IGNORE: return IDS.SERVICE_ERROR_IGNORE; case SC_ERROR_CONTROL.SERVICE_ERROR_NORMAL: return IDS.SERVICE_ERROR_NORMAL; case SC_ERROR_CONTROL.SERVICE_ERROR_SEVERE: return IDS.SERVICE_ERROR_SEVERE; } return s.ToString(); }
public static unsafe extern bool ChangeServiceConfig( IntPtr serviceHandle, SC_SERVICE_TYPE ServiceType, SC_START_TYPE StartType, SC_ERROR_CONTROL ErrorControl, string BinaryPathName, string LoadOrderGroup, string TagId, string Dependencies, string ServiceStartName, string Password, string DisplayName);