有什么方法可以让两个程序访问同一文件

发布于 2025-01-31 19:16:34 字数 58 浏览 8 评论 0原文

我在Windows计算机上运行拖曳程序,需要同时访问相同的文件。

我将如何实现这一目标?

I have tow programs running on my windows computer that I need to access the same files at the same time.

How would I go about achieving this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

豆芽 2025-02-07 19:16:35

createFile的参数之一指定共享模式。这两个应用程序都必须同意分享阅读和/或写作。如果一个或两个应用程序将写入文件,则需要使用lockfileex或mutex进行同步。

One of the parameters to CreateFile specifies the sharing mode. Both applications have to agree to share reading and/or writing. If one or both of the applications are going to write to the file then you need to use LockFileEx or a mutex for synchronization.

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