Re: Callback error

new topic     » goto parent     » topic index » view thread      » older message » newer message

ESP - Extra Sensory Perception.  The computer is trying to guess
what you wanted to do but failed.  o<8^) :)

Okay,  ESP - The Extended Stack Pointer. -  Stack Pointer for
a program running it protected memory.  ESP is a system Register.
Similar to EAX, EBX, ECX, EDX, EBP.  These are low level
assembly/machine code values.

    This means that your Stack Pointer was corrupted.
You either failed to return when you should have or return the
values to their original state before returning.  An other
possibilities can be covered by our resident ASM geeks such as
Pete Eberlein.


        Lucius L. Hilley III
        lhilley at cdc.net   lucius at ComputerCafeUSA.com
+----------+--------------+--------------+----------+
| Hollow   | ICQ: 9638898 | AIM: LLHIII  | Computer |
|  Horse   +--------------+--------------+  Cafe'   |
| Software | http://www.cdc.net/~lhilley |  USA     |
+----------+-------+---------------------+----------+
                   | http://www.ComputerCafeUSA.com |
                   +--------------------------------+
----- Original Message -----
From: Matthew Lewis <MatthewL at KAPCOUSA.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Tuesday, November 02, 1999 11:01 AM
Subject: Callback error


> ---------------------- Information from the mail
header -----------------------
> Sender:       Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU>
> Poster:       Matthew Lewis <MatthewL at KAPCOUSA.COM>
> Subject:      Callback error
> --------------------------------------------------------------------------
-----
>
> Hi,
>
> As I'd mentioned earlier, I'm working on a DLL for use with Euphoria.  I
> figured out how to get the callback, and how to call my euphoria function.
> However, I get an error when my program returns to the DLL.  I have MS
> Visual C++ 6, and the error that pops up is:
>
> -- Start error report
> Program: C:\EUPHORIA\BIN\EXW.EXE
> Module:
> File: i386\chkesp.c
> Line 42
> The value of ESP was not properly saved across a function call.  This is
> usually the result of calling a function declared with one calling
> convention with a function pointer declared with a different calling
> convention.
> -- End error report
>
> I've declared my function pointer as:
>
> int (*EuCallBack)(int, int)
>
> It passes values to my euphoria routine just fine, but crashes when it
comes
> back.  My function returns 1.  (I've also tried long (*EuCallBack)(int,
> int), and I got the same error.)  Do I need to do something special to
> return to the DLL?  Maybe use __stdcl* instead of the default __cdecl*?  I
> have no idea what i386\chkesp.c or ESP might be.
>
> Hopefully this makes sense to someone out there (Rob?)...
>
> Matthew W Lewis
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu