You should only call the wpSetRefreshFlags method only at a time when your object class is controlling the process of refreshing a folder. For example, if you have overridden the wpRefresh method for a subclass of WPFolder, you can set and query the refresh flags while your wpRefresh method is in control. You should not try to modify the refresh flags while the Workplace Shell's wpRefresh method is in control.
The refresh flags consist of a DIRTYBIT and a FOUNDBIT that are used to detect deleted files and new files when refreshing the contents of a folder.
For example, if you develop a subclass of wpFolder which contains objects that represent entries in a database (where the database may get updated independently from your objects), you might want to resynchronize your folder full of objects with the contents of the database. One possible technique follows:
This kind of technique can be implemented using private flags, or by using the flags provided by the wpQueryRefreshFlags and wpSetRefreshFlags methods.