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.

69 lines
1.4 KiB

  1. /*
  2. pdlsvc.h
  3. */
  4. #include <pdh.h>
  5. #include <common.h>
  6. #ifndef _PDLSVC_H_
  7. #define _PDLSVC_H_
  8. #define G_ALLOC(size) HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, size)
  9. #define G_FREE(ptr) HeapFree (GetProcessHeap(), 0, ptr)
  10. // definitionsdwAutoNameFormat
  11. typedef struct _LOG_THREAD_DATA {
  12. // These fields are written by the main thread
  13. // and read by the logging thread
  14. struct _LOG_THREAD_DATA *next;
  15. HKEY hKeyQuery;
  16. HANDLE hExitEvent;
  17. BOOL bReloadNewConfig;
  18. TCHAR szQueryName[MAX_PATH];
  19. // these fields are written and read by the logging thread
  20. DWORD dwTimeInterval; // in seconds
  21. LPTSTR mszCounterList;
  22. LPTSTR szCmdFileName;
  23. DWORD dwLogType;
  24. DWORD dwAutoNameFormat;
  25. DWORD dwRenameIntervalCount;
  26. DWORD dwRenameIntervalUnits;
  27. DWORD dwCurrentSerialNumber;
  28. } LOG_THREAD_DATA, FAR * LPLOG_THREAD_DATA;
  29. typedef struct _LOG_COUNTER_INFO {
  30. struct _LOG_COUNTER_INFO *next;
  31. HCOUNTER hCounter;
  32. } LOG_COUNTER_INFO, * PLOG_COUNTER_INFO;
  33. extern PLOG_COUNTER_INFO pFirstCounter;
  34. // global variables
  35. extern HANDLE hEventLog;
  36. extern SERVICE_STATUS_HANDLE hPerfLogStatus;
  37. extern SERVICE_STATUS ssPerfLogStatus;
  38. // pdlsvc.c
  39. void PerfDataLogServiceControlHandler(
  40. IN DWORD dwControl
  41. );
  42. void
  43. PerfDataLogServiceStart (
  44. IN DWORD argc,
  45. IN LPTSTR *argv
  46. );
  47. void
  48. __cdecl main(void);
  49. // logthred.c
  50. DWORD
  51. LoggingThreadProc (
  52. IN LPVOID lpThreadArg
  53. );
  54. #endif //_PDLSVC_H_