Pregunta

I was looking over the list of functions that were exported from a dll using depends and i noticed some weird symbols included with the names. They are of the format

??0Function Name@@QEAA@AEBV0@@Z

Also 0 maybe replaced by some other number.

The number of @@ and the alphabets vary.

Can anybody tell what they represent?

¿Fue útil?

Solución

That's the name of a C++ identifier that was decorated by the C++ compiler. You can run the undname.exe utility from the Visual Studio Command Prompt to convert it back to the original C++ declaration:

C:\>undname ??0Foo@@QEAA@AEBV0@@Z
Microsoft (R) C++ Name Undecorator
Copyright (C) Microsoft Corporation. All rights reserved.

Undecoration of :- "??0Foo@@QEAA@AEBV0@@Z"
is :- "public: __cdecl Foo::Foo(class Foo const & __ptr64) __ptr64"

Which makes it the copy constructor for the Foo class, compiled to 64-bit code. The exact decoration algorithm is not documented that I know of. In general, name decoration is used to avoid linker symbol collisions, necessary because C++ supports overloading. You can suppress decoration by using extern "C" but that can't work on a C++ class.

Otros consejos

In some situations you might be interested to undecorate these names programatically using an API Microsoft is providing UnDecorateSymbolName.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top