Click here to Skip to main content
15,900,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

You could try and wait for a while after the m_mciWnd.Close() by putting a Sleep.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900