Questions tagged [name-decoration]
61 questions
108
votes
4 answers
Exporting functions from a DLL with dllexport
I'd like a simple example of exporting a function from a C++ Windows DLL.
I'd like to see the header, the .cpp file, and the .def file (if absolutely required).
I'd like the exported name to be undecorated. I'd like to use the most standard calling…
![](../../users/profiles/3655.webp)
Aardvark
- 8,228
- 7
- 43
- 63
39
votes
3 answers
C++ name mangling decoder for g++?
is there any C++ name-mangling decoder for g++?
![](../../users/profiles/148869.webp)
SunnyShah
- 24,498
- 28
- 81
- 130
31
votes
10 answers
C++ DLL Export: Decorated/Mangled names
Created basic C++ DLL and exported names using Module Definition file (MyDLL.def).
After compilation I check the exported function names using dumpbin.exe
I expect to see:
SomeFunction
but I see this instead:
SomeFunction =…
![](../../users/profiles/337509.webp)
Bob
- 333
- 1
- 3
- 6
21
votes
7 answers
Finding Dll Function Parameters
How can I find the parameters of an undocumented Dll function?
I have searched all over the internet and ended up finding one way: it involves decorated functions. However, I cannot find a way to get those.
Any help would be appreciated.
![](../../users/profiles/37875.webp)
user37875
- 12,522
- 9
- 34
- 43
15
votes
2 answers
How can I work around Visual C++ 2005's "decorated name length exceeded, name was truncated" warning?
For example, say for some reason I had a piece of code that looked like this:
mutable std::vector > > > > myFreakingLongVectorThing;
and I am getting a warning that looks like…
![](../../users/profiles/681523.webp)
Casey Patton
- 3,901
- 9
- 37
- 51
10
votes
1 answer
C++ name space confusion - std:: vs :: vs no prefix on a call to tolower?
Why is this?
transform(theWord.begin(), theWord.end(), theWord.begin(), std::tolower); - does not work
transform(theWord.begin(), theWord.end(), theWord.begin(), tolower); - does not work
but
transform(theWord.begin(), theWord.end(),…
![](../../users/profiles/839913.webp)
user839913
- 131
- 1
- 5
10
votes
3 answers
Why can't I use __declspec(dllexport) to export DllGetClassObject() from a COM DLL?
I am developing a COM dll and trying to export the DllGetClassObject() method with the __declspec(dllexport).
Here is my declaration:
extern "C" HRESULT __declspec(dllexport) __stdcall DllGetClassObject(REFCLSID rclsid,
…
![](../../users/profiles/264052.webp)
smwikipedia
- 52,824
- 76
- 267
- 432
9
votes
4 answers
C4503 warnings? How do i solve/get rid of them?
It's my first time trying out C++ STL. I'm trying to build a multidimensional associative array using map. For example:
typedef struct DA {
string read_mode;
string data_type;
void *pValue;
void *pVarMemLoc;
}DA;
int…
![](../../users/profiles/131500.webp)
justin
- 233
- 2
- 6
- 15
8
votes
1 answer
VC++ prevent all symbol name decorations
I'm working on a DLL which will be used from another language (so no import libs and including the dll's headers) using the _stdcall calling convetion. The problem is that VC++ seems to always do some name decoration on its exported symbols. All the…
![](../../users/profiles/712381.webp)
SyncViews
- 125
- 1
- 5
8
votes
7 answers
Can't access variable in C++ DLL from a C app
I'm stuck on a fix to a legacy Visual C++ 6 app. In the C++ DLL source I have put
extern "C" _declspec(dllexport) char* MyNewVariable = 0;
which results in MyNewVariable showing up (nicely undecorated) in the export table (as shown by dumpbin…
![](../../users/profiles/5816.webp)
Ian Horwill
- 2,741
- 2
- 22
- 23
8
votes
3 answers
GCC compiling a dll with __stdcall
When we compile a dll using __stdcall inside visual studio 2008 the compiled function names inside the dll are.
FunctionName
Though when we compile the same dll using GCC using wx-dev-cpp GCC appends the number of paramers the function has, so the…
![](../../users/profiles/17382.webp)
Chad
- 2,795
- 3
- 25
- 36
6
votes
1 answer
Do C++ mangled names stay consistent when compiled on different computers?
In general, what I've observed using nm on Linux is that T symbol names (which I'm interested in) stay consistent across different computers even when I'm not using extern "C". Is my observation correct?
Note I'm using gcc on all computers.
![](../../users/profiles/348528.webp)
MrD
- 2,197
- 2
- 20
- 23
6
votes
5 answers
Using C++ DLLs with different compiler versions
This question is related to "How to make consistent dll binaries across VS versions ?"
We have applications and DLLs built
with VC6 and a new application built
with VC9. The VC9-app has to use
DLLs compiled with VC6, most of
which are written in C…
![](../../users/profiles/27596.webp)
foraidt
- 5,241
- 4
- 50
- 78
6
votes
3 answers
Is C++ name mangling (decoration) deterministic?
I hope to LoadLibrary on an unmanaged C++ DLL with managed code, and then call GetProcAddress on extern functions which have been mangled. My question is are the mangled names you get from a C++ compiler deterministic? That is: Will the name always…
![](../../users/profiles/117995.webp)
Blanthor
- 2,388
- 8
- 44
- 63
6
votes
1 answer
White-box testing in Javascript - how to deal with privacy?
I'm writing unit tests for a module in a small Javascript application. In order to keep the interface clean, some of the implementation details are closed over by an anonymous function (the usual JS pattern for privacy). However, while testing I…
![](../../users/profiles/181765.webp)
Max Shawabkeh
- 34,985
- 8
- 79
- 89