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.

95 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1998-2000 Microsoft Corporation
  3. Module Name:
  4. wtracep.h
  5. Abstract:
  6. This module contains private definitions of the wintrace debug system.
  7. Author:
  8. Michael Tsang (MikeTs) 01-May-2000
  9. Environment:
  10. User mode
  11. Revision History:
  12. --*/
  13. #ifndef _WTRACEP_H
  14. #define _WTRACEP_H
  15. //
  16. // Constants
  17. //
  18. #define TIMEOUT_WAIT_SERVER 2000 //2 secs
  19. #define TIMEOUT_TRACEMUTEX 1000 //1 sec
  20. // gdwfWinTrace values
  21. #define WTF_CLIENT_READY 0x00000001
  22. #define WTF_TRACE_INPROGRESS 0x00000002
  23. #define WTF_TERMINATING 0x80000000
  24. #define SRVREQ_TERMINATE 1
  25. //
  26. // Macros
  27. //
  28. #define RPC_TRY(n,s) { \
  29. RpcTryExcept \
  30. { \
  31. s; \
  32. } \
  33. RpcExcept(1) \
  34. { \
  35. ULONG dwCode = RpcExceptionCode(); \
  36. if (dwCode != EPT_S_NOT_REGISTERED) \
  37. { \
  38. WTERRPRINT(("%s failed with " \
  39. "exception code " \
  40. "%d.\n", \
  41. n, \
  42. dwCode)); \
  43. } \
  44. } \
  45. RpcEndExcept \
  46. }
  47. //
  48. // Type definitions
  49. //
  50. //
  51. // Global Data
  52. //
  53. extern DWORD gdwfWinTrace;
  54. extern CLIENTINFO gClientInfo;
  55. extern char gszClientName[MAX_CLIENTNAME_LEN];
  56. extern HANDLE ghTraceMutex;
  57. extern HANDLE ghClientThread;
  58. extern HCLIENT ghClient;
  59. extern PSZ gpszProcName;
  60. extern RPC_BINDING_HANDLE ghTracerBinding;
  61. //
  62. // Function prototypes
  63. //
  64. // client.c
  65. VOID __cdecl
  66. ClientThread(
  67. IN PSZ pszClientName
  68. );
  69. PTRIGPT LOCAL
  70. FindTrigPt(
  71. IN PSZ pszProcName
  72. );
  73. #endif //ifndef _WTRACEP_H