Q: I get the error "Access Denied" when I try to open my audio file after playing it.
You may be using the SND_ASYNC flag when playing the audio file. This allows the function to return immediately after being called. Try using the SND_SYNC flag, which doesn't return from the function till the file has completed playing out.
sndPlaySound(_T("\\mywav.wav"), SND_ASYNC);
For further reading about Windows CE audio, please see the CE Audio topic index.