public void MessageHandler(int msgtype, IntPtr msgdata)
{
switch(msgtype)
{
case (int)InterProcess.MSG_MEDIA_ENDED:
MediaEnded();
break;
case (int)InterProcess.MSG_MEDIA_LENGTH:
medialength = InterProcess.GetMessageData<int>(msgdata);
ShowMediaInfo(currentmediapos, medialength);
break;
case (int)InterProcess.MSG_MEDIA_POSITION:
currentmediapos = InterProcess.GetMessageData<int>(msgdata);
ShowMediaInfo(currentmediapos, medialength);
break;
}
}