Class PointerRequest
- Namespace
- CStructSharp.Memory
- Assembly
- CStructSharp.dll
Everything a pointer resolver may need to turn stored bits into a target region: the bits, where they were found, and what is expected at the target.
public sealed record PointerRequest : IEquatable<PointerRequest>
- Inheritance
-
PointerRequest
- Implements
- Inherited Members
Remarks
A resolver is the application's rule for interpreting pointers, supplied to MemorySession at
construction. The session calls it only when a path takes an explicit .value step, never merely because
a record contains a pointer. Common rules are: absolute address in the same space (the default), displacement
from the containing record (use Container), an address in another process (return a region in
that other source), or an address with tag bits (mask the documented bits before using them).
The resolver must return a region of at least TargetSize bytes; the session slices that extent and continues the path. The returned source remains owned by the application, and the original StoredPointer in the record is never modified.
Constructors
PointerRequest(StoredPointer, MemoryRegion, MemoryRegion, string, int, string, int)
Everything a pointer resolver may need to turn stored bits into a target region: the bits, where they were found, and what is expected at the target.
public PointerRequest(StoredPointer Pointer, MemoryRegion Storage, MemoryRegion Container, string TargetTypeId, int TargetSize, string Path, int Depth)
Parameters
PointerStoredPointerStored bits and byte width, exactly as read from memory.
StorageMemoryRegionRegion holding the pointer bytes; its source is the address space the pointer was read from.
ContainerMemoryRegionRegion of the record that contains the pointer, for relative encodings.
TargetTypeIdstringID of the pointed-to type.
TargetSizeintMinimum number of bytes the returned region must cover.
PathstringThe full path being resolved, for diagnostics.
DepthintPath depth at this step, counting member, index, and pointer steps.
Remarks
A resolver is the application's rule for interpreting pointers, supplied to MemorySession at
construction. The session calls it only when a path takes an explicit .value step, never merely because
a record contains a pointer. Common rules are: absolute address in the same space (the default), displacement
from the containing record (use Container), an address in another process (return a region in
that other source), or an address with tag bits (mask the documented bits before using them).
The resolver must return a region of at least TargetSize bytes; the session slices that extent and continues the path. The returned source remains owned by the application, and the original StoredPointer in the record is never modified.
Properties
Container
Region of the record that contains the pointer, for relative encodings.
public MemoryRegion Container { get; init; }
Property Value
Depth
Path depth at this step, counting member, index, and pointer steps.
public int Depth { get; init; }
Property Value
Path
The full path being resolved, for diagnostics.
public string Path { get; init; }
Property Value
Pointer
Stored bits and byte width, exactly as read from memory.
public StoredPointer Pointer { get; init; }
Property Value
Storage
Region holding the pointer bytes; its source is the address space the pointer was read from.
public MemoryRegion Storage { get; init; }
Property Value
TargetSize
Minimum number of bytes the returned region must cover.
public int TargetSize { get; init; }
Property Value
TargetTypeId
ID of the pointed-to type.
public string TargetTypeId { get; init; }
Property Value
Methods
Deconstruct(out StoredPointer, out MemoryRegion, out MemoryRegion, out string, out int, out string, out int)
public void Deconstruct(out StoredPointer Pointer, out MemoryRegion Storage, out MemoryRegion Container, out string TargetTypeId, out int TargetSize, out string Path, out int Depth)
Parameters
PointerStoredPointerStorageMemoryRegionContainerMemoryRegionTargetTypeIdstringTargetSizeintPathstringDepthint
Equals(PointerRequest?)
public bool Equals(PointerRequest? other)
Parameters
otherPointerRequest
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(PointerRequest?, PointerRequest?)
public static bool operator ==(PointerRequest? left, PointerRequest? right)
Parameters
leftPointerRequestrightPointerRequest
Returns
operator !=(PointerRequest?, PointerRequest?)
public static bool operator !=(PointerRequest? left, PointerRequest? right)
Parameters
leftPointerRequestrightPointerRequest