Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: I have a question on extern "C"

Started 1 month, 2 weeks ago by EnthusiasticNewbie
-------------------------------------------------- ------------------------------ hello I have a question.. I realized that when I compiled and made export functions in dll with 'extern "C" __declspec(dllexport)', function names didn't include underscores in front of their name. but I heard that symbols of c functions should include underscores.. is it a just a feature of Visual C...
Site: CodeGuru Forums - A Developer.com Community for C++, C#, VB, Java and .NET Solutions  CodeGuru Forums - A Developer.com Community for C++, C#, VB, Java and .NET Solutions - site profile
Forum: C++ and WinAPI  C++ and WinAPI - forum profile
Total authors: 4 authors
Total thread posts: 7 posts
Thread activity: no new posts during last week
Domain info for: codeguru.com

Other posts in this thread:

MrViggy replied 1 month, 2 weeks ago
Post your code. That should work (if I remember my syntax correctly). Viggy

VijayDandur replied 1 month, 1 week ago
Dear friend, By adding this " __declspec(dllexport) " statement indicates that the function is to be exported , and __declspec is a standard calling convention. Thats all , it wont add and "Underscores" during function decoration. What Extern "C" means , follow the "C" name decoration standards, Which doesn't add any extra characters in function decoration. I Think...

Igor Vartanov replied 1 month, 1 week ago
Quote: I heard that symbols of c functions should include underscores.. . . . Even in import and export sections(in EXE , DLL), the function name doesn't contain underscores in front of its name. You're missing the diffeence between function symbol and function export name. Symbol is a name used internally by linker . Export is a name ...

Igor Vartanov replied 1 month, 1 week ago
Let's see another case, a bit different comparing to the previous one. Code: // 23.cpp extern "C" void foo() {} Code: ; 23.def LIBRARY 23.dll EXPORTS oops = foo ; here's the trick Code: cl 23.cpp 23.def /link /dll /map:23.map /out:23.dll Code: 23 Timestamp is 4af18d73 (Wed Nov 04 17:19:31 2009) Preferred load address is ...

Igor Vartanov replied 1 month ago
Code: 0000000600: 20 20 20 20 20 20 31 32 │ 35 37 39 36 33 38 34 34 1257963844 0000000610: 20 20 20 20 20 20 20 20 │ 20 20 20 20 20 20 30 20 0 0000000620: 20 20 20 20 20 20 33 32 │ 20 20 20 20 20 20 20 20 32 0000000630: 60 0A 00 00 FF FF 00 00 │ 4C 01 44 01 FB 4A 0C 00 `◙ яя L☺D☺ыJ♀ 0000000640: 00 00 00 00 08 00 5F 66 │ 6F 6F 00 32 33 2E 64 6C ◘ ...

EnthusiasticNewbie replied 1 month ago
Thanks and thanks for my another question on ReadProcessMemory too !

 

Top contributing authors

Name
Posts
Igor Vartanov
3
user's latest post:
I have a question on extern...
Published (2009-11-11 13:32:00)
Code: 0000000600: 20 20 20 20 20 20 31 32 │ 35 37 39 36 33 38 34 34 1257963844 0000000610: 20 20 20 20 20 20 20 20 │ 20 20 20 20 20 20 30 20 0 0000000620: 20 20 20 20 20 20 33 32 │ 20 20 20 20 20 20 20 20 32 0000000630: 60 0A 00 00 FF FF 00 00 │ 4C 01 44 01 FB 4A 0C 00 `◙ яя L☺D☺ыJ♀ 0000000640: 00 00 00 00 08 00 5F 66 │ 6F...
EnthusiasticNewbie
2
user's latest post:
I have a question on extern...
Published (2009-11-12 08:21:00)
Thanks and thanks for my another question on ReadProcessMemory too !
MrViggy
1
user's latest post:
I have a question on extern...
Published (2009-11-03 15:36:00)
Post your code. That should work (if I remember my syntax correctly). Viggy
VijayDandur
1
user's latest post:
I have a question on extern...
Published (2009-11-04 03:18:00)
Dear friend, By adding this " __declspec(dllexport) " statement indicates that the function is to be exported , and __declspec is a standard calling convention. Thats all , it wont add and "Underscores" during function decoration. What Extern "C" means , follow the "C" name decoration standards, Which doesn't add any extra characters in function decoration. I Think...

Related threads on "CodeGuru Forums - A Developer.com Community for C++, C#, VB, Java and .NET Solutions":

Related threads on other sites:

Thread profile page for "I have a question on extern "C"" on http://www.codeguru.com. This report page is a snippet summary view from a single thread "I have a question on extern "C"", located on the Message Board at http://www.codeguru.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity