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.

94 lines
2.4 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1996
  6. //
  7. // File: dpapidbg.h
  8. //
  9. // Contents: Debug information for DPAPI
  10. //
  11. //
  12. // History: 16-April-1996 Created MikeSw
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __DPAPIDBG_H__
  16. #define __DPAPIDBG_H__
  17. //
  18. // NOTE: DO not remove RETAIL_LOG_SUPPORT from sources,
  19. // or you'll be busted in DBG builds.
  20. //
  21. #ifdef RETAIL_LOG_SUPPORT
  22. DECLARE_DEBUG2(DPAPI);
  23. #undef DebugLog
  24. #define DebugLog(_x_) DPAPIDebugPrint _x_
  25. #define DPAPI_PARAMETER_PATH L"System\\CurrentControlSet\\Control\\Lsa\\DPAPI"
  26. #define WSZ_DPAPIDEBUGLEVEL L"LogLevel"
  27. #define WSZ_FILELOG L"LogToFile"
  28. #define DEB_TRACE_API 0x0008
  29. #undef DEB_TRACE_CRED
  30. #define DEB_TRACE_CRED 0x0010
  31. #define DEB_TRACE_CTXT 0x0020
  32. #define DEB_TRACE_LSESS 0x0040
  33. #define DEB_TRACE_TCACHE 0x0080
  34. #define DEB_TRACE_LOGON 0x0100
  35. #define DEB_TRACE_KDC 0x0200
  36. #define DEB_TRACE_CTXT2 0x0400
  37. #define DEB_TRACE_TIME 0x0800
  38. #define DEB_TRACE_USER 0x1000
  39. #define DEB_TRACE_LEAKS 0x2000
  40. #define DEB_TRACE_BUFFERS 0x4000
  41. #undef DEB_TRACE_LOCKS
  42. #define DEB_TRACE_LOCKS 0x01000000
  43. #define DEB_USE_LOG_FILE 0x2000000
  44. // For extended errors
  45. #define DEB_USE_EXT_ERRORS 0x10000000
  46. #define EXT_ERROR_ON(s) (s & DEB_USE_EXT_ERRORS)
  47. #define SSAlloc(cb) LocalAlloc(LMEM_FIXED, cb)
  48. #define SSReAlloc(pv, cb) LocalReAlloc(pv, cb, LMEM_MOVEABLE) // allow ReAlloc to move
  49. #define SSFree(pv) LocalFree(pv)
  50. #define SSSize(pv) LocalSize(pv)
  51. VOID
  52. DPAPIInitializeDebugging(VOID);
  53. VOID
  54. DPAPIDumpHexData(
  55. DWORD LogLevel,
  56. PSTR pszPrefix,
  57. PBYTE pbData,
  58. DWORD cbData);
  59. #else // RETAIL_LOG_SUPPORT
  60. #define DebugLog(_x_)
  61. #define DPAPIInitializeDebugging()
  62. #define EXT_ERROR_ON(s) FALSE
  63. #endif // RETAIL_LOG_SUPPORT
  64. #if DBG
  65. #define D_DebugLog(_x_) DebugLog(_x_) // don't use all debug spew in retail builds
  66. #define D_DPAPIDumpHexData(level, prefix, buffer, count) DPAPIDumpHexData((level), (prefix), (buffer), (count))
  67. #else
  68. #define D_DebugLog(_x_)
  69. #define D_DPAPIDumpHexData(level, prefix, buffer, count)
  70. #endif
  71. #endif // __DPAPIDBG_H__