完善目录结构
完善了目录结构,添加了以前的web段com组件调用的代码(在/测试目录下)(部署没有使用到)
This commit is contained in:
44
测试/单独功能测试/Service服务测试/Service.h
Normal file
44
测试/单独功能测试/Service服务测试/Service.h
Normal file
@@ -0,0 +1,44 @@
|
||||
// Service.h: interface for the CService class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_SERVICE_H__CCA2ED69_EC91_11D5_966E_000347A347FE__INCLUDED_)
|
||||
#define AFX_SERVICE_H__CCA2ED69_EC91_11D5_966E_000347A347FE__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
class CService
|
||||
{
|
||||
public:
|
||||
CService();
|
||||
virtual ~CService();
|
||||
|
||||
void Init(LPCTSTR pServiceName,LPCTSTR pServiceDisplayedName);
|
||||
void Start();
|
||||
void ServiceMain();
|
||||
void Handler(DWORD dwOpcode);
|
||||
void Run();
|
||||
BOOL IsInstalled();
|
||||
BOOL Install();
|
||||
BOOL Uninstall();
|
||||
void LogEvent(LPCSTR pszFormat, ...);
|
||||
void SetServiceStatus(DWORD dwState);
|
||||
|
||||
private:
|
||||
static void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
|
||||
static void WINAPI _Handler(DWORD dwOpcode);
|
||||
|
||||
DWORD m_dwThreadID;
|
||||
|
||||
public:
|
||||
TCHAR m_szServiceName[256];
|
||||
TCHAR m_szServiceDisplayedName[256];
|
||||
SERVICE_STATUS_HANDLE m_hServiceStatus;
|
||||
SERVICE_STATUS m_status;
|
||||
BOOL m_bService;
|
||||
};
|
||||
|
||||
extern CService _Module;
|
||||
#endif // !defined(AFX_SERVICE_H__CCA2ED69_EC91_11D5_966E_000347A347FE__INCLUDED_)
|
||||
Reference in New Issue
Block a user