TBLT_RETC TBLT_ENTRY BltIx4FlushHeader(TBLT_KH *khPtr); khPtr IO:index file control structureThis routine flushes the internal IX4 header data to the IX4 index file on disk and updates the directory entry for the correct size.
This routine is essential for multi-access use. It is used in conjuntion with the Lock routines. Before unlocking the index file a call to this routine is necessary to ensure that the disk image is up-to-date for the next access, which may be made from anywhere not just your program.
This routine is automatically called by BltUnlockIx4File()
.
Any file that has been written to and had its size changed or its internal
representation changed does not have this change written to disk until a
flush is done, or the handle is closed. A flush can be performed after
every write action (BltIx4Insert()
, for example), or not until
the handle is closed, or somewhere in between those two extremes, such as
when an idle period is detected. This is important also since this routine
tells the operating system to flush its buffers for this handle to disk, as well.
Return: Non-zero indicates an error, otherwise the file's IX4 header
was updated.