Debugging Tools for Windows

GetFieldName

The GetFieldName and GetFieldNameWide methods return the name of a field within a structure.

HRESULT
  IDebugSymbols2::GetFieldName(
    IN ULONG64  Module,
    IN ULONG  TypeId,
    IN ULONG  FieldIndex,
    OUT OPTIONAL PSTR  NameBuffer,
    IN ULONG  NameBufferSize,
    OUT OPTIONAL PULONG  NameSize
    );

HRESULT
  IDebugSymbols3::GetFieldNameWide(
    IN ULONG64  Module,
    IN ULONG  TypeId,
    IN ULONG  FieldIndex,
    OUT OPTIONAL PSTR  NameBuffer,
    IN ULONG  NameBufferSize,
    OUT OPTIONAL PULONG  NameSize
    );

#ifdef UNICODE
#define GetFieldNameT GetFieldNameWide
#else
#define GetFieldNameT GetFieldName
#endif

Parameters

Module
Specifies the base address of the module in which the structure was defined.
TypeId
Specifies the type ID of the structure.
FieldIndex
Specifies the index of the desired field within the structure.
NameBuffer
Receives the field's name. If NameBuffer is NULL, this information is not returned.
NameBufferSize
Specifies the size in characters of the buffer NameBuffer.
NameSize
Receives the size in characters of the field's name. If NameSize is NULL, this information is not returned.

Return Value

S_OK
The method was successful.
S_FALSE
The method was successful. However, NameBuffer was not large enough to hold the field's name and it was truncated.

This method may also return error values. See Return Values for more details.

Interface Version

GetFieldName is available in IDebugSymbols2 and later versions. GetFieldNameWide is available in IDebugSymbols and later versions.

Comments

For more information about symbols, see Symbols.

Requirements

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

Build machine: CAPEBUILD