IDebugComPlusSymbolProvider::IsHiddenCodeIDebugComPlusSymbolProvider::IsHiddenCode

Determina se o código no endereço depurador especificado está oculto.Determines if the code at the specified debugger address is hidden.

SintaxeSyntax

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

ParâmetrosParameters

pAddress
[in] O endereço de depuração que é representado por um IDebugAddress interface.[in] The debug address that is represented by an IDebugAddress interface.

Valor de retornoReturn Value

Retorna se o código estiver oculto, S_OK; caso contrário, retorna S_FALSE.If the code is hidden, returns S_OK; otherwise, returns S_FALSE.

ExemploExample

O exemplo a seguir mostra como implementar esse método para um CDebugSymbolProvider objeto que expõe o IDebugComPlusSymbolProvider interface.The following example shows how to implement this method for a CDebugSymbolProvider object that exposes the IDebugComPlusSymbolProvider interface.

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

    ASSERT(IsValidObjectPtr(this, CDebugSymbolProvider));  
    ASSERT(IsValidInterfacePtr(pAddress, IDebugAddress));  

    METHOD_ENTRY( CDebugSymbolProvider::IsHiddenCode );  

    IfFalseGo( pAddress, S_FALSE );  
    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->IsHiddenCode( address.addr.addr.addrMethod.tokMethod,  
                                address.addr.addr.addrMethod.dwVersion,  
                                address.addr.addr.addrMethod.dwOffset ))  
    {  

        // S_FALSE indicates this sequence point is not hidden  

        hr = S_FALSE;  
    }  

Error:  

    METHOD_EXIT( CDebugSymbolProvider::IsHiddenCode, hr );  

    if (!SUCCEEDED(hr))  
    {  
        hr = S_FALSE;  
    }  

    return hr;  
}  

Consulte tambémSee Also

IDebugComPlusSymbolProviderIDebugComPlusSymbolProvider