Debugging Tools for Windows

ExtRemoteTyped::Set

The Set method sets the typed data represented by the ExtRemoteTyped object.

void
  Set(
    IN PCSTR  Expr
) throw(...)

void
  Set(
    IN PCSTR  Expr,
    IN ULONG64  Offset
    ) throw(...)

void
  Set(
    IN bool  PtrTo,
    IN ULONG64  TypeModBase,
    IN ULONG  TypeId,
    IN ULONG64  Offset
    ) throw(...)

void
  Set(
    IN PCSTR  Type,
    IN ULONG64  Offset,
    IN bool  PtrTo,
    IN OUT OPTIONAL PULONG64  CacheCookie = NULL,
    IN OPTIONAL PCSTR  LinkField = NULL
    ) throw(...)

Parameters

Expr
An expression that evaluates to the desired symbol. This expression is evaluated by the default expression evaluator.
Offset
When used with Expr, specifies an additional parameter that can be used when evaluating the Expr expression. This additional parameter is available in the expression as the $extin pseudo-register. For example, to specify a process environment block (PEB) at a particular location, you could set Expr to the C++ expression (ntdll!_PEB *)@$extin. This casts the pseudo-register $extin to a pointer to a PEB. Then, set Offset to the location of the PEB instance.

When used with Type or TypeId, Offset specifies the location of the data in the target's memory.

PtrTo
Specifies whether or not to set the ExtRemoteTyped instance to the specified typed data, or to a pointer to the specified typed data. If PtrTo is true, the ExtRemoteTyped instance will be a pointer to the typed data.
TypeModBase
The base address of the module to which the type belongs.
TypeId
The type ID of the type.
Type
The type name of the type. Type can include a module qualifier—for example, mymodule!mytype. The module qualifier can be omitted, but it is recommended that it be included if the module is known.
CacheCookie
A cache cookie used for caching the type information. If CacheCookie is NULL, the debugger engine will search for the type information each time.

A cache cookie is a pointer to a ULONG64. It is associated with a particular symbol that is uniquely identified by the symbol's type ID and the address of the module that contains the symbol. The first time it is used, the ULONG64 that cache cookie points to must be set to 0. In this case, the debugger engine will search for the symbol information and cache it, then it will set the cookie so that the symbol information can be easily retrieved later. Whenever you use a subsequent method that will need information about the same symbol, use the cache cookie. The debugger engine will then be able to retrieve the symbol information from the cache instead of searching for it. Each cache cookie should only be used with a single type. If a cache cookie is used in conjunction with a different symbol, the cache cookie might be corrupted.

LinkField
The name of a field in the typed data structure which contains the pointer to the next item in a list. LinkField should be set if CacheCookie is being used for the first time and will later be used with ExtRemoteTypedList.

Return Value

None

Requirements

Headers: Defined in Engextcpp.hpp. Include Engextcpp.hpp.

See Also

ExtRemoteTyped, ExtRemoteTyped::SetPrint, ExtRemoteTypedList

Build machine: CAPEBUILD