次の方法で共有


IDebugReference2

This interface represents a reference to a stack frame property or some other property.

Note

IDebugReference2 is reserved for future use, and all its methods should return E_NOTIMPL.

IDebugReference2 : IUnknown

Notes for Implementers

The DE implements this interface to represent a reference to a particular kind of value. For example, the value could be a numerical value as a result of an expression evaluation, a memory context used for displaying memory, or a list of registers and their values.

Notes for Callers

Call IDebugProperty2::GetReference to obtain this interface. IDebugReference2::GetParent and IDebugReference2::GetDerivedMostReference also return this interface.

Methods in Vtable Order

The following table shows the methods of IDebugReference2.

Method

Description

IDebugReference2::GetReferenceInfo

Gets the DEBUG_REFERENCE_INFO structure that describes this reference.

IDebugReference2::SetValueAsString

Sets the value of this reference from a string.

IDebugReference2::SetValueAsReference

Sets the value of this reference from another reference.

IDebugReference2::EnumChildren

Enumerates the children of this reference.

IDebugReference2::GetParent

Gets the parent of this reference.

IDebugReference2::GetDerivedMostReference

Gets the most-derived reference of this reference.

IDebugReference2::GetMemoryBytes

Gets the memory bytes to which this reference refers.

IDebugReference2::GetMemoryContext

Gets a memory context for this reference.

IDebugReference2::GetSize

Gets the size, in bytes, of this reference.

IDebugReference2::SetReferenceType

Sets this reference type.

IDebugReference2::Compare

Compares this reference with another.

Remarks

Note

This use of "property" should not be confused with that meaning a member variable of a class, although an IDebugReference2 can represent such an entity.

IDebugProperty2 represents a property, while IDebugReference2 represents a reference to a property, typically a reference to an object in the program being debugged.

The main difference between a property and a reference is that a property refers to a named instance of an object, while a reference refers to an unnamed instance. For example, a property may refer to an object in the program's heap by "a.b". Another property may refer to the same object as "c.d". The way of referring to this property requires that "a.b" or "c.d" be in scope. A reference to this same object is nameless; the object can be referred to as long as the memory for that object is valid.

An IDebugProperty2 interface can be thought of as a value with a name, a type, and an address. An IDebugReference2, on the other hand, can be thought of as a type and an address.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See Also

Reference

DEBUG_REFERENCE_INFO

IDebugProperty2

IDebugProperty2::GetReference

Concepts

Core Interfaces