Question

Suite à cette question maintenant je ont un code qui peut attacher à un processus en utilisant l'API MDBG.

Le problème est que je ne peux pas détacher du processus si je dois. Quand j'appelle mgProcess.Detach () WaitOne (); (où mgProcess est un MDbgProcess créé à partir d'un objet MDbgEngine) Je reçois le message d'erreur suivant:.

 Process not synchronized. (Exception from HRESULT: 0x80131302)
     at Microsoft.Samples.Debugging.CorDebug.NativeApi.ICorDebugController.Detach()
     at Microsoft.Samples.Debugging.CorDebug.CorController.Detach() in C:\mdbg\src\debugger\corapi\Controller.cs:line 89
     at Microsoft.Samples.Debugging.MdbgEngine.MDbgProcess.Detach() in C:\mdbg\src\debugger\mdbgeng\Process.cs:line 716

Si j'essaie juste d'appeler mgProcess.Detach () ou mgProcess.CorProcess.Detach () Je reçois le même résultat.

Quelqu'un sait la bonne façon de détacher un processus MDBG?

Était-ce utile?
scroll top