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.

110 lines
5.9 KiB

  1. /**INC+**********************************************************************/
  2. /* Header: ntrcint.h */
  3. /* */
  4. /* Purpose: Internal tracing functions header - Windows NT specific */
  5. /* */
  6. /* Copyright(C) Microsoft Corporation 1997 */
  7. /* */
  8. /****************************************************************************/
  9. /** Changes:
  10. * $Log: Y:/logs/trc/ntrcint.h_v $
  11. *
  12. * Rev 1.6 28 Aug 1997 14:52:26 ENH
  13. * SFR1189: Added TRACE_REG_PREFIX
  14. *
  15. * Rev 1.5 22 Aug 1997 10:22:04 SJ
  16. * SFR1316: Trace options in wrong place in the registry.
  17. *
  18. * Rev 1.4 12 Aug 1997 09:52:14 MD
  19. * SFR1002: Remove kernel tracing code
  20. *
  21. * Rev 1.3 09 Jul 1997 18:02:46 AK
  22. * SFR1016: Initial changes to support Unicode
  23. *
  24. * Rev 1.2 03 Jul 1997 13:28:40 AK
  25. * SFR0000: Initial development completed
  26. *
  27. * Rev 1.1 20 Jun 1997 10:25:50 KH
  28. * Win16Port: Contains 32 bit specifics only
  29. **/
  30. /**INC-**********************************************************************/
  31. #ifndef _H_NTRCINT
  32. #define _H_NTRCINT
  33. /****************************************************************************/
  34. /* */
  35. /* CONSTANTS */
  36. /* */
  37. /****************************************************************************/
  38. /****************************************************************************/
  39. /* */
  40. /* MACROS */
  41. /* */
  42. /****************************************************************************/
  43. /****************************************************************************/
  44. /* Macro to create the mutex which protects the shared data memory mapped */
  45. /* file. */
  46. /****************************************************************************/
  47. #define TRCCreateMutex(a,b,c) (CreateMutex(a,b,c))
  48. /****************************************************************************/
  49. /* Macro to get the mutex which protects the shared data memory mapped */
  50. /* file. By getting this semaphore we are serializing access to the trace */
  51. /* buffer and the trace configuration (e.g. trace level, prefix list). */
  52. /* */
  53. /* We use the standard Win32 WaitForSingleObject function to wait for the */
  54. /* mutex. The wait function requests ownership of the mutex for us. If */
  55. /* the mutex is nonsignaled then we enter an efficient wait state which */
  56. /* consumes very little processor time while waiting for the mutex to */
  57. /* become signaled. */
  58. /****************************************************************************/
  59. #define TRCGrabMutex() WaitForSingleObject(trchMutex, INFINITE)
  60. /****************************************************************************/
  61. /* Macro to free the mutex. Use the standard Win32 ReleaseMutex function. */
  62. /****************************************************************************/
  63. #define TRCReleaseMutex() ReleaseMutex(trchMutex)
  64. /****************************************************************************/
  65. /* Trace a string out to the debugger. */
  66. /****************************************************************************/
  67. #define TRCDebugOutput(pText) \
  68. { \
  69. OutputDebugString(pText); \
  70. }
  71. /****************************************************************************/
  72. /* Get the current process Id using the Win32 GetCurrentProcessId function. */
  73. /****************************************************************************/
  74. #define TRCGetCurrentProcessId() GetCurrentProcessId()
  75. /****************************************************************************/
  76. /* Get the thread process Id using the Win32 GetCurrentThreadId function. */
  77. /****************************************************************************/
  78. #define TRCGetCurrentThreadId() GetCurrentThreadId()
  79. /****************************************************************************/
  80. /* Define our own beep macro. */
  81. /****************************************************************************/
  82. #define TRCBeep() MessageBeep(0)
  83. /****************************************************************************/
  84. /* Define our debug break macro. */
  85. /****************************************************************************/
  86. DCVOID DCINTERNAL TRCDebugBreak(DCVOID);
  87. /****************************************************************************/
  88. /* Ducati registry prefix. */
  89. /****************************************************************************/
  90. #define TRACE_REG_PREFIX _T("SOFTWARE\\Microsoft\\Terminal Server Client\\")
  91. #define TRC_SUBKEY_NAME (TRACE_REG_PREFIX TRC_INI_SECTION_NAME)
  92. /****************************************************************************/
  93. /* Macro to close the mutex object. */
  94. /****************************************************************************/
  95. #define TRCCloseHandle(handle) CloseHandle(handle)
  96. #endif /* _H_NTRCINT */