DosClose
Bindings: C, MASM
This call closes a handle to a file, pipe, or device.
DosClose (FileHandle)
FileHandle (HFILE) - input
Handle returned by a previous DosOpen, DosMakeNmPipe, or DosMakePipe
call.
rc (USHORT) - return
Return code descriptions are:
0 NO_ERROR
2 ERROR_FILE_NOT_FOUND
5 ERROR_ACCESS_DENIED
6 ERROR_INVALID_HANDLE
Remarks
Issuing DosClose with the handle to a file closes a handle to a file,
pipe, or device.
If one or more additional handles to a file have been created with
DosDupHandle, the directory is not updated and all internal buffers are
not written to the medium until DosClose has been issued for the
duplicated handles.
Closing a handle to a device causes the device to be notified of the
close, if appropriate.
Named Pipe Considerations
DosClose closes a named pipe by handle. When all handles referencing one
end of a pipe are closed, the pipe is considered broken.
If the client end closes, no other process can re-open the pipe until the
serving end issues a DosDisConnectNmPipe followed by a DosConnectNmPipe.
If the server end closes when the pipe is already broken, it is
deallocated immediately; otherwise, the pipe is not deallocated until the
last client handle is closed.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs