Run-time check failure #0

G

Guest

Hi,
I get this exception everytime I debug and is just annoying.
"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."

The exception is being thrown from a third party code base which I can't even fix (and I don't know how to fix).
Is there a way that this can be suppressed.

Thanks in advance.

- AP.
 
D

David Lowndes

The exception is being thrown from a third party code base which I can't even fix (and I don't know how to fix).

Is the run-time check happening in the depths of the 3'rd party code,
or when your call to it returns?

I would hope that a 3'rd party library wouldn't have such an obvious
problem, so are you perhaps calling the function with the wrong
calling convention?

Dave
 
G

Guest

Dave

What do you mean by different calling convention
Could you give me an example

Thanks

AP
 
D

David Lowndes

What do you mean by different calling convention?

See "/Gd, /Gr, /Gz (Calling Convention)" in the MSDN documentation.

More often than not, the problem is what the error message says, and
the usual case is that you've called a function via a function pointer
and not specified CALLBACK (aka _stdcall) in the function prototype
definition.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top