Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to select system installed codec to make and compress a series of bmp into AVI file Pin
max_xiayi31-Dec-04 22:09
max_xiayi31-Dec-04 22:09 
GeneralProblem with HttpSendRequest Pin
sinale31-Dec-04 22:08
sinale31-Dec-04 22:08 
GeneralWrite to Favourites Pin
LiYS31-Dec-04 19:41
LiYS31-Dec-04 19:41 
GeneralRe: Write to Favourites Pin
Michael Dunn1-Jan-05 8:06
sitebuilderMichael Dunn1-Jan-05 8:06 
GeneralPrintPreview from Dialog Pin
harisankar_r31-Dec-04 18:25
harisankar_r31-Dec-04 18:25 
GeneralRe: PrintPreview from Dialog Pin
Roger Allen1-Jan-05 0:10
Roger Allen1-Jan-05 0:10 
Generalextern "C" question. Pin
Link260031-Dec-04 18:12
Link260031-Dec-04 18:12 
GeneralRe: extern "C" question. Pin
Lim Bio Liong31-Dec-04 18:37
Lim Bio Liong31-Dec-04 18:37 
Hello Alex,

The extern "C" declaration is used to tell the C++ compiler not to mangle the symbol which is being declared.

When the C++ compiler encounters a function name like "DisplayCurrentThreadId()" which has not been declared as extern "C", it will emit a symbol for it which will look like the following :

?DisplayCurrentThreadId@@YAXXZ

The actual symbol produced depends on the compiler used (the above was produced by VC++ 6.0). This symbol will be used in the resulting OBJ file for linking purposes.

C++ has a variety of reasons for symbol name mangling, of course. But the reason for the mangling of function name (both class functions and global ones) is to enable function name overloading (i.e. using the same function name with different parameter types).

If extern "C" was used to declare the function, the symbol produced for it could be :

_DisplayCurrentThreadId

This depends on the compiler used. But the bottom line is that no function name overloading will be allowed (since the C language does not support this, hence extern "C").

Hope this helps.

Best Regards,
Bio.

GeneralRe: extern "C" question. Pin
Link26001-Jan-05 3:48
Link26001-Jan-05 3:48 
GeneralRe: extern "C" question. Pin
toxcct1-Jan-05 4:32
toxcct1-Jan-05 4:32 
GeneralRe: extern "C" question. Pin
Henry miller3-Jan-05 9:12
Henry miller3-Jan-05 9:12 
Generalread/view multi-page TIFF file Pin
Maverick31-Dec-04 15:02
Maverick31-Dec-04 15:02 
GeneralRe: read/view multi-page TIFF file Pin
toxcct1-Jan-05 2:39
toxcct1-Jan-05 2:39 
GeneralRe: read/view multi-page TIFF file Pin
Maverick1-Jan-05 8:09
Maverick1-Jan-05 8:09 
GeneralWhich Process has input focus Pin
peterchen31-Dec-04 13:25
peterchen31-Dec-04 13:25 
GeneralRe: Which Process has input focus Pin
Michael Dunn31-Dec-04 14:05
sitebuilderMichael Dunn31-Dec-04 14:05 
GeneralRe: Which Process has input focus Pin
ThatsAlok31-Dec-04 18:37
ThatsAlok31-Dec-04 18:37 
GeneralNetworking tutorials Pin
elec_eng31-Dec-04 11:21
elec_eng31-Dec-04 11:21 
GeneralRe: Networking tutorials Pin
Ravi Bhavnani31-Dec-04 12:02
professionalRavi Bhavnani31-Dec-04 12:02 
QuestionWhat is the code for the AsyncKeyState function? Pin
Coolarj1031-Dec-04 10:58
Coolarj1031-Dec-04 10:58 
AnswerRe: What is the code for the AsyncKeyState function? Pin
Heath Stewart31-Dec-04 11:12
protectorHeath Stewart31-Dec-04 11:12 
GeneralRe: What is the code for the AsyncKeyState function? Pin
Coolarj1031-Dec-04 11:29
Coolarj1031-Dec-04 11:29 
GeneralRe: What is the code for the AsyncKeyState function? Pin
Heath Stewart31-Dec-04 12:17
protectorHeath Stewart31-Dec-04 12:17 
GeneralALT key state after ModifyStyle, DoModal Pin
Vancouver31-Dec-04 8:16
Vancouver31-Dec-04 8:16 
GeneralRe: ALT key state after ModifyStyle, DoModal Pin
Neville Franks1-Jan-05 9:39
Neville Franks1-Jan-05 9:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.