a service instance More...
#include <ServiceInstance.h>
Public Member Functions | |
ServiceInstance () | |
virtual | ~ServiceInstance () |
void | Open (const ServiceManager &scm, const std::wstring &name, DWORD access=SERVICE_ALL_ACCESS) |
open the service instance object More... | |
void | Create (const ServiceManager &scm, const ServiceCreateInfo &info) |
create a new service More... | |
void | Delete () |
delete the service More... | |
void | Close () |
close a previously opened service object More... | |
bool | IsOpen () const |
returns true if service is already open More... | |
SC_HANDLE | GetHandle () const |
return the service handle More... | |
void | GetServiceProcessStatus (LPSERVICE_STATUS_PROCESS) const |
return process information More... | |
void | Control (DWORD control) |
control a service More... | |
void | Stop () |
stop a service More... | |
void | Start () |
start a service More... | |
void | Restart () |
restart a service More... | |
void | Pause () |
pause a service More... | |
void | Continue () |
continue (resume) a service More... | |
DWORD | GetServiceState () const |
return the service state More... | |
bool | IsStarted () const |
returns true if the service is started More... | |
bool | IsStopped () const |
returns true if the service is stopped More... | |
bool | IsPaused () const |
returns true if the service is paused More... | |
bool | Wait (DWORD timeout=INFINITE) const |
wait for a transition to complete while the service is pausing, starting, stopping, etc. More... | |
ServiceConfig | GetConfig () const |
get service configuration More... | |
std::wstring | GetDescription () const |
get service description More... | |
a service instance
ServiceInstance::ServiceInstance | ( | ) |
|
virtual |
void ServiceInstance::Close | ( | ) |
close a previously opened service object
void ServiceInstance::Continue | ( | ) |
continue (resume) a service
void ServiceInstance::Control | ( | DWORD | control | ) |
control a service
void ServiceInstance::Create | ( | const ServiceManager & | scm, |
const ServiceCreateInfo & | info | ||
) |
create a new service
void ServiceInstance::Delete | ( | ) |
delete the service
ServiceConfig ServiceInstance::GetConfig | ( | ) | const |
get service configuration
std::wstring ServiceInstance::GetDescription | ( | ) | const |
get service description
|
inline |
return the service handle
void ServiceInstance::GetServiceProcessStatus | ( | LPSERVICE_STATUS_PROCESS | lp | ) | const |
return process information
DWORD ServiceInstance::GetServiceState | ( | ) | const |
return the service state
|
inline |
returns true if service is already open
|
inline |
returns true if the service is paused
|
inline |
returns true if the service is started
|
inline |
returns true if the service is stopped
void ServiceInstance::Open | ( | const ServiceManager & | scm, |
const std::wstring & | name, | ||
DWORD | access = SERVICE_ALL_ACCESS |
||
) |
open the service instance object
void ServiceInstance::Pause | ( | ) |
pause a service
void ServiceInstance::Restart | ( | ) |
restart a service
void ServiceInstance::Start | ( | ) |
start a service
void ServiceInstance::Stop | ( | ) |
stop a service
bool ServiceInstance::Wait | ( | DWORD | timeout = INFINITE | ) | const |
wait for a transition to complete while the service is pausing, starting, stopping, etc.
© Application Security Inc. - All Rights Reserved | http://msiext.codeplex.com |