Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:docs:fapi:dosbufreset [2020/12/06 10:39] – prokushev | en:docs:fapi:dosbufreset [2021/09/17 03:39] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{logos:os2.gif? | + | {{page>en:templates:fapiint}} |
====== DosBufReset ====== | ====== DosBufReset ====== | ||
Line 5: | Line 5: | ||
This call flushes a requesting process' | This call flushes a requesting process' | ||
- | ==Syntax== | + | ===== Syntax |
+ | |||
+ | <code c> | ||
+ | DosBufReset (FileHandle) | ||
+ | </ | ||
+ | |||
+ | ===== Parameters ===== | ||
- | DosBufReset (FileHandle) | ||
- | ==Parameters== | + | *FileHandle ([[HFILE]]) - input : File handle whose buffers are to be flushed. If FileHandle |
- | *FileHandle (HFILE) - input : File handle whose buffers are to be flushed. If FileHandle | + | ===== Return Code ===== |
- | ==Return Code== | + | rc ([[USHORT]]) - return |
- | rc (USHORT) - return | + | |
| | ||
Return code descriptions are: | Return code descriptions are: | ||
Line 23: | Line 27: | ||
* 6 ERROR_INVALID_HANDLE | * 6 ERROR_INVALID_HANDLE | ||
- | ==Remarks== | + | ===== 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. | 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. | ||
Line 29: | Line 34: | ||
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), | 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), | ||
- | ===Named Pipe Considerations=== | + | ====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. | 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. | ||
- | ==Example Code== | + | ===== Example Code ===== |
- | ===C Binding=== | + | |
+ | ==== C Binding ==== | ||
<code c> | <code c> | ||
Line 93: | Line 100: | ||
</ | </ | ||
- | ===MASM Binding=== | + | ==== MASM Binding ==== |
<code asm> | <code asm> | ||
EXTRN DosBufReset: | EXTRN DosBufReset: | ||
Line 103: | Line 111: | ||
Returns WORD | Returns WORD | ||
- | ====== Note ====== | + | ===== Note ===== |
Text based on [[http:// | Text based on [[http:// |