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.

101 lines
2.4 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. dfidBreakOnAddLegacy = 0,
  34. dfidBreakOnAlloc,
  35. dfidBreakOnDoUnattend,
  36. dfidBreakOnError,
  37. dfidBreakOnHr,
  38. dfidBreakOnHrIteration,
  39. dfidBreakOnIteration,
  40. dfidBreakOnNetInstall,
  41. dfidBreakOnPrematureDllUnload,
  42. dfidBreakOnWizard,
  43. dfidBreakOnStartOfUpgrade,
  44. dfidBreakOnEndOfUpgrade,
  45. dfidDisableShellThreading,
  46. dfidDisableTray,
  47. dfidExtremeTracing,
  48. dfidNetShellBreakOnInit,
  49. dfidNoErrorText,
  50. dfidShowIgnoredErrors,
  51. dfidShowProcessAndThreadIds,
  52. dfidSkipLanEnum,
  53. dfidTracingTimeStamps,
  54. dfidShowIdsInHex
  55. };
  56. // Just for kicks
  57. //
  58. typedef enum DebugFlagId DEBUGFLAGID;
  59. // Maximum sizes for the trace tag elements.
  60. const int c_iMaxDebugFlagShortName = 32;
  61. const int c_iMaxDebugFlagDescription = 128;
  62. // For each element in the debug flag list
  63. //
  64. struct DebugFlagElement
  65. {
  66. DEBUGFLAGID dfid;
  67. CHAR szShortName[c_iMaxDebugFlagShortName+1];
  68. CHAR szDescription[c_iMaxDebugFlagDescription+1];
  69. DWORD dwValue;
  70. };
  71. typedef struct DebugFlagElement DEBUGFLAGELEMENT;
  72. //---[ Externs ]--------------------------------------------------------------
  73. extern DEBUGFLAGELEMENT g_DebugFlags[];
  74. extern const INT g_nDebugFlagCount;
  75. BOOL FIsDebugFlagSet( DEBUGFLAGID dfid );
  76. DWORD DwReturnDebugFlagValue( DEBUGFLAGID dfid );
  77. //+---------------------------------------------------------------------------
  78. //
  79. // !DBG (retail) and !ENABLETRACE build
  80. //
  81. #else
  82. #define FIsDebugFlagSet(dfid) 0
  83. #define DwReturnDebugFlagValue(dfid) 0
  84. #endif //! DBG || ENABLETRACE
  85. #endif // _DBGFLAGS_H_