次の方法で共有


IDebugMemoryBytes2

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 bytes of memory.

Syntax

IDebugMemoryBytes2 : IUnknown

Notes for Implementers

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

Notes for Callers

Methods in Vtable Order

The following table shows the methods of IDebugMemoryBytes2.

Method Description
ReadAt Reads a sequence of bytes, starting at a given location.
WriteAt Writes dwCount bytes, starting at pStartContext.
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 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 EvaluateSync to get an IDebugProperty2 interface. A call to GetMemoryContext returns the IDebugMemoryContext2 that describes the memory address. This memory context is then passed to ReadAt and WriteAt.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See also