Debugging Tools for Windows

GetFieldData

The GetFieldData function returns the value of a member in a structure.

ULONG
GetFieldData (
    IN  ULONG64  TypeAddress,
    IN  LPCSTR  Type,
    IN  LPCSTR  Field,
    IN  ULONG  OutSize,
    OUT PVOID  pOutValue
    );

Parameters

TypeAddress
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 whose value will be returned. Submembers can be specified by using a period-separated path, for example, "myfield.mysubfield".

If the size of the structure pointed to by TypeAddress is less than 8 bytes, Field can be NULL; in this case, the entire structure is copied to pOutValue.

OutSize
Specifies the size, in bytes, of the buffer pOutValue.
pOutValue
Receives the value of the member. Or, the value of the type, if Field is NULL.

Return Value

If the function succeeds, the return value is TRUE; otherwise, it is FALSE. If OutSize is smaller than the value returned, an exception is raised and data past the end of pOutValue might be overwritten.

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 function, include wdbgexts.h before dbgeng.h (see Writing DbgEng Extension Code for details).

Build machine: CAPEBUILD