IDebugComPlusSymbolProvider2::IsAddressSequencePoint

确定指定的调试地址是否为序列点。

语法

int IsAddressSequencePoint(
    IDebugAddress pAddress
);

参数

pAddress
[in]由 IDebugAddress 接口表示的调试地址。

返回值

如果调试地址是序列点,则 S_OK返回;否则返回 S_FALSE

示例

以下示例演示如何为公开 IDebugComPlusSymbolProvider2 接口的 CDebugSymbolProvider 对象实现此方法。

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;
}

另请参阅