有什么方法可以让两个程序访问同一文件
我在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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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 useLockFileEx
or a mutex for synchronization.