IDiaSectionContrib
Récupère des données décrivant une contribution de section, c’est-à-dire un bloc de mémoire contigu qui a contribué à l’image par un compiland.
Syntaxe
IDiaSectionContrib : IUnknown
Méthodes dans l'ordre Vtable
Le tableau suivant présente les méthodes de IDiaSectionContrib
.
Méthode | Description |
---|---|
IDiaSectionContrib::get_compiland | Récupère une référence au symbole compiland qui a contribué à cette section. |
IDiaSectionContrib::get_addressSection | Récupère la partie section de l’adresse de la contribution. |
IDiaSectionContrib::get_addressOffset | Récupère la partie décalage de l’adresse de la contribution. |
IDiaSectionContrib::get_relativeVirtualAddress | Récupère l’adresse virtuelle relative (RVA) de la contribution. |
IDiaSectionContrib::get_virtualAddress | Récupère l’adresse virtuelle de la contribution. |
IDiaSectionContrib::get_length | Récupère le nombre d’octets dans une section. |
IDiaSectionContrib::get_notPaged | Récupère un indicateur spécifiant si la section ne peut pas être transférée hors de la mémoire. |
IDiaSectionContrib::get_nopad | Récupère un indicateur spécifiant si la section ne doit pas être remplie jusqu’à la limite de mémoire suivante. |
IDiaSectionContrib::get_code | Récupère un indicateur spécifiant si la section contient du code exécutable. |
IDiaSectionContrib::get_code16bit | Récupère un indicateur spécifiant si la section contient du code 16 bits. |
IDiaSectionContrib::get_initializedData | Récupère un indicateur spécifiant si la section contient des données initialisées. |
IDiaSectionContrib::get_uninitializedData | Récupère un indicateur spécifiant si la section contient des données non initialisées. |
IDiaSectionContrib::get_informational | Récupère un indicateur spécifiant si une section contient des commentaires ou des informations similaires. |
IDiaSectionContrib::get_remove | Récupère un indicateur spécifiant si la section est supprimée avant de faire partie de l’image en mémoire. |
IDiaSectionContrib::get_comdat | Récupère un indicateur spécifiant si la section est un enregistrement COMDAT. |
IDiaSectionContrib::get_discardable | Récupère un indicateur spécifiant si la section peut être ignorée. |
IDiaSectionContrib::get_notCached | Récupère un indicateur spécifiant si la section ne peut pas être mise en cache. |
IDiaSectionContrib::get_share | Récupère un indicateur spécifiant si la section peut être partagée en mémoire. |
IDiaSectionContrib::get_execute | Récupère un indicateur spécifiant si la section est exécutable comme code. |
IDiaSectionContrib::get_read | Récupère un indicateur spécifiant si la section peut être lue. |
IDiaSectionContrib::get_write | Récupère un indicateur spécifiant si la section peut être écrite. |
IDiaSectionContrib::get_dataCrc | Récupère le contrôle de redondance cyclique (CRC) des données de la section. |
IDiaSectionContrib::get_relocationsCrc | Récupère le CRC des informations de déplacement pour la section. |
IDiaLineNumber::get_compilandId | Récupère l’identificateur de compiland de la section. |
Notes
Remarques pour les appelants
Cette interface est obtenue par un appel des méthodes IDiaEnumSectionContribs::Item et IDiaEnumSectionContribs::Next. Consultez l’interface IDiaEnumSectionContribs pour voir un exemple d’obtention de l’interface IDiaSectionContrib
.
Exemple
Cette fonction affiche l’adresse de chaque section ainsi que tous les symboles associés. Consultez l’interface IDiaEnumSectionContribs pour voir comment l’interface IDiaSectionContrib
est obtenue.
void PrintSectionContrib(IDiaSectionContrib* pSecContrib, IDiaSession* pSession)
{
if (pSecContrib != NULL && pSession != NULL)
{
DWORD rva;
if ( pSecContrib->get_relativeVirtualAddress( &rva ) == S_OK )
{
printf( "\taddr: 0x%.8X", rva );
pSecContrib = NULL;
CComPtr<IDiaSymbol> pSym;
if ( psession->findSymbolByRVA( rva, SymTagNull, &pSym ) == S_OK )
{
CDiaBSTR name;
DWORD tag;
pSym->get_symTag( &tag );
pSym->get_name( &name );
printf( " symbol: %ws (%ws)\n",
name != NULL ? name : L"",
szTags[ tag ] );
}
else
{
printf( "<no symbol found?>\n" );
}
}
else
{
DWORD isect;
DWORD offset;
pSecContrib->get_addressSection( &isect );
pSecContrib->get_addressOffset( &offset );
printf( "\taddr: 0x%.4X:0x%.8X", isect, offset );
pSecContrib = NULL;
CComPtr<IDiaSymbol> pSym;
if ( SUCCEEDED( psession->findSymbolByAddr(
isect,
offset,
SymTagNull,
&pSym )
)
)
{
CDiaBSTR name;
DWORD tag;
pSym->get_symTag( &tag );
pSym->get_name( &name );
printf( " symbol: %ws (%ws)\n",
name != NULL ? name : L"",
szTags[ tag ] );
}
else
{
printf( "<no symbol found?>\n" );
}
}
}
}
Configuration requise
En-tête : Dia2.h
Bibliothèque : diaguids.lib
DLL : msdia80.dll
Voir aussi
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour