Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
868 B

  1. // ntservice.h
  2. //
  3. // Definitions for CNTService
  4. //
  5. #ifndef _NTSERVICE_H_
  6. #define _NTSERVICE_H_
  7. #define SERVICE_CONTROL_USER 128
  8. class CNTService
  9. {
  10. public:
  11. CNTService();
  12. ~CNTService();
  13. void LogEvent(WORD wType, DWORD dwID,
  14. void * pRawData = NULL,
  15. DWORD dwDataSize = 0,
  16. const WCHAR* pszS1 = NULL,
  17. const WCHAR* pszS2 = NULL,
  18. const WCHAR* pszS3 = NULL);
  19. void SetStatus(DWORD dwState);
  20. void Run();
  21. void OnStop();
  22. void OnShutdown();
  23. void OnInterrogate();
  24. void ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
  25. SERVICE_STATUS_HANDLE m_hServiceStatus;
  26. SERVICE_STATUS m_Status;
  27. private:
  28. HANDLE m_hEventSource;
  29. };
  30. extern CNTService * g_pSRService;
  31. void WINAPI SRServiceHandler(DWORD dwOpcode);
  32. #endif // _NTSERVICE_H_