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.

175 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 1995-1996 Microsoft Corporation
  3. Module Name:
  4. Logging.hxx
  5. Abstract:
  6. This module provides definitions of the server side logging object
  7. Author:
  8. Terence Kwan ( terryk ) 18-June-1996
  9. Environment:
  10. User-Mode - Win32
  11. Project:
  12. Internet Server DLL
  13. Revision History:
  14. --*/
  15. # ifndef _LOGGING_HXX_
  16. # define _LOGGING_HXX_
  17. typedef
  18. HANDLE
  19. (*P_ComLogInitializeLog)(
  20. LPCSTR pszInstanceName,
  21. LPCSTR lpszMetabasePath,
  22. LPVOID pvIMDCOM
  23. );
  24. typedef
  25. DWORD
  26. (*P_ComLogTerminateLog)(
  27. IN HANDLE hHandle
  28. );
  29. typedef
  30. DWORD
  31. (*P_ComLogLogInformation)(
  32. IN HANDLE hHandle,
  33. IN const INETLOG_INFORMATION *pInetLogInfo
  34. );
  35. typedef
  36. DWORD
  37. (*P_ComLogGetConfig)(
  38. IN HANDLE hHandle,
  39. IN INETLOG_CONFIGURATIONA *pConfig
  40. );
  41. typedef
  42. DWORD
  43. (*P_ComLogSetConfig)(
  44. IN HANDLE hHandle,
  45. IN const INETLOG_CONFIGURATIONA *pConfig
  46. );
  47. typedef
  48. DWORD
  49. (*P_ComLogDllStartup)(
  50. VOID
  51. );
  52. typedef
  53. DWORD
  54. (*P_ComLogDllCleanUp)(
  55. VOID
  56. );
  57. typedef
  58. DWORD
  59. (*P_ComLogNotifyChange)(
  60. IN HANDLE hHandle
  61. );
  62. typedef
  63. DWORD
  64. (*P_ComLogQueryExtraLogFields)(
  65. IN HANDLE hHandle,
  66. IN PCHAR lpszFields,
  67. IN PDWORD pcbBuf
  68. );
  69. typedef
  70. DWORD
  71. (*P_ComLogCustomInformation)(
  72. IN HANDLE hHandle,
  73. IN DWORD cCount,
  74. IN PCUSTOM_LOG_DATA pCustomLogData,
  75. IN LPSTR szHeaderSuffix
  76. );
  77. class dllexp LOGGING {
  78. public:
  79. LOGGING( );
  80. ~LOGGING();
  81. BOOL ActivateLogging(
  82. IN LPCSTR pszServerName,
  83. IN DWORD dwInstanceId,
  84. IN LPCSTR pszMetabasePath,
  85. IN LPVOID pvIMDCOM
  86. );
  87. BOOL ShutdownLogging( VOID);
  88. BOOL NotifyChange(DWORD);
  89. DWORD LogInformation(IN const INETLOG_INFORMATION * pInetLogInfo);
  90. DWORD GetConfig( INETLOG_CONFIGURATIONA *pLogConfig );
  91. DWORD SetConfig( INETLOG_CONFIGURATIONA *pRpcLogConfig );
  92. BOOL IsRequiredExtraLoggingFields();
  93. CHAR *QueryExtraLoggingFields();
  94. DWORD LogCustomInformation(
  95. IN DWORD cCount,
  96. IN PCUSTOM_LOG_DATA pCustomLogData,
  97. IN LPSTR szHeaderSuffix
  98. );
  99. static DWORD Initialize();
  100. static DWORD Terminate();
  101. private:
  102. static HINSTANCE m_hComLogDLL;
  103. static P_ComLogInitializeLog m_ComLogInitializeLog;
  104. static P_ComLogTerminateLog m_ComLogTerminateLog;
  105. static P_ComLogLogInformation m_ComLogLogInformation;
  106. static P_ComLogGetConfig m_ComLogGetConfig;
  107. static P_ComLogSetConfig m_ComLogSetConfig;
  108. static P_ComLogNotifyChange m_ComLogNotifyChange;
  109. static P_ComLogQueryExtraLogFields m_ComLogQueryExtraLogFields;
  110. static P_ComLogDllStartup m_ComLogDllStartup;
  111. static P_ComLogDllCleanUp m_ComLogDllCleanUp;
  112. static P_ComLogCustomInformation m_ComLogCustomInformation;
  113. VOID ActOnChange();
  114. VOID LockShared() { m_tslock.Lock(TSRES_LOCK_READ); }
  115. VOID LockExclusive() { m_tslock.Lock(TSRES_LOCK_WRITE); }
  116. VOID Unlock() { m_tslock.Unlock(); }
  117. TS_RESOURCE m_tslock;
  118. HANDLE m_Handle;
  119. BOOL m_fRequiredExtraLoggingFields;
  120. LPVOID m_pvIMDCOM;
  121. BOOL m_fMetabaseModified;
  122. STR m_strInstanceName;
  123. STR m_strMetabasePath;
  124. CHAR m_szExtraLoggingFields[MAX_PATH];
  125. }; // class LOGGING
  126. # endif // _LOGGING_HXX_