home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples1.exe / Debugger / cordbpriv.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  3.6 KB  |  107 lines

  1. /* ------------------------------------------------------------------------- *
  2.  * cordbpriv.h -- header file for private Debugger data shared by various
  3.  *                Runtime components.
  4.  * ------------------------------------------------------------------------- */
  5.  
  6. #ifndef _cordbpriv_h_
  7. #define _cordbpriv_h_
  8.  
  9. #include "corhdr.h"
  10.  
  11. //
  12. // Environment variable used to control the Runtime's debugging modes.
  13. // This is PURELY FOR INTERNAL, NONSHIPPING USAGE!! (ie, for the test team)
  14. //
  15. #define CorDB_CONTROL_ENV_VAR_NAME      "Cor_Debugging_Control_424242"
  16. #define CorDB_CONTROL_ENV_VAR_NAMEL    L"Cor_Debugging_Control_424242"
  17.  
  18. // @todo Instead of an environment variable, we should
  19. // pass this information through via CreateProcess.....
  20. #define CorDB_CONTROL_EditAndContinue   "Cor_Enable_EditAndContinue"
  21. #define CorDB_CONTROL_EditAndContinueL L"Cor_Enable_EditAndContinue"
  22.  
  23. //
  24. // Environment variable used to controll the Runtime's debugging modes.
  25. //
  26. #define CorDB_REG_KEY           L"Software\\Microsoft\\COMPlus\\"
  27. #define CorDB_REG_DEBUGGER_KEY  L"DbgManagedDebugger"
  28. #define CorDB_REG_QUESTION_KEY  L"DbgJITDebugLaunchSetting"
  29.  
  30. #define CorDB_QUESTION_ENV_VAR_NAME   "CORDBG_DbgJITDebugLaunchSetting"
  31. #define CorDB_QUESTION_ENV_VAR_NAMEL L"CORDBG_DbgJITDebugLaunchSetting"
  32.  
  33. #define CorDB_DONT_CHANGE_ERROR_MODE L"DontSetErrorMode"
  34.  
  35. //
  36. // Flags used to control the Runtime's debugging modes. These indicate to
  37. // the Runtime that it needs to load the Runtime Controller, track data
  38. // during JIT's, etc.
  39. //
  40. enum DebuggerControlFlag
  41. {
  42.     DBCF_NORMAL_OPERATION            = 0x0000,
  43.  
  44.     DBCF_USER_MASK                    = 0x00FF,
  45.     DBCF_GENERATE_DEBUG_CODE        = 0x0001,
  46.     DBCF_AMBIVALENTS_CARE           = 0x0002,
  47.     DBCF_ALLOW_JIT_OPT                = 0x0008,
  48.     DBCF_EDIT_AND_CONTINUE            = 0x0010,
  49.     DBCF_PROFILER_ENABLED            = 0x0020,
  50.     DBCF_ACTIVATE_REMOTE_DEBUGGING    = 0x0040,
  51.  
  52.     DBCF_INTERNAL_MASK                = 0xFF00,
  53.     DBCF_ATTACHED                    = 0x0200
  54. };
  55.  
  56. //
  57. // Flags used to control the debuggable state of modules and
  58. // assemblies.
  59. //
  60. enum DebuggerAssemblyControlFlags
  61. {
  62.     DACF_NONE                       = 0x00,
  63.     DACF_USER_OVERRIDE              = 0x01,
  64.     DACF_ALLOW_JIT_OPTS             = 0x02,
  65.     DACF_TRACK_JIT_INFO             = 0x04,
  66.     DACF_AMBIVALENT                 = 0x08,
  67.     DACF_CONTROL_FLAGS_MASK         = 0x0F,
  68.  
  69.     DACF_PDBS_COPIED                = 0x10,
  70.     DACF_MISC_FLAGS_MASK            = 0x10,
  71. };
  72.  
  73.  
  74. // {74860182-3295-4954-8BD5-40B5C9E7C4EA}
  75. extern const GUID __declspec(selectany) IID_ICorDBPrivHelper =
  76.     {0x74860182,0x3295,0x4954,{0x8b,0xd5,0x40,0xb5,0xc9,0xe7,0xc4,0xea}};
  77.  
  78. /*
  79.  * This class is used to help the debugger get a COM interface pointer to
  80.  * a newly created managed object.
  81.  */
  82. class ICorDBPrivHelper : public IUnknown
  83. {
  84. public:
  85.     ///////////////////////////////////////////////////////////////////////////
  86.     // ICorDBPrivHelper methods
  87.  
  88.     // This is the main method of this interface.  This assumes that
  89.     // the runtime has been started, and it will load the assembly
  90.     // specified, load the class specified, run the cctor, create an
  91.     // instance of the class and return an IUnknown wrapper to that
  92.     // object.
  93.     virtual HRESULT STDMETHODCALLTYPE CreateManagedObject(
  94.         /*in*/  WCHAR *wszAssemblyName,
  95.         /*in*/  WCHAR *wszModuleName,
  96.         /*in*/  mdTypeDef classToken,
  97.         /*in*/  void *rawData,
  98.         /*out*/ IUnknown **ppUnk) = 0;
  99.  
  100.     virtual HRESULT STDMETHODCALLTYPE GetManagedObjectContents(
  101.         /* in */ IUnknown *pObject,
  102.         /* in */ void *rawData,
  103.         /* in */ ULONG32 dataSize) = 0;
  104. };
  105.  
  106. #endif /* _cordbpriv_h_ */
  107.