|
// CLS.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "CLS.h"
#include "WinService.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// The one and only application object
CWinApp theApp;
using namespace std;
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
int nRetCode = 0;
// initialize MFC and print and error on failure
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
{
// TODO: change error code to suit your needs
_tprintf(_T("Fatal Error: MFC initialization failed\n"));
nRetCode = 1;
}
else
{
// Parse for standard arguments (install, uninstall, usage)
CMyService MyService;
if (!MyService.ParseStandardArgs(argc, argv))
MyService.StartService();
// When we get here, the service has been stopped
return MyService.m_Status.dwWin32ExitCode;
}
return nRetCode;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.