I am using the Cloud File API as a sync client and to track version history.
I noticed that I recieve a notification that a file’s content has changed when I open a dehydratedcloud-only structured storage file type, such as Powerpoint (.ppt) or Excel (.xls), with this call:
StgOpenStorageEx(fullPath, STGM.STGM_DIRECT_SWMR | STGM.STGM_READWRITE | STGM_SHARE_DENY_WRITE, STGFMT_DOCFILE, defaul, default, default, IID_IStorage, out var iptr)
The Cloud Filter API marks the filer as needing to be synced. CfUpdatePlaceholder(HFILE fileHandle, IntPtr fsMetadata, IntPtr fileIdentity, uint fileIdentityLength,CF_FILE_Range[]? dehydrateRangeArray, uint dehydrateRangeCount, CF_UPDATE_FLAGS updateFlags, ref long updateUsn, IntPtr overlapped)
is triggered when this happens.
Why might this be occuring on a read for these special file types?
References:
- Cloud Filter Api
- Structured Storage Types and StgOpenStorageEx
Expectation: Opening structured storage file for read should not be notified of a content changed event.
Chisom A is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.