George
Sun Oct 05 07:55:01 CDT 2008
Thanks Igor!
Your reply is excellent. I have tried but have different results from well
documented rules of MSDN.
In the document,
http://msdn.microsoft.com/en-us/library/x7kb4e2f.aspx
it is mentioned default calling convention is __cdecl, and the resulting
name in DLL should begin with sign _.
But my result is the default calling convention __cdecl results in name
without _ sign? Here is my code and my output. Any ideas?
I am using VS 2008, Debug build for Win32.
D:\Visual Studio 2008\Projects\TestDll2\Debug>dumpbin /exports TestDll2.dll
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file TestDll2.dll
File Type: DLL
Section contains the following exports for TestDll2.dll
00000000 characteristics
48E8B6E6 time date stamp Sun Oct 05 20:45:26 2008
0.00 version
1 ordinal base
2 number of functions
2 number of names
ordinal hint RVA name
1 0 000110AF MyFunc1 = @ILT+170(_MyFunc1)
2 1 0001106E _MyFunc2@4 = @ILT+105(_MyFunc2@4)
Summary
1000 .data
1000 .idata
2000 .rdata
1000 .reloc
1000 .rsrc
4000 .text
10000 .textbss
extern "C"
{
__declspec (dllexport) int MyFunc1 (int A) {return 100;}
__declspec (dllexport) int __stdcall MyFunc2 (int A) {return 100;}
}
regards,
George