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.

34 lines
758 B

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994.
  5. //
  6. // File: hkLogEvt.h
  7. //
  8. // Contents: Log an application event
  9. //
  10. // Functions:
  11. //
  12. // History: 28-Sep-94 Don Wright Created
  13. //
  14. //--------------------------------------------------------------------------
  15. #ifndef _LOGEVENT_H_
  16. #define _LOGEVENT_H_
  17. inline void LogEvent(LPWSTR pSourceString,LPWSTR pEventText)
  18. {
  19. HANDLE hEvent = RegisterEventSourceW(NULL,pSourceString);
  20. LPCWSTR *pEventStr = (LPCWSTR *)&pEventText;
  21. ReportEventW(hEvent,
  22. EVENTLOG_INFORMATION_TYPE,
  23. 0,
  24. 0,
  25. NULL,
  26. 1,
  27. 0,
  28. pEventStr,
  29. NULL);
  30. DeregisterEventSource(hEvent);
  31. }
  32. #endif // _LOGEVENT_H_