TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Konata Izumi
NA
3
0
Cannot access file error
Nov 1 2009 10:14 AM
I am debugging a program that combines several wav files into one. This code always gives me an error message:
try
{
outFileStream = new FileStream(outputFile, FileMode.Create);
}
catch (Exception ex)
{
MessageBox.Show(ex.GetBaseException().ToString());
}
The error message is:
System.IO.IOException: The process cannot access the file 'C:\Documents and Settings\ .... \02.wav' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at LiveDescribe.WavFile.writeAudioFileHeader(String outputFile, Boolean pStereo) in C:\Documents and Settings\ .... \WavFile.cs:line 503
note: line 503 is the line outFileStream = new FileStream(...)
How can I make it work?
Thanks.
Reply
Answers (
4
)
Calculation in DataGridView cells
Xbox CON Files