This class is used only when the user wants to Attach to a running process and it implements: - IDebugProgramNode2. (http://msdn.microsoft.com/en-ca/library/bb146735.aspx) - and IDebugProgram2. (http://msdn.microsoft.com/en-us/library/bb147004.aspx) The Debug Engine does not use this class. It uses AD7ProgramNode.cs. This class is used only to represent each of the running processes that can be attached to the debug engine. When the debug engine attaches to a running process, an AD7ProgramNode class is used to represent the chosen running program. That's why some methods were not implemented. This interface represents a program that can be debugged. A running process is viewed as a ProgramNode by VS. A debug engine (DE) or a custom port supplier implements this interface to represent a program that can be debugged.
상속: IDebugProgramNode2, IDebugProgram2
예제 #1
0
        /// <summary>
        /// Retrieves a list of all the programs contained by this process.
        /// (http://msdn.microsoft.com/en-us/library/bb162305.aspx)
        /// </summary>
        /// <param name="ppEnum"> Returns an IEnumDebugPrograms2 object that contains a list of all the programs in the process. </param>
        /// <returns> VSConstants.S_OK. </returns>
        public int EnumPrograms(out IEnumDebugPrograms2 ppEnum)
        {
            if (m_listOfPrograms.Count == 0)
            {
                AD7ProgramNodeAttach pn = new AD7ProgramNodeAttach(this, new Guid("{E5A37609-2F43-4830-AA85-D94CFA035DD2}"));
                m_listOfPrograms.Add((IDebugProgram2)pn);
            }
            IDebugProgram2[] p = new IDebugProgram2[m_listOfPrograms.Count()];
            int i = 0;

            foreach (var prog in m_listOfPrograms)
            {
                p[i] = prog;
                i++;
            }
            ppEnum = new AD7ProgramEnum(p);
            return(VSConstants.S_OK);
        }
예제 #2
0
 /// <summary>
 /// Retrieves a list of all the programs contained by this process.
 /// (http://msdn.microsoft.com/en-us/library/bb162305.aspx)
 /// </summary>
 /// <param name="ppEnum"> Returns an IEnumDebugPrograms2 object that contains a list of all the programs in the process. </param>
 /// <returns> VSConstants.S_OK. </returns>
 public int EnumPrograms(out IEnumDebugPrograms2 ppEnum)
 {
     if (m_listOfPrograms.Count == 0)
     {
         AD7ProgramNodeAttach pn = new AD7ProgramNodeAttach(this, new Guid("{E5A37609-2F43-4830-AA85-D94CFA035DD2}"));
         m_listOfPrograms.Add((IDebugProgram2)pn);
     }
     IDebugProgram2[] p = new IDebugProgram2[m_listOfPrograms.Count()];
     int i = 0;
     foreach (var prog in m_listOfPrograms)
     {
         p[i] = prog;
         i++;
     }
     ppEnum = new AD7ProgramEnum(p);
     return VSConstants.S_OK;
 }