-
Ok, i have a big fat problem
My process to change a file while playing it in winamp do this:
1. saves the position, stops the file
2. writes to it
3. continues to play from the position
(so i am not only pausing it)
So when i access write the file i get a error 75 - Path/File access error
This occurs not in acccess read
I tried to move or delete the file with explorer and it worked fine.
I also used Close keyword in immediate to Close all files (Close all accessed files in vb) but it's still giving the same error. Also any other file can be accessed so this MUST be Winamp causing it. Why am i then able to move or delete it with explorer?
What's wrong?
Help needed.
Than
-
Maybe it's because Winamp still has the file open. Just because you stopped playing it doesn't mean the file is closed. Try closing Winamp, then write to the file and then use the Shell statement to open winamp again and play the song.
-
or you might not have closed the file tjhat you were previously saving to, i have just done a program with text files and they are a bit of a pain in the arse, they need a lot of error handling. :(
-
Well, well, well, how stupid can a person be? Well not as stupid as me, i have over 300 mp3's in that folder and one single mp3 was readonly. And of course it was that which was playing, oh, that kind of things make me sick. I fixed some additional handling for that.
About errorhandling, try to get rid of it us much as possible, put all errorcausing statements under possible conditions or put them in separate functions with separated errorhandling because it's a pain to not having the other errors shown.