Connecting Tech Pros Worldwide Forums | Help | Site Map

the difference _cdecl from _thiscall...?

LinusLee
Guest
 
Posts: n/a
#1: Jul 22 '05
I know _cdecl is often used by the static function that has variable args num...
In _cdecl func... after returnning function, pop args...
In _stdcall func... before retunning function, pop args...

but.. how is _thiscall?

I found it that member function's convention is _thiscall in Visual C++.
Is ANSI C++ same?

My english is poor... sorry...
thanks... :-)

Mike Wahler
Guest
 
Posts: n/a
#2: Jul 22 '05

re: the difference _cdecl from _thiscall...?


"LinusLee" <lobin2@hanmail.net> wrote in message
news:6ccb7d49.0405161042.1faedcab@posting.google.c om...[color=blue]
> I know _cdecl is often used by the static function that has variable args[/color]
num...[color=blue]
> In _cdecl func... after returnning function, pop args...
> In _stdcall func... before retunning function, pop args...
>
> but.. how is _thiscall?
>
> I found it that member function's convention is _thiscall in Visual C++.
> Is ANSI C++ same?[/color]

No. Standard C++ has no such keywords as '_cdecl',
'_stdcall', or '_thiscall'. Those are implementation
(MSVC++) -specific keywords. See your Visual C++
documentation and/or visit www.msdn.microsoft.com
to learn their meanings, and how and when to use them.
Note that their use will render your code nonstandard
and nonportable.

-Mike


Prateek R Karandikar
Guest
 
Posts: n/a
#3: Jul 22 '05

re: the difference _cdecl from _thiscall...?


> I know _cdecl is often used by the static function that has variable args num...[color=blue]
> In _cdecl func... after returnning function, pop args...
> In _stdcall func... before retunning function, pop args...
>
> but.. how is _thiscall?
>
> I found it that member function's convention is _thiscall in Visual C++.
> Is ANSI C++ same?
>
> My english is poor... sorry...
> thanks... :-)[/color]

There are no such things as _cdecl, _stdcall, or _thiscall is Standard C++.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
To iterate is human, to recurse divine.
-L. Peter Deutsch
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Closed Thread