文件共享(不) [英] File Sharing (not)

查看:102
本文介绍了文件共享(不)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个程序同时在多台PC上运行(VS6.0,C ++,MFC).客户数据文件集中存储在网络上.他抱怨说相同的数据文件可以同时在不同的计算机上打开,而对一个文件所做的更改被另一个文件覆盖.

检查两台PC是否正在访问同一文件是我的问题吗?

如果是我的问题,是否可以通过编程方式检测文件是否已打开

谢谢

I have a program running on several PCs at the same time (VS6.0, C++, MFC). The customers data files are stored centrally on the network. He''s complaining that the same data file can be open on different computers at the same time and changes made to one are being overwritten by the other.

Is it my problem to check if two PCs are accessing the same file or is it an IT function?

If it is my problem is there anyway to detect programatically whether a file is already open somewhere else?

Thanks

推荐答案

Caslen写道:

如果是我的问题,是否有办法以编程方式检测文件是否已在其他位置打开?

If it is my problem is there anyway to detect programatically whether a file is already open somewhere else?



以独占方式打开它.所有其他尝试将失败.



Open it exclusively. All other attempts will fail.


这篇关于文件共享(不)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆