ServiceImpl.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace AppSecInc
4 {
5  namespace Service
6  {
8  class ServiceImpl
9  {
10  private:
11  SERVICE_STATUS_HANDLE _status;
12  HANDLE _thread;
13  HANDLE _stop;
14  static ServiceImpl * _instance;
15  static DWORD ServiceExecutionThread(LPVOID param);
16  static void ServiceCtrlHandler(DWORD controlCode);
17  static void UpdateSCMStatus(
18  DWORD dwCurrentState,
19  DWORD dwWin32ExitCode,
20  DWORD dwServiceSpecificExitCode,
21  DWORD dwCheckPoint,
22  DWORD dwWaitHint);
23  static void ServiceMain();
24  static void StartThread();
25  protected:
26  BOOL _running;
27  BOOL _paused;
28  std::wstring _name;
29  virtual void Run() = 0;
30  public:
31  ServiceImpl(const std::wstring& name);
32  virtual ~ServiceImpl();
33  void Stop();
34  void Start();
35  void Wait();
36  };
37  }
38 }
std::wstring _name
Definition: ServiceImpl.h:28
ServiceImpl(const std::wstring &name)
Definition: ServiceImpl.cpp:8
void Wait()
Definition: ServiceImpl.cpp:149
BOOL _paused
Definition: ServiceImpl.h:27
BOOL _running
Definition: ServiceImpl.h:26
service implementation
Definition: ServiceImpl.h:8
void Stop()
Definition: ServiceImpl.cpp:24
void Start()
Definition: ServiceImpl.cpp:157
virtual ~ServiceImpl()
Definition: ServiceImpl.cpp:19


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