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

OW32::CSCService Class Reference

A service manager service handle wrapper. More...

#include <ServiceManager.h>

List of all members.

Public Member Functions

 CSCService (SC_HANDLE hService)
 Constructor from an existing service handle.
 ~CSCService ()
 Tidy up any service handle.
SC_HANDLE GetHandle () const
 Return the encapsulated service handle.
BOOL Control (DWORD dwControl, LPSERVICE_STATUS lpServiceStatus)
 Control (start/stop/pause/etc) the service.
BOOL Start (DWORD dwNumServiceArgs=0, LPCTSTR *lpServiceArgVectors=NULL)
 Start the service.
BOOL Stop (LPSERVICE_STATUS lpServiceStatus)
 Stop the service.
BOOL Delete ()
 Mark the service for deletion. The service is not actually deleted until all open handles to it have been closed (including this one!).
BOOL QueryStatus (LPSERVICE_STATUS lpServiceStatus)
 Get the current status of the given service.
CEnumDependentServicesEnumDependentServices (DWORD dwServiceState=SERVICE_STATE_ALL)
 Enumerate the services that depend on this one.
 operator SC_HANDLE ()
 SC_HANDLE extraction operator.


Detailed Description

A service manager service handle wrapper.


Member Function Documentation

BOOL OW32::CSCService::Control DWORD  dwControl,
LPSERVICE_STATUS  lpServiceStatus
[inline]
 

Control (start/stop/pause/etc) the service.

Returns:
TRUE if successful, FALSE otherwise
Parameters:
dwControl The control message to send to the service
lpServiceStatus Output - the status of the service after control.

BOOL OW32::CSCService::Delete  )  [inline]
 

Mark the service for deletion. The service is not actually deleted until all open handles to it have been closed (including this one!).

Returns:
TRUE if successful, FALSE otherwise

CEnumDependentServices * OW32::CSCService::EnumDependentServices DWORD  dwServiceState = SERVICE_STATE_ALL  )  [inline]
 

Enumerate the services that depend on this one.

Returns:
Pointer to a #CEnumDependentServices helper class to perform the enumeration.
Parameters:
dwServiceState Optionally limit the enumeration to services in the given state.

BOOL OW32::CSCService::QueryStatus LPSERVICE_STATUS  lpServiceStatus  )  [inline]
 

Get the current status of the given service.

Returns:
TRUE if successful, FALSE otherwise
Parameters:
lpServiceStatus Output - the status of the service.

BOOL OW32::CSCService::Start DWORD  dwNumServiceArgs = 0,
LPCTSTR *  lpServiceArgVectors = NULL
[inline]
 

Start the service.

Returns:
TRUE if successful, FALSE otherwise
Parameters:
dwNumServiceArgs number of arguments
lpServiceArgVectors service arguments

BOOL OW32::CSCService::Stop LPSERVICE_STATUS  lpServiceStatus  )  [inline]
 

Stop the service.

Returns:
TRUE if successful, FALSE otherwise
Parameters:
lpServiceStatus Output - the status of the service after control.


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