[not a bug]svn:1306

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
bloodbao
Posts: 15
Joined: Fri Aug 31, 2007 1:12 pm

[not a bug]svn:1306

Post by bloodbao »

when i rollback to the svn 1305 ,my code can pass!
when i update to the svn 1306,my code can't pass.

Code: Select all

void CModel::addShape(const c8* cpShapePath,const c8* cImage )
{        
    IAnimatedMesh* mesh = smgr->getMesh(cpShapePath); ////error this!
    node = smgr->addAnimatedMeshSceneNode( mesh ); 
    if (node)
    ......
}
error message:
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.

when compile irrlicht dll,set UNICODE version,catch exception.
it tell me that "cannot convert parameter 1 from 'irr::c8 *' to 'LPCWSTR'"
how can i deel with it?OH,bad luck!
Last edited by bloodbao on Wed Apr 02, 2008 2:44 am, edited 1 time in total.
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

err, yeah, make a c conversion, it'll fix it for now ^^
bloodbao
Posts: 15
Joined: Fri Aug 31, 2007 1:12 pm

Post by bloodbao »

thanks!
i try to convert ,but fail do it!
to expect your update!
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

or I thought I did such a correction. I might be wrong.
if it expects a wchar*, you'll need to convert it, probably by using a string, then using the wstring(string.begin(), string.end()) trick.

else it should be as simple as

IAnimatedMesh* mesh = smgr->getMesh((LPCWSTR)cpShapePath);

anyhow, try a bit by yourself before it is fixed, it's a good exercise :)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Simply recompile your whole app with the updated headers. I've added a IReadFile* interface for getMesh, so it uses a wrong method invocation offset due to old object code.
bloodbao
Posts: 15
Joined: Fri Aug 31, 2007 1:12 pm

Post by bloodbao »

getMeh prototype function maybe:
IAnimatedMesh* ISceneManager::getMesh(const c8* filename)

i use reinterpret_cast<> to convert ,it also can't pass!
Post Reply