Skip to content

Delete unnecessary spaces #2689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,70 @@
title: "IDebugExpressionEvaluator2::SetCallback | Microsoft Docs"
ms.date: "11/04/2016"
ms.topic: "conceptual"
helpviewer_keywords:
helpviewer_keywords:
- "IDebugExpressionEvaluator2::SetCallback"
- "SetCallback"
ms.assetid: 31e3a99e-e784-44a3-8b19-cc5ef31ed546
author: "gregvanl"
ms.author: "gregvanl"
manager: jillfra
ms.workload:
ms.workload:
- "vssdk"
---
# IDebugExpressionEvaluator2::SetCallback
Enables the expression evaluator (EE) to specify the callback interface that the debugger engine (DE) will use to read metric settings.
## Syntax
```cpp
HRESULT SetCallback (
IDebugSettingsCallback2* pCallback
);
```
```csharp
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 [!INCLUDE[vsprvs](../../../code-quality/includes/vsprvs_md.md)] computer.
## Example
The following examples shows how to implement this method for a **CEE** object that exposes the [IDebugSettingsCallback2](../../../extensibility/debugger/reference/idebugsettingscallback2.md) interface.
```cpp
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](../../../extensibility/debugger/reference/idebugexpressionevaluator2.md)
Enables the expression evaluator (EE) to specify the callback interface that the debugger engine (DE) will use to read metric settings.

## Syntax

```cpp
HRESULT SetCallback (
IDebugSettingsCallback2* pCallback
);
```

```csharp
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 [!INCLUDE[vsprvs](../../../code-quality/includes/vsprvs_md.md)] computer.

## Example
The following examples shows how to implement this method for a **CEE** object that exposes the [IDebugSettingsCallback2](../../../extensibility/debugger/reference/idebugsettingscallback2.md) interface.

```cpp
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](../../../extensibility/debugger/reference/idebugexpressionevaluator2.md)