메소드 | 설명 | |
---|---|---|
GetAllServices ( ) : Opc.Ua.Configuration.Service[] |
Gets all installed Windows services.
|
|
GetNumberOfLogicalProcessors ( ) : int |
Gets the number of logical processors on the system.
|
|
GetNumberOfProcessors ( ) : int |
Gets the number of physical processors on the system.
|
|
GetService ( string serviceName ) : |
Gets the Service with the given name.
|
|
GetServiceProcessorAffinity ( string serviceName ) : bool[] |
Gets the affinity for the service with the given name. If the system has 2 processor and the service is running on processor 2 the affinity bit mask will be : [true][false] If the system has 2 processor and the service is running on both processors the affinity bit mask will be : [true][true] |
|
GetServiceStartMode ( string serviceName ) : StartMode |
Gets the start mode of the service with the given name.
|
|
GetServiceStatus ( string serviceName ) : ServiceStatus |
Gets the status of the service with the given name.
|
|
IsServicePaused ( string serviceName ) : bool |
Determine whther the service with the given name is paused.
|
|
IsServiceRunning ( string serviceName ) : bool |
Determine whther the service with the given name is running.
|
|
IsServiceStopped ( string serviceName ) : bool |
Determine whther the service with the given name is stopped.
|
|
PauseService ( string serviceName ) : bool |
Pause the service with the given name. This method returns as soon as the Pause method on the service is called and does not guarantee the paused status of the service.
|
|
PauseService ( string serviceName, System.TimeSpan timeout ) : bool |
Pause the service with the given name and wait until the service status is paused. If the service status is not paused after the given timeout then the service is considered not paused.
|
|
ServiceExists ( string serviceName ) : bool |
Gets a value whteher the service with the given name is installed.
|
|
SetServiceProcessorAffinity ( string serviceName, bool affinity ) : bool |
Set the processor affinity for the service with the given name. If the system has 2 processor and the service is running on processor 2 the affinity bit mask will be : [true][false] If the system has 2 processor and the service is running on both processors the affinity bit mask will be : [true][true] |
|
SetServiceStartMode ( string serviceName, StartMode startMode, uint &retValue ) : bool |
Modifies the start mode of a Windows service.
|
|
StartService ( string serviceName ) : bool |
Start the service with the given name. This method returns as soon as the Start method on the service is called and does not guarantee the running status of the service. You can call this method after stop or pause the service in order to re-start it.
|
|
StartService ( string serviceName, System.TimeSpan timeout ) : bool |
Start the service with the given name and wait until the status of the service is running. If the service status is not running after the given timeout then the service is considered not started. You can call this method after stop or pause the service in order to re-start it.
|
|
StopService ( string serviceName ) : bool |
Stop the service with the given name. This method returns as soon as the Stop method on the service is called and does not guarantee the stopped status of the service.
|
|
StopService ( string serviceName, System.TimeSpan timeout ) : bool |
Stop the service with the given name and wait until the service status is stopped. If the service status is not stopped after the given timeout then the service is considered not stopped.
|
메소드 | 설명 | |
---|---|---|
ConvertServiceControllerStatusToServiceStatus ( ServiceControllerStatus status ) : ServiceStatus | ||
ConvertStartModeToString ( StartMode startMode ) : string | ||
ConvertStringToServiceStatus ( string status ) : ServiceStatus | ||
ConvertStringToStartMode ( string startMode ) : StartMode | ||
GetComputerSystem ( ) : System.Management.ManagementObject | ||
GetProcessorAffinity ( int processId ) : bool[] |
Gets the processor affinity for the process with the given id.
|
|
ServiceFromManagementObject ( System.Management.ManagementBaseObject service ) : |
public static GetAllServices ( ) : Opc.Ua.Configuration.Service[] | ||
리턴 | Opc.Ua.Configuration.Service[] |
public static GetNumberOfLogicalProcessors ( ) : int | ||
리턴 | int |
public static GetService ( string serviceName ) : |
||
serviceName | string | The service name. |
리턴 |
public static GetServiceProcessorAffinity ( string serviceName ) : bool[] | ||
serviceName | string | the service name. |
리턴 | bool[] |
public static GetServiceStartMode ( string serviceName ) : StartMode | ||
serviceName | string | The service name. |
리턴 | StartMode |
public static GetServiceStatus ( string serviceName ) : ServiceStatus | ||
serviceName | string | The name of the service. |
리턴 | ServiceStatus |
public static IsServicePaused ( string serviceName ) : bool | ||
serviceName | string | The name of the service. |
리턴 | bool |
public static IsServiceRunning ( string serviceName ) : bool | ||
serviceName | string | The name of the service. |
리턴 | bool |
public static IsServiceStopped ( string serviceName ) : bool | ||
serviceName | string | The name of the service. |
리턴 | bool |
public static PauseService ( string serviceName ) : bool | ||
serviceName | string | The name of the service |
리턴 | bool |
public static PauseService ( string serviceName, System.TimeSpan timeout ) : bool | ||
serviceName | string | The name of the service |
timeout | System.TimeSpan | The timeout. |
리턴 | bool |
public static ServiceExists ( string serviceName ) : bool | ||
serviceName | string | The service name. |
리턴 | bool |
public static SetServiceProcessorAffinity ( string serviceName, bool affinity ) : bool | ||
serviceName | string | the service name. |
affinity | bool | The affinity bitmask. |
리턴 | bool |
public static SetServiceStartMode ( string serviceName, StartMode startMode, uint &retValue ) : bool | ||
serviceName | string | The service name. |
startMode | StartMode | The new start mode. |
retValue | uint | The return value. /// Return value Description: /// 0 Success /// 1 Not Supported /// 2 Access Denied /// 3 Dependent Services Running /// 4 Invalid Service Control /// 5 Service Cannot Accept Control /// 6 Service Not Active /// 7 ervice Request Timeout /// 8 Unknown Failure /// 9 Path Not Found /// 10 Service Already Running /// 11 Service Database Locked /// 12 Service Dependency Deleted /// 13 Service Dependency Failure /// 14 Service Disabled /// 15 Service Logon Failure /// 16 Service Marked For Deletion /// 17 Service No Thread /// 18 Status Circular Dependency /// 19 Status Duplicate Name /// 20 Status Invalid Name /// 21 Status Invalid Parameter /// 22 Status Invalid Service Account /// 23 Status Service Exists /// 24 Service Already Paused /// |
리턴 | bool |
public static StartService ( string serviceName ) : bool | ||
serviceName | string | The name of the service |
리턴 | bool |
public static StartService ( string serviceName, System.TimeSpan timeout ) : bool | ||
serviceName | string | The name of the service |
timeout | System.TimeSpan | The timeout. |
리턴 | bool |
public static StopService ( string serviceName ) : bool | ||
serviceName | string | The name of the service |
리턴 | bool |
public static StopService ( string serviceName, System.TimeSpan timeout ) : bool | ||
serviceName | string | The name of the service |
timeout | System.TimeSpan | The timeout. |
리턴 | bool |