Click here to Skip to main content
15,916,463 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: static varible Pin
Krishnatv25-May-06 20:33
Krishnatv25-May-06 20:33 
AnswerRe: static varible Pin
knoxplusplus29-May-06 8:00
knoxplusplus29-May-06 8:00 
Questionwhat the heck is __stdcall about? Pin
Member 303984325-May-06 19:31
Member 303984325-May-06 19:31 
AnswerRe: what the heck is __stdcall about? Pin
Nibu babu thomas25-May-06 19:41
Nibu babu thomas25-May-06 19:41 
GeneralRe: what the heck is __stdcall about? Pin
Smith#25-May-06 21:49
Smith#25-May-06 21:49 
GeneralRe: what the heck is __stdcall about? Pin
Steve S25-May-06 22:09
Steve S25-May-06 22:09 
GeneralRe: what the heck is __stdcall about? Pin
Smith#25-May-06 22:13
Smith#25-May-06 22:13 
GeneralRe: what the heck is __stdcall about? Pin
Nibu babu thomas25-May-06 22:15
Nibu babu thomas25-May-06 22:15 
Meat Loaf wrote:
What's "variable number of arguments" ?? means Overloaded functions?


You must have used printf, sprintf, fprintf, scanf, sscanf etc. They all take variable number of arguments. Take a look at va_start, va_end, va_arg.

__cdecl calling convention specifies that the caller has to clean up the stack leading to larger executable size. Hence permitting the use of variable number of arguments.


Meat Loaf wrote:
__stdcall is used to call Win32 API functions. It does not allow functions to have a variable number of arguments.


Yeah true. For eg: WINAPI, PASCAL are #defined to be __stdcall. This is windows specific. This means the callee has to clean up the stack just before the callee returns hense variable number of arguments cannot be used here.


Meat Loaf wrote:
__fastcall attempts to put arguments in registers, rather than on the stack, thus making function calls faster.



Meat Loaf wrote:
And about _fastcall, if it's going to be faster, why not use it for every function we create?


Because we have limited number of registers.


Meat Loaf wrote:
can you tell me about , where a particular convention must be used strictly.


You have to decide. Where what should be used. __stdcall doesn't permit variable number of arguments hence which calling convention will you use?


Meat Loaf wrote:
Thiscall calling convention is the default calling convention used by C++ member functions that do not use variable arguments.


This calling convention allows class member functions to have the implicit this argument.


Meat Loaf wrote:
(yes, I've not gone through the article fully


Then please do. Smile | :)


Nibu thomas
A Developer

Programming tips[^]  My site[^]

GeneralRe: what the heck is __stdcall about? Pin
Member 303984326-May-06 19:08
Member 303984326-May-06 19:08 
AnswerRe: what the heck is __stdcall about? Pin
Hamid_RT25-May-06 20:19
Hamid_RT25-May-06 20:19 
QuestionRichEdit Errors Pin
VinayCool25-May-06 19:26
VinayCool25-May-06 19:26 
AnswerRe: RichEdit Errors Pin
Hamid_RT25-May-06 19:31
Hamid_RT25-May-06 19:31 
GeneralRe: RichEdit Errors Pin
VinayCool25-May-06 19:37
VinayCool25-May-06 19:37 
AnswerRe: RichEdit Errors Pin
Hamid_RT25-May-06 19:39
Hamid_RT25-May-06 19:39 
AnswerRe: RichEdit Errors [modified] Pin
Steve Echols25-May-06 19:41
Steve Echols25-May-06 19:41 
GeneralRe: RichEdit Errors [modified] Pin
VinayCool25-May-06 20:01
VinayCool25-May-06 20:01 
GeneralRe: RichEdit Errors Pin
Steve Echols25-May-06 20:17
Steve Echols25-May-06 20:17 
GeneralRe: RichEdit Errors Pin
VinayCool25-May-06 20:21
VinayCool25-May-06 20:21 
GeneralRe: RichEdit Errors [modified] Pin
Nibu babu thomas25-May-06 20:06
Nibu babu thomas25-May-06 20:06 
GeneralRe: RichEdit Errors Pin
Steve Echols25-May-06 20:29
Steve Echols25-May-06 20:29 
GeneralRe: RichEdit Errors Pin
Nibu babu thomas25-May-06 20:34
Nibu babu thomas25-May-06 20:34 
GeneralRe: RichEdit Errors Pin
Steve Echols25-May-06 20:42
Steve Echols25-May-06 20:42 
GeneralRe: RichEdit Errors Pin
Hamid_RT25-May-06 20:40
Hamid_RT25-May-06 20:40 
GeneralRe: RichEdit Errors Pin
VinayCool25-May-06 21:09
VinayCool25-May-06 21:09 
QuestionC++ Certification Pin
Sarath C25-May-06 19:06
Sarath C25-May-06 19:06 

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.