Problems using PowerVR PC Emulator on Win7


Hi guys, I recently threw out my xp and VS2008 installations in favour of Win7 and VS2010 Beta.

I was working on a little something using the PowerVRShell.
The code that worked previously now has yields the following error:

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

at
ShellAPIKEGLPVRShellAPI.cpp @ line 102 because the following call returns
something bogus and undefined: ndt = (NativeDisplayType)OsGetNativeDisplayType();

I'm aware that me changing both OS and VisualStudio is risky business.

Luckily this is just a hobby project.

I am interested if anyone else has had troubles under Win7, or has a slight idea what the problem could be.

EDIT: Tried with VS2008 also. Same problem.



nailer2009-09-05 22:01:15

Some of us here have been running Windows 7 and VS2008 and the emulation has been working correctly. Which precise version of the WindowsPC Emulation SDK are you using? It may be that an older version has incompatibilities.





This error is similar to what might appear if the project hasn’t been completely cleaned and rebuilt with the other compiler - I’d suggest verifying that you’ve done this as well.Gordon2009-09-07 10:25:57

Thanks for your reply.

I downloaded the SDK again two days ago, so I suppose I’m using the newest version.

I have rebuilt plenty of times, but maybe never cleaned it out the build directory entirely. I will have to try that.

I suspect it might be something with the calling convension as the error message states, but I’m not sure how to fix it. Even after reading this article here:
http://www.codeproject.com/KB/cpp/calling_conventions_demystified.aspx

I’m at work at the moment, so I’ll try a complete clean rebuild when I get home.