0
我想用taglib#标记一些现有的mp3。 我有以下错误信息: “进程无法访问该文件,因为它正在被另一个进程使用。” 我不知道它可以是什么样的过程。我可以访问我的任何硬盘驱动器上的任何mp3文件,我也可以使用该文件的属性,但我无法保存更改。taglib#无法保存更改
这是代码。
OpenFileDialog f = new OpenFileDialog();
if ((bool)f.ShowDialog())
{
try
{
if (f.OpenFile() != null)
{
TagLib.File file = TagLib.File.Create(f.FileName);
file.Tag.Album = "Album1";
file.Save();
}
}
catch (Exception ex)
{
MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
}
}
else
{
MessageBox.Show("Problem occured, try again later");
}
你能帮帮我吗? 谢谢
如果这真的是你的错误,你的问题更多的是找出什么是MP3文件。是否http://stackoverflow.com/questions/317071/how-do-i-find-out-which-process-is-locking-a-file-using-net和http://stackoverflow.com/questions/177146/how-do-i-get-the-list-of-open-file-by-process-in-c help?除非,你不打开写访问流?奇怪的是,未使用的MP3正在使用。 – Jason 2012-03-16 23:11:05
'f.OpenFile()'永远不会返回'null'。 – SLaks 2012-03-16 23:13:35
为什么你认为点击取消意味着问题出现? – SLaks 2012-03-16 23:14:00