Location structure (dbgmodel.h)
Defines the location for an object. This particular variant of Location is the C-COM access struct.
Note that a location only has meaning in conjunction with a host context. It is a location within a context. When performing an operation on the location (reading bytes, writing bytes, etc...), a valid host context must be supplied.
struct Location {
ULONG64 HostDefined;
ULONG64 Offset;
void Location();
void Location(
ULONG64 virtualAddress
);
void Location(
const Location & src
);
Location & operator=(
const Location & src
);
Location & operator=(
ULONG64 virtualAddress
);
bool operator==(
const Location & rhs
);
bool operator!=(
const Location & rhs
);
Location & operator+=(
LONG64 offset
);
Location & operator-=(
LONG64 offset
);
Location operator+(
LONG64 offset
);
Location operator-(
LONG64 offset
);
ULONG64 GetOffset();
bool IsVirtualAddress();
};
HostDefined
The HostDefined field has two states that are "Non-Opaque" at the API layer.
0: Indicates that the offset is a pointer into virtual address space of the target.
Non-Zero: The defined value is proprietary to the host. Clients can propagate and change offset. They cannot legally change the value. This can be determined by the IsVirtualAddress() method if this structure is built from C++ code.
Offset
The location’s offset into the address space defined by the host context and the HostDefined field of this structure. If the HostDefined field is zero, this is the virtual address of the location. If the HostDefined field is non-zero, this is the offset into some other address space. It may, for example, indicate where a particular field of a registered structure is located within the containing register.
Copy constructs a location.
Default constructs an equivalent nullptr.
void Location( ULONG64 virtualAddress)
Constructs a location from an offset into the virtual address space of the target.
void Location( const Location & src)
Copy constructs a location.
Location & operator=( const Location & src)
The copy assignment operator for the location function.
Location & operator=( ULONG64 virtualAddress)
The assignment operator for the location function.
bool operator==( const Location & rhs)
Equivalence operator for the location function.
bool operator!=( const Location & rhs)
Not equal to comparison operator for the location function.
Location & operator+=( LONG64 offset)
The addition assignment operator for the location function.
Location & operator-=( LONG64 offset)
The subtraction assignment operator for the location function.
Location operator+( LONG64 offset)
The addition operator for the location function.
Location operator-( LONG64 offset)
Subtraction operator for the location function.
Returns the offset of the location.
Indicates whether the location refers to a virtual address.
Requirement | Value |
---|---|
Header | dbgmodel.h |