#include "stdafx.h"
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
LPTSTR lpszStrings[] = {"Called main() in file", __FILE__};
HANDLE hEventSource = RegisterEventSource(NULL, "myService");
if (hEventSource == NULL){
return 1;
}
ReportEvent(hEventSource,
EVENTLOG_INFORMATION_TYPE,
0,
0,
NULL,
2,
0,
(LPCSTR*)lpszStrings,
NULL);
DeregisterEventSource(hEventSource);
return 0;
}