Catatan
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba masuk atau mengubah direktori.
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba mengubah direktori.
Mengambil informasi jenis tentang array yang ditentukan mengingat alamat debugnya.
Sintaks
int GetArrayTypeFromAddress(
IDebugAddress pAddress,
int[] pSig,
uint dwSigLength,
out IDebugField ppField
);
Parameter
pAddress
[di] Alamat debug yang diwakili oleh antarmuka IDebugAddress .
pSig
[di] Array yang akan diperiksa.
dwSigLength
[di] Panjang dalam byte pSig array.
ppField
[out] Mengembalikan jenis array seperti yang diwakili oleh antarmuka IDebugClassField .
Tampilkan Nilai
Jika berhasil, mengembalikan S_OK; jika tidak, mengembalikan kode galat.
Contoh
Contoh berikut menunjukkan cara menerapkan metode ini untuk objek CDebugSymbolProvider yang mengekspos antarmuka IDebugComPlusSymbolProvider .
HRESULT CDebugSymbolProvider::GetArrayTypeFromAddress(
IDebugAddress *pAddress,
BYTE *pSig,
DWORD dwSigLength,
IDebugField **ppField)
{
HRESULT hr = E_FAIL;
CDEBUG_ADDRESS da;
CDebugGenericParamScope* pGenScope = NULL;
METHOD_ENTRY( CDebugDynamicFieldSymbol::GetArrayTypeFromAddress );
ASSERT(IsValidObjectPtr(this, CDebugSymbolProvider));
ASSERT(IsValidWritePtr(ppField, IDebugField*));
IfFailGo( pAddress->GetAddress(&da) );
if ( S_OK == hr )
{
IfNullGo( pGenScope = new CDebugGenericParamScope(da.GetModule(), da.tokClass, da.GetMethod()), E_OUTOFMEMORY );
IfFailGo( this->CreateType((const COR_SIGNATURE*)(pSig), dwSigLength, da.GetModule(), mdMethodDefNil, pGenScope, ppField) );
}
Error:
METHOD_EXIT( CDebugDynamicFieldSymbol::GetArrayTypeFromAddress, hr );
RELEASE( pGenScope );
return hr;
}