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.

107 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. };
  62. // Just for kicks
  63. //
  64. typedef enum DebugFlagId DEBUGFLAGID;
  65. // Maximum sizes for the trace tag elements.
  66. const int c_iMaxDebugFlagShortName = 32;
  67. const int c_iMaxDebugFlagDescription = 128;
  68. // For each element in the debug flag list
  69. //
  70. struct DebugFlagElement
  71. {
  72. DEBUGFLAGID dfid;
  73. CHAR szShortName[c_iMaxDebugFlagShortName+1];
  74. CHAR szDescription[c_iMaxDebugFlagDescription+1];
  75. DWORD dwValue;
  76. };
  77. typedef struct DebugFlagElement DEBUGFLAGELEMENT;
  78. //---[ Externs ]--------------------------------------------------------------
  79. extern DEBUGFLAGELEMENT g_DebugFlags[];
  80. extern const INT g_nDebugFlagCount;
  81. BOOL FIsDebugFlagSet( DEBUGFLAGID dfid );
  82. DWORD DwReturnDebugFlagValue( DEBUGFLAGID dfid );
  83. //+---------------------------------------------------------------------------
  84. //
  85. // !DBG (retail) and !ENABLETRACE build
  86. //
  87. #else
  88. #define FIsDebugFlagSet(dfid) 0
  89. #define DwReturnDebugFlagValue(dfid) 0
  90. #endif //! DBG || ENABLETRACE
  91. #endif // _DBGFLAGS_H_