UnDecorateSymbolName Function
Undecorates the specified decorated C++ symbol name.
DWORD WINAPI UnDecorateSymbolName( __in PCTSTR DecoratedName, __out PTSTR UnDecoratedName, __in DWORD UndecoratedLength, __in DWORD Flags );
Parameters
- DecoratedName
-
The decorated C++ symbol name. This name can be identified by the first character of the name, which is always a question mark (?).
- UnDecoratedName
-
A pointer to a string buffer that receives the undecorated name.
- UndecoratedLength
-
The size of the UnDecoratedName buffer, in characters.
- Flags
-
The options for how the decorated name is undecorated. This parameter can be zero or more of the following values.
Value Meaning UNDNAME_32_BIT_DECODE
0x0800Undecorate 32-bit decorated names.
UNDNAME_COMPLETE
0x0000Enable full undecoration.
UNDNAME_NAME_ONLY
0x1000Crack only the name for primary declaration. Returns [scope::]name. Does expand template parameters.
UNDNAME_NO_ACCESS_SPECIFIERS
0x0080Disable expansion of access specifiers for members.
UNDNAME_NO_ALLOCATION_LANGUAGE
0x0010Disable expansion of the declaration language specifier.
UNDNAME_NO_ALLOCATION_MODEL
0x0008Disable expansion of the declaration model.
UNDNAME_NO_ARGUMENTS
0x2000Do not undecorate function arguments.
UNDNAME_NO_CV_THISTYPE
0x0040Disable expansion of CodeView modifiers on the this type for primary declaration.
UNDNAME_NO_FUNCTION_RETURNS
0x0004Disable expansion of return types for primary declarations.
UNDNAME_NO_LEADING_UNDERSCORES
0x0001Remove leading underscores from Microsoft keywords.
UNDNAME_NO_MEMBER_TYPE
0x0200Disable expansion of the static or virtual attribute of members.
UNDNAME_NO_MS_KEYWORDS
0x0002Disable expansion of Microsoft keywords.
UNDNAME_NO_MS_THISTYPE
0x0020Disable expansion of Microsoft keywords on the this type for primary declaration.
UNDNAME_NO_RETURN_UDT_MODEL
0x0400Disable expansion of the Microsoft model for user-defined type returns.
UNDNAME_NO_SPECIAL_SYMS
0x4000Do not undecorate special names, such as vtable, vcall, vector, metatype, and so on.
UNDNAME_NO_THISTYPE
0x0060Disable all modifiers on the this type.
UNDNAME_NO_THROW_SIGNATURES
0x0100Disable expansion of throw-signatures for functions and pointers to functions.
Return Value
If the function succeeds, the return value is the number of characters in the UnDecoratedName buffer, not including the NULL terminator.
If the function fails, the return value is zero. To retrieve extended error information, call GetLastError.
If the function fails and returns zero, the content of the UnDecoratedName buffer is undetermined.
Remarks
To use undecorated symbols, call the SymSetOptions function with the SYMOPT_UNDNAME option.
All DbgHelp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function.
To call the Unicode version of this function, define DBGHELP_TRANSLATE_TCHAR.
Example Code
For an example, see Retrieving Undecorated Symbol Names.
Requirements
Redistributable |
Requires DbgHelp.dll 5.1 or later. |
---|---|
Header |
Declared in Dbghelp.h. |
Library |
Use Dbghelp.lib. |
DLL |
Requires Dbghelp.dll. |
Unicode |
Implemented as UnDecorateSymbolNameW (Unicode) and UnDecorateSymbolName (ANSI). |
See Also
DbgHelp Functions
SymSetOptions
Send comments about this topic to Microsoft
Build date: 9/25/2007
© 2007 Microsoft Corporation. All rights reserved.