Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 05-24-2005, 14:26
Sergey R.
 
Posts: n/a
Quote:
Originally Posted by zdensys
Wiley.Reversing.Secrets.of.Reverse.Engineering.Apr.2005.eBook-DDU
...
Thank you for this book! It seems to be very interesting.

But alas I've found a mistake in this book.

p.570:
Quote:
... The cdecl calling convention is the standard C and C++ calling convention. The unique feature it has is that it allows functions to receive a dynamic number of parameters. This is possible because the caller is responsible for restoring the stack pointer after making a function call. Additionally, cdecl functions receive parameters in the reverse order compared to the rest of the calling conventions. The first parameter is pushed onto the stack first, and the last parameter is pushed last. ...
p.571:
Quote:
... stdcall is the opposite of cdecl in terms of argument passing method and order. stdcall functions receive parameters in the reverse order compared to cdecl, meaning that the last parameter an stdcall function takes is pushed to the stack first. ...
This is not correct! "cdecl" and "stdcall" calling conventions are equal in a method of arguments passing into the stack. They both push arguments in the stack from right to left. The only difference is the method of the stack clearance, it is made by caller with "cdecl" and by called function with "stdcall".

So be careful reading this book. There may be other mistakes in it...

Last edited by Sergey R.; 05-24-2005 at 14:43.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ebooks conan981 General Discussion 0 07-07-2006 22:36
some ebooks fulone General Discussion 1 05-20-2004 21:22


All times are GMT +8. The time now is 16:25.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )