16 void Open(
const std::wstring& computer_name,
const std::wstring& database_name, DWORD access = SC_MANAGER_ALL_ACCESS);
18 void Open(DWORD access = SC_MANAGER_ALL_ACCESS);
22 bool IsOpen()
const {
return m_h != NULL; }
27 DWORD service_type = SERVICE_WIN32,
28 DWORD service_state = SERVICE_STATE_ALL,
29 LPCTSTR service_group_name = NULL)
const;
SC_HANDLE GetHandle() const
return the policy handle
Definition: ServiceManager.h:24
ServiceManager()
Definition: ServiceManager.cpp:6
bool ServiceExists(const std::wstring &name)
return true if the service exists
Definition: ServiceManager.cpp:98
void Open(const std::wstring &computer_name, const std::wstring &database_name, DWORD access=SC_MANAGER_ALL_ACCESS)
open the Service manager object on a computer
Definition: ServiceManager.cpp:32
bool IsOpen() const
returns true if service manager is open
Definition: ServiceManager.h:22
std::list< ServiceStatusProcess > GetServices(DWORD service_type=SERVICE_WIN32, DWORD service_state=SERVICE_STATE_ALL, LPCTSTR service_group_name=NULL) const
return a list of services
Definition: ServiceManager.cpp:49
Service manager.
Definition: ServiceManager.h:8
virtual ~ServiceManager()
Definition: ServiceManager.cpp:11
void Close()
close a previously opened service manager object
Definition: ServiceManager.cpp:19