Solved

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

Posted on 2002-05-04
4
791 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
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:Kdo
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

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…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
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 while-loops in the C programming language.

809 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