Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

ESP Exception Using Callbacks

$
0
0

(using a modified Events example)
I'm getting an exception in ctx->Execute() when returning from a callback. It takes a bit of explaining below, but hopefully you'll follow.

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. occurred

Following the Developers Guide, in the App, I registered a funcdef and function for setting a callback:
// Register a simple funcdef for the callback
engine->RegisterFuncdef("void CallbackFunc()");

// Register a function …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>