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.

108 lines
2.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: D B G F L A G S . H
  7. //
  8. // Contents: Debug Flag definitions for the Netcfg project
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 27 May 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #ifndef _DBGFLAGS_H_
  17. #define _DBGFLAGS_H_
  18. // None of this should get compiled in unless we're in the debug version
  19. // or we need to enable tracing code.
  20. //
  21. //+---------------------------------------------------------------------------
  22. //
  23. // DBG (checked) or ENABLETRACE build
  24. //
  25. #if defined(DBG) || defined(ENABLETRACE)
  26. // DebugFlagIds are the identifiers for debug flags, and are used in calls
  27. // to FIsDebugFlagSet()
  28. //
  29. // Hungarian == dfid
  30. //
  31. enum DebugFlagId
  32. {
  33. dfidBreakOnAlloc = 0,
  34. dfidBreakOnDoUnattend,
  35. dfidBreakOnError,
  36. dfidBreakOnHr,
  37. dfidBreakOnHrIteration,
  38. dfidBreakOnIteration,
  39. dfidBreakOnNetInstall,
  40. dfidBreakOnNotifySinkRelease,
  41. dfidBreakOnPrematureDllUnload,
  42. dfidBreakOnWizard,
  43. dfidBreakOnStartOfUpgrade,
  44. dfidBreakOnEndOfUpgrade,
  45. dfidCheckLegacyMenusAtRuntime,
  46. dfidCheckLegacyMenusOnStartup,
  47. dfidDisableShellThreading,
  48. dfidDisableTray,
  49. dfidDontCacheShellIcons,
  50. dfidExtremeTracing,
  51. dfidNetShellBreakOnInit,
  52. dfidNoErrorText,
  53. dfidShowIgnoredErrors,
  54. dfidShowProcessAndThreadIds,
  55. dfidSkipLanEnum,
  56. dfidTraceCallStackOnError,
  57. dfidTraceFileFunc,
  58. dfidTraceMultiLevel,
  59. dfidTraceSource,
  60. dfidTracingTimeStamps,
  61. dfidTrackObjectLeaks
  62. };
  63. // Just for kicks
  64. //
  65. typedef enum DebugFlagId DEBUGFLAGID;
  66. // Maximum sizes for the trace tag elements.
  67. const int c_iMaxDebugFlagShortName = 32;
  68. const int c_iMaxDebugFlagDescription = 128;
  69. // For each element in the debug flag list
  70. //
  71. struct DebugFlagElement
  72. {
  73. DEBUGFLAGID dfid;
  74. CHAR szShortName[c_iMaxDebugFlagShortName+1];
  75. CHAR szDescription[c_iMaxDebugFlagDescription+1];
  76. DWORD dwValue;
  77. };
  78. typedef struct DebugFlagElement DEBUGFLAGELEMENT;
  79. //---[ Externs ]--------------------------------------------------------------
  80. extern DEBUGFLAGELEMENT g_DebugFlags[];
  81. extern const INT g_nDebugFlagCount;
  82. BOOL FIsDebugFlagSet( DEBUGFLAGID dfid );
  83. DWORD DwReturnDebugFlagValue( DEBUGFLAGID dfid );
  84. //+---------------------------------------------------------------------------
  85. //
  86. // !DBG (retail) and !ENABLETRACE build
  87. //
  88. #else
  89. #define FIsDebugFlagSet(dfid) 0
  90. #define DwReturnDebugFlagValue(dfid) 0
  91. #endif //! DBG || ENABLETRACE
  92. #endif // _DBGFLAGS_H_