none
Mdbg kill a process RRS feed

  • Question

  • The following code

    if (_debugger.Processes.HaveActive)
    {
     _debugger.Processes.Active.Kill();
    }

    throw an excption:

    Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Samples.Debugging.CorDebug.NativeApi.ICorDebugController'.
    This operation failed because the QueryInterface call on the COM component for the interface with IID
    '{3D6F5F62-7538-11D3-8D5B-00104B35E7EF}' failed due to the following error:
    No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).


    • Edited by James Z Wang Wednesday, October 9, 2013 7:55 PM
    • Moved by Amanda Zhu Thursday, October 10, 2013 7:40 AM
    Wednesday, October 9, 2013 7:55 PM

Answers

All replies

  • Hello,

    I have moved this thread to .NET Framework Class Libraries forum for better response.

    Thanks,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 10, 2013 7:40 AM
  • Hi James,

    Maybe you can have a look at the thread with similar issue.

    http://stackoverflow.com/questions/9788135/exception-from-hresult-0x80004002-e-nointerface

    "Remove all GUIDs and "ComVisible" attributes from the class,  then switch the [assembly: ComVisible(true)] attribute in the AssemblyInfo-File to 'true'."

    Or

    "mark the main class [STAThread] and your problem will be solved"


    If my posting is the answer that what you need, please mark as answer.Thanks.

    Friday, October 11, 2013 1:48 AM