1
“文件名”已经损坏:Windows Phone的8.1
我从独立存储启动文件,当我调试的下一个代码,先前流被关闭,并得到此异常。
"File-Name" has been damaged and can't be opened.
见下面我的代码:
using (IsolatedStorageFile storageFile = IsolatedStorageFile.GetUserStoreForApplication())
{
using (stream = storageFile.OpenFile("Document.docx", FileMode.Create))
{
await stream.WriteAsync(buffer, 0, buffer.Length);
}
}
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile pdffile = await local.GetFileAsync("Document.docx");
await Windows.System.Launcher.LaunchFileAsync(pdffile);
哪行代码导致错误? – 2014-10-30 09:15:53
@DecadeMoon感谢兄弟的回复,但现在我收到了新的错误。 “FILE_NAME”已损坏,无法打开“请帮助我,如何解决它? – 2014-10-30 09:22:05
@DecadeMoon我正在尝试启动office文件和pdf文件。 – 2014-10-30 09:22:30