Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OW32::CSCManager Class Reference

A service manager wrapper. More...

#include <ServiceManager.h>

List of all members.

Public Member Functions

BOOL Open (DWORD dwDesiredAccess=SC_MANAGER_ALL_ACCESS, LPCTSTR lpszMachineName=NULL)
 Open the SCM with the given access rights.
void Close ()
 Close the SCM handle (might be useful for lockers).
 ~CSCManager ()
 Tidy up the SCM handle.
SC_HANDLE GetHandle () const
 Extractor for the encapsulated SC_HANDLE.
CEnumServicesStatusEnumServicesStatus (DWORD dwServiceType=SERVICE_WIN32, DWORD dwServiceState=SERVICE_STATE_ALL)
 Start enumerating services with the given parameters.
CSCServiceCreateService (LPCTSTR lpServiceName, LPCTSTR lpPath, LPCTSTR lpServiceDescription=NULL, DWORD dwDesiredAccess=STANDARD_RIGHTS_REQUIRED, DWORD dwServiceType=SERVICE_WIN32_OWN_PROCESS, DWORD dwStartType=SERVICE_AUTO_START, DWORD dwErrorControl=SERVICE_ERROR_NORMAL, LPCTSTR lpLoadOrderGroup=NULL, LPDWORD lpLoadOrderTag=NULL, LPCTSTR lpDependencies=NULL, LPCTSTR lpAccountName=NULL, LPCTSTR lpPassword=NULL)
 create a service, with lots of parameters
CSCServiceOpenService (LPCTSTR lpServiceName, DWORD dwDesiredAccess=SERVICE_ALL_ACCESS)
 Open the service with the given name.


Detailed Description

A service manager wrapper.


Member Function Documentation

CSCService* OW32::CSCManager::CreateService LPCTSTR  lpServiceName,
LPCTSTR  lpPath,
LPCTSTR  lpServiceDescription = NULL,
DWORD  dwDesiredAccess = STANDARD_RIGHTS_REQUIRED,
DWORD  dwServiceType = SERVICE_WIN32_OWN_PROCESS,
DWORD  dwStartType = SERVICE_AUTO_START,
DWORD  dwErrorControl = SERVICE_ERROR_NORMAL,
LPCTSTR  lpLoadOrderGroup = NULL,
LPDWORD  lpLoadOrderTag = NULL,
LPCTSTR  lpDependencies = NULL,
LPCTSTR  lpAccountName = NULL,
LPCTSTR  lpPassword = NULL
[inline]
 

create a service, with lots of parameters

Returns:
CSCService wrapping the created service.
Parameters:
lpServiceName the net start/stop name of the service
lpPath the path to the module
lpServiceDescription a desciption of the service
dwDesiredAccess desired access to the service
dwServiceType type of service
dwStartType automatic or manual startup of service
dwErrorControl action to take on service failure
lpLoadOrderGroup the load order group
lpLoadOrderTag the load order tag
lpDependencies A list of services this depends on
lpAccountName The account to run this service under (default: LocalSystem)
lpPassword The password for the account (NULL for LocalSystem)

CEnumServicesStatus * OW32::CSCManager::EnumServicesStatus DWORD  dwServiceType = SERVICE_WIN32,
DWORD  dwServiceState = SERVICE_STATE_ALL
[inline]
 

Start enumerating services with the given parameters.

Returns:
A #CEnumServicesStatus object to perform the enumeration.
Parameters:
dwServiceType The type of service to enumerate.
dwServiceState An optional state match

BOOL OW32::CSCManager::Open DWORD  dwDesiredAccess = SC_MANAGER_ALL_ACCESS,
LPCTSTR  lpszMachineName = NULL
[inline]
 

Open the SCM with the given access rights.

Parameters:
dwDesiredAccess The access rights to apply
lpszMachineName The machine to open the SCM on

CSCService* OW32::CSCManager::OpenService LPCTSTR  lpServiceName,
DWORD  dwDesiredAccess = SERVICE_ALL_ACCESS
[inline]
 

Open the service with the given name.

Returns:
An #CSCService class wrapping the service.
Parameters:
lpServiceName the name of the service to open.
dwDesiredAccess the type of access required to the opened service.


The documentation for this class was generated from the following file:
Generated on Sun Jun 5 01:29:27 2005 for OW32 by  doxygen 1.3.9.1