DosBufReset
Bindings: C, MASM
This call flushes a requesting process's cache buffers for a specific file
handle or for all file handles attached to that process. This call is also
used with the handle of a named pipe to synchronize a dialog between
communicating processes.
DosBufReset (FileHandle)
FileHandle (HFILE) - input
File handle whose buffers are to be flushed. If FileHandle = 0xFFFFH,
all of the process's file handles are flushed.
rc (USHORT) - return
Return code descriptions are:
0 NO_ERROR
2 ERROR_FILE_NOT_FOUND
5 ERROR_ACCESS_DENIED
6 ERROR_INVALID_HANDLE
Remarks
Upon issuing DosBufReset for a file handle, the file's buffers are
flushed to disk and its directory entry updated as if the file had been
closed; however the file remains in an open state.
Usage of this call to write out all files belonging to the requesting
process should be administered with caution. When the files reside on
removable media (diskettes), a call to DosBufReset could have the
undesirable effect of requiring the user to insert and remove a large
number of diskettes.
Named Pipe Considerations
Issuing DosBufReset for a named pipe performs an operation that is
analogous to forcing the buffer cache to disk. The request blocks the
calling process at one end of the pipe until all data it has written has
been read at the other end of the pipe.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs