Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
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
Posted

1 solution

Caslen wrote:
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.

 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900