Share via


IDebugMemoryContext2

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. 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

This interface represents a position in the address space of the machine running the program being debugged.

Syntax

IDebugMemoryContext2 : IUnknown

Notes for Implementers

The debug engine (DE) implements this interface to represent an address in memory.

Notes for Callers

A call to GetMemoryContext or GetMemoryContext returns this interface. Also, calls to Add and Subtract return new copies of this interface after the appropriate arithmetic operation has been applied.

Methods in Vtable Order

The following table shows the methods of IDebugMemoryContext2.

Method Description
GetName Gets the user-displayable name for this context.
GetInfo Gets information that describes this context.
Add Adds a specified value to the current context's address to create a new context.
Subtract Subtracts a specified value from the current context's address to create a new context.
Compare Compares two contexts in the manner indicated by compare flags.

Remarks

Visual Studio's Memory window calls GetMemoryContext to obtain the IDebugMemoryContext2 interface that contains the evaluated expression used for the memory address. This context is then passed to ReadAt and WriteAt to specify the address to read or write.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See also