VOID WINAPI ace_nt_svc_handler_##SVCNAME (DWORD fdwControl) { \
} \
VOID WINAPI ace_nt_svc_main_##SVCNAME (DWORD dwArgc, \
bool delete_svc_obj = false; \
if (_ace_nt_svc_obj_##SVCNAME == 0) {
\
ACE_NEW (_ace_nt_svc_obj_##SVCNAME, SVCCLASS); \
if (_ace_nt_svc_obj_##SVCNAME == 0) \
return; \
delete_svc_obj = true; \
} \
else \
_ace_nt_svc_obj_##SVCNAME->inherit_log_msg_attributes (); \
_ace_nt_svc_obj_##SVCNAME->init(dwArgc, lpszArgv); \
_ace_nt_svc_obj_##SVCNAME->svc_handle( \
&ace_nt_svc_handler_##SVCNAME)); \
_ace_nt_svc_obj_##SVCNAME->open(); \
_ace_nt_svc_obj_##SVCNAME->wait(); \
_ace_nt_svc_obj_##SVCNAME->fini(); \
if (delete_svc_obj) { \
delete _ace_nt_svc_obj_##SVCNAME; \
_ace_nt_svc_obj_##SVCNAME = 0; \
} \
return; \
}
#define ACE_TEXT_RegisterServiceCtrlHandler
Definition: ace_wchar.h:316
virtual void handle_control(DWORD control_code)
Definition: NT_Service.cpp:91
char ACE_TCHAR
Definition: ace_wchar.h:100
Provide the base class which defines the interface for controlling an NT service. ...
Definition: NT_Service.h:99
#define ACE_NEW(POINTER, CONSTRUCTOR)
Definition: OS_Memory.h:221