Debugging Tools for Windows

GetConstantName

The GetConstantName and GetConstantNameWide methods return the name of the specified constant.

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

HRESULT
  IDebugSymbols3::GetConstantName(
    IN ULONG64  Module,
    IN ULONG  TypeId,
    IN ULONG64  Value,
    OUT OPTIONAL PWSTR  NameBuffer,
    IN ULONG  NameBufferSize,
    OUT OPTIONAL PULONG  NameSize
    );

#ifdef UNICODE
#define GetConstantNameT GetConstantNameWide
#else
#define GetConstantNameT GetConstantName
#endif

Parameters

Module
Specifies the base address of the module in which the constant was defined.
TypeId
Specifies the type ID of the constant.
Value
Specifies the value of the constant.
NameBuffer
Receives the constant'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 constant's name.

Return Value

S_OK
The method was successful.
S_FALSE
The method was successful. However, the buffer was not large enough for the constant's name and it was truncated.

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

Interface Version

GetConstantName is available in IDebugSymbols2 and later versions. GetConstantNameWide 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