MCI包装器使文件挂起 [英] MCI Wrapper keeps the file hanged

查看:72
本文介绍了MCI包装器使文件挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基瑟尔先生您好,

我想知道您是否可以对您在codeproject中发布的MCI包装程序有所帮​​助.

我想在播放后使用CFile打开文件,但是发生访问错误.

我输入了MM_MCINOTIFY回调,如下所示:

LRESULT CWrapperDlg :: OnMCIWnd_Notify(WPARAM wParam,LPARAM lParam)
{
m_mciWnd.Close();

CFile kFile;
CFileException kE;

if(kFile.Open(MakePathToInstalledFile(_T("CLOCKTXT.AVI")),CFile :: modeRead,&kE))
kFile.Close();

返回0;
}

它因访问冲突而失败,似乎文件仍很忙.
你能帮我吗?

非常感谢
Emanuele Russo

Hello Mr Kissel,

I was wondering if you may help me a bit with the MCI wrapper you posted here in codeproject.

I wanted to open the file with a CFile after it is played but an access error occurs.

I put an MM_MCINOTIFY callback like this:

LRESULT CWrapperDlg::OnMCIWnd_Notify(WPARAM wParam, LPARAM lParam)
{
m_mciWnd.Close();

CFile kFile;
CFileException kE;

if(kFile.Open(MakePathToInstalledFile(_T("CLOCKTXT.AVI")), CFile::modeRead, &kE))
kFile.Close();

return 0;
}

It fails with an access violation, it seems that the file is still busy.
Could you help me??

Thanks a lot
Emanuele Russo

推荐答案

您可以尝试在m_mciWnd.Close()之后放置一个Sleep,等待一会儿.
You could try and wait for a while after the m_mciWnd.Close() by putting a Sleep.


这篇关于MCI包装器使文件挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆