IDebugExpressionEvaluator2::SetCallback

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Enables the expression evaluator (EE) to specify the callback interface that the debugger engine (DE) will use to read metric settings.

Syntax

HRESULT SetCallback (  
   IDebugSettingsCallback2* pCallback  
);  
int SetCallback (  
   IDebugSettingsCallback2 pCallback  
);  

Parameters

pCallback
[in] Interface to use for the settings callback.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

This method provides an interface to the session debug manager that an expression evaluator can use to read metric settings. It is useful in remote debugging to read metrics on the Visual Studio computer.

Example

The following examples shows how to implement this method for a CEE object that exposes the IDebugSettingsCallback2 interface.

HRESULT CEE::SetCallback(IDebugSettingsCallback2* in_pCallback)  
{  
    // precondition  
    INVARIANT( this );  
  
    // function body  
    if (NULL != this->m_LanguageSpecificUseCases.pfSetCallback)  
    {  
        EEDomain::fSetCallback DomainVal =  
        {  
            in_pCallback  
        };  
  
        BOOL bSuccess = (*this->m_LanguageSpecificUseCases.pfSetCallback)(DomainVal);  
        ENSURE( bSuccess );  
    }  
  
    // postcondition  
    INVARIANT( this );  
  
    return S_OK;  
}  

See Also

IDebugExpressionEvaluator2