为什么我的代码中的mciSendString()获取状态位置失败? [英] why mciSendString() to get status position fails in my code?
本文介绍了为什么我的代码中的mciSendString()获取状态位置失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以查询mci设备以查询当前的播放位置,以便我们可以从那里恢复播放,以便以后播放?
Is there any way to query mci device to query current playing position so that we can resume from there to play later on ?
cmd.Format(L状态%d waveaudio位置",m_iDeviceIDPlayer);
cmd.Format(L"status %d waveaudio position",m_iDeviceIDPlayer);
mcirez = mciSendString(cmd,buff.GetBuffer(),1024,NULL);
mcirez = mciSendString(cmd,buff.GetBuffer(),1024, NULL);
它给出此错误:指定的设备未打开或未被MCI识别"
it gives this error : "The specified device is not open or is not recognized by MCI "
命令有问题吗?
推荐答案
MCI_STATUS_PARMS status;
status.dwItem = MCI_STATUS_POSITION;
status.dwCallback = 0;
dwReturn = mciSendCommand(m_iDeviceIDPlayer,MCI_STATUS,MCI_STATUS_ITEM|MCI_WAIT,(DWORD_PTR)&status);
位置-> status.dwReturn是必需的位置.
Position -> status.dwReturn is the required position.
这篇关于为什么我的代码中的mciSendString()获取状态位置失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文