lua with CWinThread
i'm using MFC.i created a thread with AfxBeginThread(),and wanted to call lua_dofile() in it,but failed...the program crashed...
the thread function is like this:
UINT ScriptThrd(LPVOID pView)
{
while(1)
{
if(((CplunderView*)pView)->theScript[0]!=0)
{
((CplunderView*)pView)->theLua.DoFile("Script/start.lua");
//theLua.DoFile()is a wrapper of lua_dofile();
}
AfxGetThread()->SuspendThread();
}
return 0;
}
can i solve it?
only detective is forever,not spy...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement