WinRT两次访问同一文件,给出灾难性故障错误

时间:2013-05-26 14:11:04

标签: c# windows-8 stream windows-runtime outputstream

我创建了将InkManager保存在本地存储中的方法,代码如下。但当我访问它两次时,我的错误......

  

灾难性故障(HRESULT异常:0x8000FFFF   (E_UNEXPECTED))

可能出现的错误是什么?

代码:

try
{
    StorageFile myMerge = await ApplicationData.Current.LocalFolder.CreateFileAsync("sign.png", CreationCollisionOption.ReplaceExisting);         

    using (IOutputStream signature = await myMerge.OpenAsync(FileAccessMode.ReadWrite))
    {
        if (signature != null)
        {
            await _inkManager.SaveAsync(signature);

            signature.Dispose();
        }
    }
    return myMerge;
}

0 个答案:

没有答案