Solved

ESP error! in Debug Mode (Visual C++)

Posted on 2002-05-04
4
798 Views
Last Modified: 2011-09-20
Debug Error !
 
 Modle :
 file  : i386\chkesp.c
 Line  : 42
 
 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.                      

What is th problem ????..fuction call is correct ???
0
Comment
Question by:jhjeon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Accepted Solution

by:
Black_End earned 200 total points
ID: 6989661
The reason for that error is that you are calling a stdcall function but the compiler thinks that it is not.
The bug will also happend in Release mode, but in Release mode it just won't see the message box.
Try to define the forward of the function like this:
void __stdcall func()
0
 
LVL 86

Expert Comment

by:jkr
ID: 6991145
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7116571
Please update and finalize this.
Moondancer - EE Moderator
0
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 9479810
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:
Accept Black_End's comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Kent (Kdo)
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question