Alright, after 2 weeks of nil and finding MY OWN post on loads of various RSS feeds, I am posting an update.
I found a "hack" to play files one after another.
Remember, MCI does NOT handle threads really well...even if we only have one, so a thread "handler" would still give "unexpected" results. So, I looked into windows messages.
So, when passing the command, as in lptstring="play FILENAME", we add "notify". So, the full string appears as: "play FILENAME notify".
Now, what does that do? Well, after a successful play of a file, it will send out a message. I had learned about this:
#define MM_MCINOTIFY 0x3B9
but I did not know how I could have MCI trigger it...however, a good search in the MSDN library turned up "notify" and everything went "smooth" from there...(except if you call MCISendString too much, you will end up with a NULL POINTER EXXCEPTION!!!)
Well....hope that helps anyone with similiar problems..
/* code snippet */
protected override void WndProc(ref Message mes)
{
if (mes.Msg == 0x3B9)
{
if (videoplayer!=null)
{
videoplayer.VideoClose();
videoplayer.PlayNextVideo(videoBox, this.Handle);
}
}
base.WndProc(ref mes);
}
/*end */