IDebugComPlusSymbolProvider2::IsAddressSequencePointIDebugComPlusSymbolProvider2::IsAddressSequencePoint

Détermine si l’adresse de débogage spécifié est un point de séquence.Determines if the specified debug address is a sequence point.

SyntaxeSyntax

HRESULT IsAddressSequencePoint(  
   IDebugAddress* pAddress  
);  
int IsAddressSequencePoint(  
   IDebugAddress pAddress  
);  

ParamètresParameters

pAddress
[in] Débogage d’adresse qui est représenté par le IDebugAddress interface.[in] Debug address that is represented by the IDebugAddress interface.

Valeur de retourReturn Value

Si l’adresse de débogage est un point de séquence, retourne S_OK; sinon, retourne S_FALSE.If the debug address is a sequence point, returns S_OK; otherwise, returns S_FALSE.

ExempleExample

L’exemple suivant montre comment implémenter cette méthode pour un CDebugSymbolProvider objet qui expose la IDebugComPlusSymbolProvider2 interface.The following example shows how to implement this method for a CDebugSymbolProvider object that exposes the IDebugComPlusSymbolProvider2 interface.

HRESULT CDebugSymbolProvider::IsAddressSequencePoint(  
    IDebugAddress* pAddress  
)  
{  
    HRESULT hr = S_OK;  
    CDEBUG_ADDRESS address;  
    CComPtr<CModule> pModule;  

    METHOD_ENTRY( CDebugSymbolProvider::LoadSymbol );  

    IfFalseGo( pAddress, E_INVALIDARG );  

    IfFailGo( pAddress->GetAddress( &address ) );  

    ASSERT(address.addr.dwKind == ADDRESS_KIND_METADATA_METHOD);  
    IfFalseGo( address.addr.dwKind == ADDRESS_KIND_METADATA_METHOD, S_FALSE );  

    IfFailGo( GetModule( address.GetModule(), &pModule) );  

    if (!pModule->IsSequencePoint( address.addr.addr.addrMethod.tokMethod,  
                                   address.addr.addr.addrMethod.dwVersion,  
                                   address.addr.addr.addrMethod.dwOffset ))  
    {  

        // S_FALSE indicates this is not a sequence point  

        hr = S_FALSE;  
    }  

Error:  

    METHOD_EXIT( CDebugSymbolProvider::LoadSymbol, hr );  

    return hr;  
}  

Voir aussiSee Also

IDebugComPlusSymbolProvider2IDebugComPlusSymbolProvider2