Sign in to follow this  
cndv3996

lua with CWinThread

Recommended Posts

cndv3996    116
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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this