public class W32Service extends Object
Modifier and Type | Field and Description |
---|---|
(package private) Winsvc.SC_HANDLE |
_handle |
Constructor and Description |
---|
W32Service(Winsvc.SC_HANDLE handle)
Win32 Service
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close service.
|
void |
continueService()
Continue service.
|
Winsvc.SC_HANDLE |
getHandle()
Gets the service handle.
|
void |
pauseService()
Pause service.
|
Winsvc.SERVICE_STATUS_PROCESS |
queryStatus()
Retrieves the current status of the specified service based on the specified information level.
|
void |
startService() |
void |
stopService()
Stop service.
|
void |
waitForNonPendingState()
Wait for the state to change to something other than a pending state.
|
Winsvc.SC_HANDLE _handle
public W32Service(Winsvc.SC_HANDLE handle)
handle
- A handle to the service. This handle is returned by the CreateService or OpenService
function, and it must have the SERVICE_QUERY_STATUS access right.public void close()
public Winsvc.SERVICE_STATUS_PROCESS queryStatus()
public void startService()
public void stopService()
public void continueService()
public void pauseService()
public void waitForNonPendingState()
public Winsvc.SC_HANDLE getHandle()