Пример #1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public override int GetLanguageInfo(ref string languageName, ref Guid languageGuid)
        {
            //
            // Gets the language associated with this stack frame.
            //

            LoggingUtils.PrintFunction();

            try
            {
                IDebugDocumentContext2 documentContext;

                languageGuid = DebugEngineGuids.guidLanguageUnknown;

                languageName = DebugEngineGuids.GetLanguageName(languageGuid);

                LoggingUtils.RequireOk(GetDocumentContext(out documentContext));

                if (documentContext != null)
                {
                    LoggingUtils.RequireOk(documentContext.GetLanguageInfo(ref languageName, ref languageGuid));
                }

                return(Constants.S_OK);
            }
            catch (Exception e)
            {
                LoggingUtils.HandleException(e);

                return(Constants.E_FAIL);
            }
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public int GetLanguageInfo(ref string languageName, ref Guid languageGuid)
        {
            //
            // Gets the language associated with this document context.
            //

            LoggingUtils.PrintFunction();

            languageGuid = DebugEngineGuids.guidLanguageCpp;

            languageName = DebugEngineGuids.GetLanguageName(languageGuid);

            return(Constants.S_OK);
        }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public int GetEngineInfo (out string pbstrEngine, out Guid pguidEngine)
    {
      // 
      // Gets the name and identifier of the debug engine (DE) running a program.
      // 

      LoggingUtils.PrintFunction ();

      pguidEngine = DebugEngineGuids.guidDebugEngineID;

      pbstrEngine = DebugEngineGuids.GetEngineNameFromId (pguidEngine);

      return Constants.S_OK;
    }