In CBFS Vault, the purpose of most events is to let an application provide custom data storage, encryption, or compression routines. Events are also used to communicate the progress of long-running operations.
Events are easy to understand and to use, but keep the following things in mind when implementing an application's event handlers:
- Event handlers must not perform any operations, explicitly or implicitly, against files opened in buffered mode. Any file accessed from an event handler must be opened using the Windows API's FILE_FLAG_NO_BUFFERING flag.
- Event handlers must not perform any asynchronous procedure calls (APCs).
- If the currently-open vault is stored in a file on an NTFS-formatted disk, neither the file containing the vault nor the disk said file resides on can be compressed or encrypted using NTFS features.
Events handlers which violate any of the restrictions described above will cause a system-wide deadlock.