Tuesday, July 10, 2007

 

Calling conventions for functions.

I have been wanting to write this blog about calling conventions for functions, ever since I have been hit by it. Around one year back, we faced a very peculiar problem wherein calling a certain function caused a GPF [general protection fault]. Painful analysis of the problem (spread over more than a couple of days) revealed that the issue was related to incorrect function calling convention.

I will talk about calling conventions with primary focus on Windows platform and MS VC++ compiler. Function calling convention determines the following:

Now let us take a look at the common calling conventions:

Labels:


Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?