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.

99 lines
2.5 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993 - 1995.
  5. //
  6. // File: accdbg.h
  7. //
  8. // Contents: debug internal includes for
  9. //
  10. // History: 8-94 Created DaveMont
  11. //
  12. //--------------------------------------------------------------------
  13. #ifndef __ACCDEBUGHXX__
  14. #define __ACCDEBUGHXX__
  15. #include <dsysdbg.h>
  16. #if DBG == 1
  17. #ifdef ASSERT
  18. #undef ASSERT
  19. #endif
  20. #define ASSERT DsysAssert
  21. DECLARE_DEBUG2(ac)
  22. #define DEB_TRACE_API 0x08
  23. #define DEB_TRACE_ACC 0x10
  24. #define DEB_TRACE_CACHE 0x20
  25. #define DEB_TRACE_PROP 0x40
  26. #define DEB_TRACE_SD 0x80
  27. #define DEB_TRACE_SID 0x100
  28. #define DEB_TRACE_LOOKUP 0x200
  29. #define DEB_TRACE_MEM 0x400
  30. #define DEB_TRACE_HANDLE 0x800
  31. #define acDebugOut(args) acDebugPrint args
  32. VOID
  33. DebugInitialize();
  34. VOID
  35. DebugDumpSid(PSTR pszTag,
  36. PSID pSid);
  37. VOID
  38. DebugDumpSD(PSTR pszTag,
  39. PSECURITY_DESCRIPTOR pSD);
  40. VOID
  41. DebugDumpAcl(PSTR pszTag,
  42. PACL pAcl);
  43. #define DebugDumpGuid(tag, pguid) \
  44. pguid == NULL ? acDebugOut((DEB_TRACE_SD, "%s: (NULL)\n", tag)) : \
  45. acDebugOut((DEB_TRACE_SD, \
  46. "%s: %08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x\n", \
  47. tag,pguid->Data1,pguid->Data2,pguid->Data3,pguid->Data4[0], \
  48. pguid->Data4[1],pguid->Data4[2],pguid->Data4[3],pguid->Data4[4], \
  49. pguid->Data4[5],pguid->Data4[6],pguid->Data4[7]))
  50. PVOID DebugAlloc(ULONG cSize);
  51. VOID DebugFree(PVOID pv);
  52. #else
  53. #define acDebugOut(args)
  54. #define DebugInitialize()
  55. #define DebugDumpSid(tag,sid)
  56. #define DebugDumpSD(tag, sd)
  57. #define DebugDumpAcl(tag, acl)
  58. #define DebugDumpGuid(tag, guid)
  59. #endif // DBG
  60. #ifdef PERFORMANCE
  61. #define START_PERFORMANCE ULONG starttime = GetCurrentTime();
  62. #define MEASURE_PERFORMANCE(args) \
  63. (args) \
  64. { Log(starttime - GetCurrentTime(),"args") }
  65. #else
  66. #define START_PERFORMANCE
  67. #define MEASURE_PERFORMANCE(args) (args)
  68. #endif
  69. extern HANDLE WmiGuidHandle;
  70. #endif // __ACCDEBUGHXX__