Debugging Tools for Windows

GetFieldValue

The GetFieldValue macro is a thin wrapper around the GetFieldData function. It is provided as a convenience for reading the value of a member in a structure.

#define GetFieldValue(AddrTypeFieldOutValue) \
     GetFieldData(AddrTypeField, sizeof(OutValue), (PVOID) &(OutValue))

Parameters

Addr
Specifies the address of the structure in the target's memory.
Type
Specifies the name of the type of the structure. This can be qualified with a module name, for example, mymodule!mystruct.
Field
Specifies the name of the member in the structure. Submembers can be specified by using a period-separated path, for example, "myfield.mysubfield".
OutValue
Specifies the object into which the member's value is read.

Comments

The parameters provided to this macro are the same as those provided to the GetFieldData function except that instead of providing a pointer to a buffer and its size, the variable to hold the returned value can be provided directly.

Requirements

Headers: Defined in wdbgexts.h. If you are writing a WdbgExts extension, include wdbgexts.h. If you are writing a DbgEng extension that calls this macro, include wdbgexts.h before dbgeng.h (see Writing DbgEng Extension Code for details).

See Also

GetFieldData

Build machine: CAPEBUILD