Leaked source code of windows server 2003
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.

76 lines
1.7 KiB

  1. #ifndef __LOG__
  2. #define __LOG__
  3. #include "generic.h"
  4. #pragma PAGEDCODE
  5. class CLogger
  6. {
  7. public:
  8. NTSTATUS m_Status;
  9. SAFE_DESTRUCTORS();
  10. virtual VOID dispose(){self_delete();};
  11. private:
  12. LONG usage;
  13. public:
  14. CLogger(){};
  15. virtual ~CLogger(){};
  16. virtual VOID logEvent(NTSTATUS ErrorCode, PDEVICE_OBJECT fdo) {};
  17. LONG incrementUsage(){return ++usage;};
  18. LONG decrementUsage(){return --usage;};
  19. };
  20. // Message definition file for EventLog driver
  21. // Copyright (C) 1999 by Walter Oney
  22. // All rights reserved
  23. //
  24. // Values are 32 bit values layed out as follows:
  25. //
  26. // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  27. // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  28. // +---+-+-+-----------------------+-------------------------------+
  29. // |Sev|C|R| Facility | Code |
  30. // +---+-+-+-----------------------+-------------------------------+
  31. //
  32. // where
  33. //
  34. // Sev - is the severity code
  35. //
  36. // 00 - Success
  37. // 01 - Informational
  38. // 10 - Warning
  39. // 11 - Error
  40. //
  41. // C - is the Customer code flag
  42. //
  43. // R - is a reserved bit
  44. //
  45. // Facility - is the facility code
  46. //
  47. // Code - is the facility's status code
  48. //
  49. //
  50. // Define the facility codes
  51. //
  52. #define FACILITY_EVENTLOG_ERROR_CODE 0x2A
  53. //
  54. // Define the severity codes
  55. //
  56. #define STATUS_SEVERITY_WARNING 0x2
  57. #define STATUS_SEVERITY_SUCCESS 0x0
  58. #define STATUS_SEVERITY_INFORMATIONAL 0x1
  59. #define STATUS_SEVERITY_ERROR 0x3
  60. //
  61. // MessageId: EVENTLOG_MSG_TEST
  62. //
  63. // MessageText:
  64. //
  65. // %2 said, "Hello, world!"
  66. //
  67. #define EVENTLOG_MSG_TEST ((NTSTATUS)0x602A0001L)
  68. #endif//LOGGER