共用方式為


ICorDebugVariableSymbol::GetValue 方法

將變數的值作為位元組陣列取得。

語法

HRESULT GetValue(
   [in] ULONG32 offset,
   [in] ULONG32 cbContext,
   [in, size_is(cbContext)] BYTE context[],
   [in] ULONG32 cbValue,
   [out] ULONG32 *pcbValue,
   [out, size_is(cbValue), length_is(*pcbValue)] BYTE pValue[]
);

參數

offset [在]變數中要從中讀取值的起始偏移量。 讀取物件中的成員欄位時會使用此參數。

cbContext [在]引數的 context 大小 (以位元組為單位)。

context [在]用來讀取值的執行緒內容。

cbValue [在]緩衝區的 pValue 大小 (以位元組為單位)。

pcbValue [出]實際寫入緩衝區的 pValue 位元組數。

pValue [出]包含變數值的位元組陣列。

備註

備註

此方法僅適用於 .NET 原生。

需求

平台: 請參閱 .NET 支援的作業系統

標題: CorDebug.idl、CorDebug.h

圖書館: CorGuids.lib

.NET 版本: 從 .NET Framework 4.6 開始提供

另請參閱