Compartir a través de


IDebugMemoryBytes2

This interface represents bytes of memory.

IDebugMemoryBytes2 : IUnknown

Notes for Implementers

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

Notes for Callers

IDebugProgram2::GetMemoryBytes returns this interface to provide access to system memory. IDebugProperty2::GetMemoryBytes and IDebugReference2::GetMemoryBytes return this interface to provide access to an object's bytes.

Methods in Vtable Order

The following table shows the methods of IDebugMemoryBytes2.

Method

Description

IDebugMemoryBytes2::ReadAt

Reads a sequence of bytes, starting at a given location.

IDebugMemoryBytes2::WriteAt

Writes dwCount bytes, starting at pStartContext.

IDebugMemoryBytes2::GetSize

Gets the size, in bytes, of the memory represented by this interface.

Remarks

For properties, an IDebugProperty2 interface representing an array provides an IDebugMemoryBytes2 interface to access the values in that array.

Visual Studio's Memory View calls IDebugProgram2::GetMemoryBytes to retrieve an IDebugMemoryBytes2 interface for accessing system memory. The address to be accessed is obtained by parsing the expression entered as an address into the Memory View and then evaluating the parsed expression using IDebugExpression2::EvaluateSync to get an IDebugProperty2 interface. A call to IDebugProperty2::GetMemoryContext returns the IDebugMemoryContext2 that describes the memory address. This memory context is then passed to IDebugMemoryBytes2::ReadAt and IDebugMemoryBytes2::WriteAt.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See Also

Reference

IDebugProgram2::GetMemoryBytes

IDebugProperty2::GetMemoryBytes

IDebugReference2::GetMemoryBytes

IDebugMemoryContext2

Concepts

Core Interfaces