ICorDebugDataTarget 介面ICorDebugDataTarget Interface

提供回呼介面,該介面可供存取特定的目標處理序。Provides a callback interface that provides access to a particular target process.


方法Method 描述Description
GetPlatform 方法GetPlatform Method 提供目標進程執行所在平臺的相關資訊,包括處理器架構和作業系統。Provides information about the platform, including processor architecture and operating system, on which the target process is running.
ReadVirtual 方法ReadVirtual Method 從指定的位址開始,取得連續記憶體的區塊,並在提供的緩衝區中傳回。Gets a block of contiguous memory starting at the specified address, and returns it in the supplied buffer.
GetThreadContext 方法GetThreadContext Method 要求指定執行緒目前的執行緒內容。Requests the current thread context for the specified thread.


ICorDebugDataTarget 而且其方法具有下列特性:ICorDebugDataTarget and its methods have the following characteristics:

  • 偵錯工具服務會呼叫這個介面上的方法,以存取目標進程中的記憶體和其他資料。The debugging services call methods on this interface to access memory and other data in the target process.

  • 偵錯工具用戶端必須適當地執行此介面,以適用于特定目標 (例如,即時進程或記憶體傾印) 。The debugger client must implement this interface as appropriate for the particular target (for example, a live process or a memory dump).

  • 您只能 ICorDebugDataTarget 從在其他介面中執行的方法內叫用方法 ICorDebug*The ICorDebugDataTarget methods can be invoked only from within methods implemented in other ICorDebug* interfaces. 這可確保偵錯工具用戶端可以控制叫用的執行緒,以及時機。This ensures that the debugger client has control over which thread it is invoked on, and when.

  • ICorDebugDataTarget執行必須一律傳回最新的目標資訊。The ICorDebugDataTarget implementation must always return up-to-date information about the target.

ICorDebug* 介面 (以及呼叫) 的方法時,目標進程應以任何方式停止且不會變更 ICorDebugDataTargetThe target process should be stopped and not changed in any way while ICorDebug* interfaces (and therefore ICorDebugDataTarget methods) are being called. 如果目標是即時進程且其狀態變更,則必須再次呼叫 ICLRDebugging:: OpenVirtualProcess 方法,以提供取代的 ICorDebugProcess 實例。If the target is a live process and its state changes, the ICLRDebugging::OpenVirtualProcess method has to be called again to provide a replacement ICorDebugProcess instance.


這個介面不支援跨電腦或跨處理序的遠端呼叫。This interface does not support being called remotely, either cross-machine or cross-process.


平台: 請參閱 系統需求Platforms: See System Requirements.

標頭: CorDebug.idl、CorDebug.hHeader: CorDebug.idl, CorDebug.h

程式庫: CorGuids.libLibrary: CorGuids.lib

.NET Framework 版本:自 4 起可用Available since 4.NET Framework Versions: 自 4 起可用Available since 4

另請參閱See also