Re: Exported function for x64 bit
Hi Manish!
but consider an
example that your custom SDK have 10+ DLLs exporting some symbols used by
third party developers. You are supporting Win32 as well as Win64. MSDN does
not says that the exported symbols will be different on 64 and 32 for same
code.
MSDN does not say, HOW they will name the symbols, regardless of x86 or
x64, if you do NOT use a DEF-file...
To resolve this issue you have to maintain 2 set of def files,
Why? Just use one def-file... why do you need 2?
My questions was
pretty much simple, why there is a difference ? Is it documented somewhere ?
Ok, here is _some_ documentation:
Format of a C Decorated Name
http://msdn.microsoft.com/en-us/library/x7kb4e2f.aspx
This leads to the following: x86 normally used __stdcall or __cdecl as
calling convention; therfor it will lead to a decorated name of "_" or
"_...@n"
x64 never uses __cdecl or __stdcall calling convention, therefor it will
*never* have the same decorected name. It always uses "__fastcall". It
should normally look like "@...@n" but maybe the documentation is wrong...
But you will never ge the same same, if you use different callling
conmventions... (which is the default).
For more info see:
Exporting from a DLL Using DEF Files
http://msdn.microsoft.com/en-us/library/d91k01sh.aspx
Decorated Names
http://msdn.microsoft.com/en-us/library/56h2zst2.aspx
Using Decorated Name
http://msdn.microsoft.com/en-us/library/t2k2877b.aspx
Format of a C++ Decorated Name
http://msdn.microsoft.com/en-us/library/2ax8kbk1.aspx
--
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/