-
Notifications
You must be signed in to change notification settings - Fork 0
/
ServiceModule.h
44 lines (37 loc) · 1.02 KB
/
ServiceModule.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
////////////////////////////////////////////////////////////////
///
/// \file ServiceModule.h
///
/// Definition of CServiceModule class
///
/// \author Kirill V. Kulikov
/// \date 2004-01-17
///
////////////////////////////////////////////////////////////////
#ifndef _SERVICE_MODULE_H_DEFINED_
#define _SERVICE_MODULE_H_DEFINED_
#include <windows.h>
#include <tchar.h>
class CServiceModule
{
private:
SERVICE_STATUS m_Status;
SERVICE_STATUS_HANDLE m_hStatus;
public:
CServiceModule() throw() : m_hStatus(0) {}
~CServiceModule() throw() {}
private:
#ifndef _CONSOLE
VOID ReportStatus( DWORD status, DWORD hr = 0, DWORD checkPoint = 0 );
VOID ReportStatus();
#endif
public:
static HRESULT Install();
static HRESULT Uninstall();
#ifndef _CONSOLE
VOID Run(int argc, LPTSTR* argv);
DWORD Control( DWORD );
static DWORD Start();
#endif
};
#endif