Debugging Tools for Windows


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

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


Specifies the address of the structure in the target's memory.
Specifies the name of the type of the structure. This can be qualified with a module name, for example, mymodule!mystruct.
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.

Specifies the size, in bytes, of the buffer 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.


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