コード例 #1
0
        // EnumThreads is called by the debugger when it needs to enumerate the threads in the program.
        public int EnumThreads(out IEnumDebugThreads2 ppEnum)
        {
            Debug.Assert(Worker.MainThreadId == Worker.CurrentThreadId);

            DebuggedThread[] threads = m_debuggedProcess.GetThreads();

            AD7Thread[] threadObjects = new AD7Thread[threads.Length];
            for (int i = 0; i < threads.Length; i++)
            {
                Debug.Assert(threads[i].Client != null);
                threadObjects[i] = (AD7Thread)threads[i].Client;
            }

            ppEnum = new Microsoft.VisualStudio.Debugger.SampleEngine.AD7ThreadEnum(threadObjects);

            return(Constants.S_OK);
        }
コード例 #2
0
ファイル: AD7Engine.cs プロジェクト: modulexcite/NPL
        // EnumThreads is called by the debugger when it needs to enumerate the threads in the program.
        public int EnumThreads(out IEnumDebugThreads2 ppEnum)
        {
            Debug.Assert(Worker.MainThreadId == Worker.CurrentThreadId);

            DebuggedThread[] threads = m_debuggedProcess.GetThreads();

            AD7Thread[] threadObjects = new AD7Thread[threads.Length];
            for (int i = 0; i < threads.Length; i++)
            {
                Debug.Assert(threads[i].Client != null);
                threadObjects[i] = (AD7Thread)threads[i].Client;
            }

            ppEnum = new Microsoft.VisualStudio.Debugger.SampleEngine.AD7ThreadEnum(threadObjects);

            return Constants.S_OK;
        }