如何在 Windows CE 5.0 上安全移除 USB 驱动器?
直到今天,我还假设 Windows CE 正在将所有内容写入磁盘,并且当我拔掉 USB 记忆棒时,我不会得到损坏的 FAT16。今天,事实证明我错了。
我使用 USB 记忆棒在 WinCE 5.0 设备上进行测试。我不会从应用程序或 WinCE 中向棒写入任何内容。我只是执行我的应用程序,我的应用程序从棒中读取其设置和图片。今天,正是这个操作顺序破坏了我的文件系统(我必须修复它)。
有没有办法告诉 WinCE 5.0 在移除棒之前先卸载它?它将其视为“硬盘驱动器”,并且点击并按住菜单中没有任何“安全删除驱动器”的内容。
我对执行此操作的代码和一些我在 Windows CE 中尚未找到的技巧感到满意。谢谢。
Until today, I assumed that Windows CE was writing everything to disk and I wouldn't end up with a broken FAT16 when I removed the USB stick. Today, I was proven wrong.
I use a USB stick to test things on a WinCE 5.0 device. I don't write anything from the app or WinCE to the stick. I just execute my app, and my app reads its settings and pictures from the stick. Today, just this order of operations broke my stick filesystem (and I have to fix it).
Is there a way to tell WinCE 5.0 to unmount the stick before I remove it? It sees it as a "Hard Drive", and the tap-and-hold menu has nothing along the lines of "safely remove drive".
I'm happy with both code to do this operation and some trick that I didn't find in Windows CE yet. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 FAT 文件系统注册表项禁用分页并禁用存储的缓存。显然,性能将会受到影响。
You can probably disable paging and disable caching for the store using the FAT File System registry entries. Performance is, obviously, going to suffer.