Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hey, I'm developing a basic app.. Which requires a text file to be kept synchronous with it..If any changes made in text file should be updated in my App.. I don't where to start... Any help or suggestions???
Thank you..
Posted

1 solution

ReadDirectoryChangesW() can be used to observe the changes in a directory.

http://weseetips.com/2008/06/11/how-to-get-the-filedirectory-change-notifications/[^]

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v=vs.85%29.aspx[^]

Please create a thread to observe the changes for the directory which have text file. If the changed file(FileName of FILE_NOTIFY_INFORMATION) is your text file, then notify your dialog to read data from text file. This way you can synchronize the text file with your application.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



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