Public Member Functions | List of all members
AppSecInc::Service::ServiceInstance Class Reference

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...
 
std::wstring GetServiceStateString ()
 return string presentation of 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...
 

Detailed Description

a service instance

Constructor & Destructor Documentation

ServiceInstance::ServiceInstance ( )
ServiceInstance::~ServiceInstance ( )
virtual

Member Function Documentation

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

SC_HANDLE AppSecInc::Service::ServiceInstance::GetHandle ( ) const
inline

return the service handle

void ServiceInstance::GetServiceProcessStatus ( LPSERVICE_STATUS_PROCESS  lp) const

return process information

DWORD ServiceInstance::GetServiceState ( ) const

return the service state

std::wstring ServiceInstance::GetServiceStateString ( )

return string presentation of the service state

bool AppSecInc::Service::ServiceInstance::IsOpen ( ) const
inline

returns true if service is already open

bool AppSecInc::Service::ServiceInstance::IsPaused ( ) const
inline

returns true if the service is paused

bool AppSecInc::Service::ServiceInstance::IsStarted ( ) const
inline

returns true if the service is started

bool AppSecInc::Service::ServiceInstance::IsStopped ( ) const
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.


The documentation for this class was generated from the following files:


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com