57 _T(
"Service state 0x%lx, CheckPoint %lu"),
139 if (dwControl >= 128 && dwControl <= 255)
static SERVICE_STATUS_HANDLE(WINAPI *pRegisterServiceCtrlHandlerExA)(LPCSTR
VOID WINAPI ServiceMain(DWORD argc, LPTSTR argv[])
struct _ServiceData SERVICEDATA
struct _ServiceData * PSERVICEDATA
struct _ServiceInfo SERVICEINFO
static VOID UpdateStatus(PSERVICEINFO pServInfo, DWORD NewStatus, DWORD Check)
static BOOL CreateServiceThread(PSERVICEINFO pServInfo)
struct _ServiceInfo * PSERVICEINFO
DWORD WINAPI ThreadProc(LPVOID lpParam)
DWORD WINAPI ServerCtrlHandler(DWORD dwControl, DWORD dwEventType, LPVOID lpEventData, LPVOID lpContext)
#define InterlockedExchange
static SERVICE_TABLE_ENTRYW ServiceTable[2]
VOID LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE hServiceStatus, LPSERVICE_STATUS lpServiceStatus)
DWORD dwServiceSpecificExitCode
SERVICE_STATUS_HANDLE hStatus
SERVICE_STATUS servStatus
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
DWORD WINAPI GetLastError(void)
#define ERROR_SERVICE_SPECIFIC_ERROR
#define ERROR_INVALID_SERVICE_CONTROL
#define SERVICE_ACCEPT_STOP
#define SERVICE_STOP_PENDING
#define SERVICE_CONTROL_SHUTDOWN
#define RegisterServiceCtrlHandlerEx
#define StartServiceCtrlDispatcher
#define SERVICE_START_PENDING
#define SERVICE_CONTROL_CONTINUE
#define SERVICE_ACCEPT_PAUSE_CONTINUE
#define SERVICE_CONTROL_STOP
#define SERVICE_ACCEPT_SHUTDOWN
#define SERVICE_CONTROL_PAUSE
#define SERVICE_CONTROL_INTERROGATE
#define SERVICE_WIN32_OWN_PROCESS