//
        // IEnumerator interface
        //

        #region IEnumerator Members

        public bool MoveNext()
        {
            var a = new ICorDebugProcess[1];
            uint c = 0;
            int r = m_enum.Next((uint) a.Length, a, out c);
            if (r == 0 && c == 1) // S_OK && we got 1 new element
                m_proc = CorProcess.GetCorProcess(a[0]);
            else
                m_proc = null;
            return m_proc != null;
        }
 public CorAppDomainEventArgs(CorProcess process, CorAppDomain ad,
                              ManagedCallbackType callbackType)
     : base(process, callbackType)
 {
     m_ad = ad;
 }
 public CorAppDomainEventArgs(CorProcess process, CorAppDomain ad)
     : base(process)
 {
     m_ad = ad;
 }
 public CorProcessEventArgs(CorProcess process, ManagedCallbackType callbackType)
     : base(process, callbackType)
 {
 }
 public CorProcessEventArgs(CorProcess process)
     : base(process)
 {
 }
 public CorMDAEventArgs(CorMDA mda, CorThread thread, CorProcess proc,
                        ManagedCallbackType callbackType)
     : base(proc, callbackType)
 {
     m_mda = mda;
     Thread = thread;
     //m_proc = proc;
 }
 public CorMDAEventArgs(CorMDA mda, CorThread thread, CorProcess proc)
     : base(proc)
 {
     m_mda = mda;
     Thread = thread;
     //m_proc = proc;
 }
 public CorDebuggerErrorEventArgs(CorProcess process, int hresult,
                                  int errorCode, ManagedCallbackType callbackType)
     : base(process, callbackType)
 {
     m_hresult = hresult;
     m_errorCode = errorCode;
 }
 public CorDebuggerErrorEventArgs(CorProcess process, int hresult,
                                  int errorCode)
     : base(process)
 {
     m_hresult = hresult;
     m_errorCode = errorCode;
 }
 public static CorProcess GetCorProcess(ICorDebugProcess process)
 {
     Debug.Assert(process != null);
     lock (m_instances)
     {
         if (!m_instances.Contains(process))
         {
             var p = new CorProcess(process);
             m_instances.Add(process, p);
             return p;
         }
         return (CorProcess) m_instances[process];
     }
 }
 public void Reset()
 {
     m_enum.Reset();
     m_proc = null;
 }