C++ service base stuff taken from MS public domain example project and modified slightly.

This commit is contained in:
Adam Ierymenko 2014-02-05 16:37:50 -08:00
parent 8031fe00c7
commit d5b50ee466
9 changed files with 1057 additions and 0 deletions

View file

@ -0,0 +1,47 @@
/****************************** Module Header ******************************\
* Module Name: SampleService.cpp
* Project: CppWindowsService
* Copyright (c) Microsoft Corporation.
*
* Provides a sample service class that derives from the service base class -
* CServiceBase. The sample service logs the service start and stop
* information to the Application event log, and shows how to run the main
* function of the service in a thread pool worker thread.
*
* This source is subject to the Microsoft Public License.
* See http://www.microsoft.com/en-us/openness/resources/licenses.aspx#MPL.
* All other rights reserved.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/
#pragma region Includes
#include "ZeroTierOneService.h"
#pragma endregion
ZeroTierOneService::ZeroTierOneService() :
CServiceBase(ZT_SERVICE_NAME,TRUE,TRUE,TRUE)
{
}
ZeroTierOneService::~ZeroTierOneService(void)
{
}
void ZeroTierOneService::OnStart(DWORD dwArgc, LPSTR *lpszArgv)
{
}
void ZeroTierOneService::OnStop()
{
}
void ZeroTierOneService::OnPause()
{
}
void ZeroTierOneService::OnContinue()
{
}