如何在 Windows CE 5.0 上安全移除 USB 驱动器?

发布于 2024-09-10 09:32:50 字数 337 浏览 0 评论 0原文

直到今天,我还假设 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

埋情葬爱 2024-09-17 09:32:50

您可以使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文