why Function Name in DLL so strange ?
-
I got a DLL, in its function declare their is a function: EXPORT int func1(); But when I display it in Dependency Walker, the actual name is something like: _func1@0 This DLL is compiled in visual c++ 6.0, I am wondering if there is an option cause this problem. Thanks
-
I got a DLL, in its function declare their is a function: EXPORT int func1(); But when I display it in Dependency Walker, the actual name is something like: _func1@0 This DLL is compiled in visual c++ 6.0, I am wondering if there is an option cause this problem. Thanks
jinzhecheng wrote:
...I am wondering if there is an option cause this problem.
What problem? C functions are decorated with a leading underscore. Check whether you are using
__cdecl
or__stdcall
.
"Take only what you need and leave the land as you found it." - Native American Proverb
-
I got a DLL, in its function declare their is a function: EXPORT int func1(); But when I display it in Dependency Walker, the actual name is something like: _func1@0 This DLL is compiled in visual c++ 6.0, I am wondering if there is an option cause this problem. Thanks
did you ever look a what the compiler generates ? this is called decorated names, exactly such as your
func1()
...
TOXCCT >>> GEII power
[toxcct][VisualCalc 2.20][VisualCalc 3.0] -
I got a DLL, in its function declare their is a function: EXPORT int func1(); But when I display it in Dependency Walker, the actual name is something like: _func1@0 This DLL is compiled in visual c++ 6.0, I am wondering if there is an option cause this problem. Thanks
if you want undecorated names, you'll need to use a .DEF file Cleek | Image Toolkits | Thumbnail maker
-
I got a DLL, in its function declare their is a function: EXPORT int func1(); But when I display it in Dependency Walker, the actual name is something like: _func1@0 This DLL is compiled in visual c++ 6.0, I am wondering if there is an option cause this problem. Thanks
Thanks , I have created a def file, and its gone!
-
I got a DLL, in its function declare their is a function: EXPORT int func1(); But when I display it in Dependency Walker, the actual name is something like: _func1@0 This DLL is compiled in visual c++ 6.0, I am wondering if there is an option cause this problem. Thanks
Hello, This is what the C++ compiler does to your function names. The process is called name mangling[^]. You can use
extern C
to say to the compiler that you only wish to add an underscore to the function name. This disables any overloading..extern "C"
{
void func1();
// more functions here
}Hope this helps. :) Behind every great black man... ... is the police. - Conspiracy brother Blog[^]
-
did you ever look a what the compiler generates ? this is called decorated names, exactly such as your
func1()
...
TOXCCT >>> GEII power
[toxcct][VisualCalc 2.20][VisualCalc 3.0]this is called decorated names, exactly such as your func1()... I hope u mean Name Mangling by saying decorated names, Vikas Amin Embin Technology Bombay vikas.amin@embin.com
-
this is called decorated names, exactly such as your func1()... I hope u mean Name Mangling by saying decorated names, Vikas Amin Embin Technology Bombay vikas.amin@embin.com
"decorated names" are more commonly used.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
--[V]--