ICorDebugProcess

更新:2007 年 11 月

表示正在执行托管代码的进程。

interface ICorDebugProcess : ICorDebugController {
    HRESULT _stdcall GetID([out] unsigned long* pdwProcessId);
    HRESULT _stdcall GetHandle([out] long* phProcessHandle);
    HRESULT _stdcall GetThread(
                    [in] unsigned long dwThreadId, 
                    [out] ICorDebugThread** ppThread);
    HRESULT _stdcall EnumerateObjects([out] ICorDebugObjectEnum** ppObjects);
    HRESULT _stdcall IsTransitionStub(
                    [in] uint64 address, 
                    [out] long* pbTransitionStub);
    HRESULT _stdcall IsOSSuspended(
                    [in] unsigned long threadID, 
                    [out] long* pbSuspended);
    HRESULT _stdcall GetThreadContext(
                    [in] unsigned long threadID, 
                    [in] unsigned int contextSize, 
                    [in, out] ICorDebugProcess context);
    HRESULT _stdcall SetThreadContext(
                    [in] unsigned long threadID, 
                    [in] unsigned int contextSize, 
                    [in] ICorDebugProcess context);
    HRESULT _stdcall ReadMemory(
                    [in] uint64 address, 
                    [in] unsigned long size, 
                    [out] ICorDebugProcess buffer, 
                    [out] ULONG_PTR* read);
    HRESULT _stdcall WriteMemory(
                    [in] uint64 address, 
                    [in] unsigned long size, 
                    [in] unsigned char* buffer, 
                    [out] ULONG_PTR* written);
    HRESULT _stdcall ClearCurrentException([in] unsigned long threadID);
    HRESULT _stdcall EnableLogMessages([in] long fOnOff);
    HRESULT _stdcall ModifyLogSwitch(
                    [in] unsigned short* pLogSwitchName, 
                    [in] long lLevel);
    HRESULT _stdcall EnumerateAppDomains([out] ICorDebugAppDomainEnum** ppAppDomains);
    HRESULT _stdcall GetObject([out] ICorDebugValue** ppObject);
    HRESULT _stdcall ThreadForFiberCookie(
                    [in] unsigned long fiberCookie, 
                    [out] ICorDebugThread** ppThread);
    HRESULT _stdcall GetHelperThreadID([out] unsigned long* pThreadID);
};

方法

方法

说明

ICorDebugProcess::ClearCurrentException 方法

清除给定线程上的当前非托管异常。

ICorDebugProcess::EnableLogMessages 方法

启用和禁用向调试器发送日志消息。

ICorDebugProcess::EnumerateAppDomains 方法

枚举进程中的所有应用程序域。

ICorDebugProcess::EnumerateObjects 方法

未实现。

ICorDebugProcess::GetHandle 方法

获取进程的句柄。

ICorDebugProcess::GetHelperThreadID 方法

获取调试器内部帮助器线程的操作系统 (OS) 线程 ID。

ICorDebugProcess::GetID 方法

获取进程的操作系统 (OS) ID。

ICorDebugProcess::GetObject 方法

未实现。

ICorDebugProcess::GetThread 方法

获取具有指定的 OS 线程 ID 的 ICorDebugThread 实例。

ICorDebugProcess::GetThreadContext 方法

获取给定线程的上下文。

ICorDebugProcess::IsOSSuspended 方法

确定是否由于调试器停止进程而将线程挂起。

ICorDebugProcess::IsTransitionStub 方法

确定地址是否在将导致向托管代码转换的存根 (stub) 内。

ICorDebugProcess::ModifyLogSwitch 方法

设置指定日志开关的严重级别。

ICorDebugProcess::ReadMemory 方法

从进程中读取内存。

ICorDebugProcess::SetThreadContext 方法

设置给定线程的上下文。

ICorDebugProcess::ThreadForFiberCookie 方法

已否决。

ICorDebugProcess::WriteMemory 方法

向进程中的内存区域中写入数据。

要求

**平台:**请参见 .NET Framework 系统要求

**头文件:**CorDebug.idl

**库:**CorGuids.lib

**.NET Framework 版本:**3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0、1.1、1.0

请参见

参考

ICorDebug

ICorDebugProcess2

其他资源

调试接口