I'm using MdbgProcess
and MdbgEngine
to write information to an XML file like the application version, process id, time, threads, etc. I have the following code:
MDbgProcess mdbgProcess = null;
try
{
MDbgEngine debugger = new MDbgEngine();
debugger.Options.StopOnExceptionEnhanced = true;
mdbgProcess = debugger.Attach(info.ProcessID);
mdbgProcess.Go().WaitOne();
}
catch(Exception e)
{
}
But when I try to execute this line: mdbgProcess = debugger.Attach(info.ProcessID);
, I'm getting this exception: COMException: This process has already been attached. (Exception from HRESULT: 0x8013132E)
.
Can somebody tell me how to fix this?
User contributions licensed under CC BY-SA 3.0