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.

58 lines
1.1 KiB

  1. /**************************************************************************************************
  2. FILENAME: ErrLog.h
  3. COPYRIGHT 2001 Microsoft Corporation and Executive Software International, Inc.
  4. */
  5. #ifndef __LOGFILE_H_
  6. #define __LOGFILE_H_
  7. #include <windows.h>
  8. #ifndef DPFLTR_ERROR_LEVEL
  9. #define DPFLTR_ERROR_LEVEL 0
  10. #define DPFLTR_WARNING_LEVEL 1
  11. #define DPFLTR_TRACE_LEVEL 2
  12. #define DPFLTR_INFO_LEVEL 3
  13. #endif
  14. #define log THIS_MODULE, __LINE__, DPFLTR_TRACE_LEVEL
  15. #define warn THIS_MODULE, __LINE__, DPFLTR_WARNING_LEVEL
  16. #define error THIS_MODULE, __LINE__, DPFLTR_ERROR_LEVEL
  17. #define Trace IsLoggingAvailable() && DebugMessage
  18. #define WriteStringToLogFile(x) WriteStringToLogFileFunction(x)
  19. //Initializes the error log.
  20. BOOL
  21. InitializeLogFile(
  22. IN TCHAR* pLogName
  23. );
  24. //Closes the error log.
  25. void
  26. ExitLogFile(
  27. );
  28. BOOL
  29. IsLoggingAvailable();
  30. BOOL
  31. WriteStringToLogFileFunction(
  32. IN TCHAR* pMessage
  33. );
  34. BOOL
  35. DebugMessage(
  36. IN CONST char Module,
  37. IN CONST ULONG Line,
  38. IN CONST ULONG MesgLevel,
  39. IN PCSTR FormatString,
  40. ...);
  41. #endif // #ifndef __LOGFILE_H_