StorageFile file = await KnownFolders.DocumentsLibrary.CreateFileAsync("\\recorder\\Charpter" + mCharpter + ".m4a", CreationCollisionOption.ReplaceExisting);
平板设备运行没问题。
超级本和虚拟机下报错。
An exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll but was not handled in user code Additional information: Error HRESULT E_FAIL has been returned from a call to a COM component.
请问是什么原因。
这个错误很General, 不过还是那几样你先检查下:
1, 你的平台是否匹配, 你的AppxManifest 设置是否包含了 .m4a 文件关联?
2, 是否在你的超级本和虚拟机下,账户对文档库访问有权限设置?是否你在文档库中添加或者改变了默认设置?
还有,因为错误信息太宽泛,我建议是,你可以先用一个简单的没有任何额外功能的代码进行测试,然后一步步添加其功能,这样可以缩小问题的范围。
Bob Bao [MSFT] MSDN Community Support | Feedback to us