OK. I've got more time now, so I read your code. My naswer is still correct, but the code I posted isn't. Here's the latest (promise!!) version.
(Moderators: If I'm breaking any rules with all this reposting just let me know and I won't do it again.)
Code:
static DWORD time = GetTickCount ();
while (thisEngine->m_movieBuff.size()>0){while (GetTickCount () - time < 40){
Sleep (0);
}
time = GetTickCount ();
//all your code
}