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.

104 lines
2.9 KiB

  1. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Copyright (C) 1998 Microsoft Corporation
  3. All rights reserved.
  4. File: evntlog.h
  5. Abstract: EventLog DLL interface
  6. Authors: Hao Zhang
  7. History: Oct 25, 1999
  8. ----------------------------------------------------------------------*/
  9. #define TRAN_CAT_ROUTING_ENGINE 1
  10. #define TRAN_CAT_CATEGORIZER 2
  11. #define TRAN_CAT_CONNECTION_MANAGER 3
  12. #define TRAN_CAT_QUEUE_ENGINE 4
  13. #define TRAN_CAT_EXCHANGE_STORE_DRIVER 5
  14. #define TRAN_CAT_SMTP_PROTOCOL 6
  15. #define TRAN_CAT_NTFS_STORE_DRIVER 7
  16. #define LOGEVENT_LEVEL_FIELD_ENGINEERING 7
  17. #define LOGEVENT_LEVEL_MAXIMUM 5
  18. #define LOGEVENT_LEVEL_MEDIUM 3
  19. #define LOGEVENT_LEVEL_MINIMUM 1
  20. #define LOGEVENT_LEVEL_NONE 0
  21. #define LOGEVENT_FLAG_ALWAYS 0x00000001
  22. #define LOGEVENT_FLAG_ONETIME 0x00000002
  23. #define LOGEVENT_FLAG_PERIODIC 0x00000003
  24. // we use the lower 8 bits for various logging modes, and reserve the
  25. // other 24 for flags
  26. #define LOGEVENT_FLAG_MODEMASK 0x000000ff
  27. // 100ns units between periodic event logs. this can't be larger then
  28. // 0xffffffff
  29. #define LOGEVENT_PERIOD (DWORD) (3600000000) // 60 minutes
  30. //
  31. // setup DLL Export macros
  32. //
  33. #if !defined(DllExport)
  34. #define DllExport __declspec( dllexport )
  35. #endif
  36. #if !defined(DllImport)
  37. #define DllImport __declspec( dllimport )
  38. #endif
  39. /******************************************************************************/
  40. DllExport
  41. HRESULT TransportLogEvent(
  42. IN DWORD idMessage,
  43. IN WORD idCategory,
  44. IN WORD cSubstrings,
  45. IN LPCSTR *rgszSubstrings,
  46. IN WORD wType,
  47. IN DWORD errCode,
  48. IN WORD iDebugLevel,
  49. IN LPCSTR szKey,
  50. IN DWORD dwOptions);
  51. DllExport
  52. HRESULT TransportLogEventEx(
  53. IN DWORD idMessage,
  54. IN WORD idCategory,
  55. IN WORD cSubstrings,
  56. IN LPCSTR *rgszSubstrings,
  57. IN WORD wType,
  58. IN DWORD errCode,
  59. IN WORD iDebugLevel,
  60. IN LPCSTR szKey,
  61. IN DWORD dwOptions,
  62. DWORD iMessageString,
  63. HMODULE hModule);
  64. DllExport
  65. HRESULT TransportLogEventFieldEng(
  66. IN DWORD idMessage,
  67. IN WORD idCategory,
  68. IN LPCTSTR format,
  69. ...
  70. );
  71. DllExport
  72. HRESULT TransportResetEvent(
  73. IN DWORD idMessage,
  74. IN LPCSTR szKey);
  75. DllExport
  76. DWORD TransportGetLoggingLevel(
  77. IN WORD idCategory);
  78. DllExport
  79. HRESULT TransportLogEventInit ();
  80. //
  81. // Attention:
  82. // Make sure that no other logging was called
  83. // before calling this Deinit function
  84. //
  85. DllExport
  86. HRESULT TransportLogEventDeinit ();