Duplicating the handle duplicates and ties all handle-specific information between hFile and pHfile. For example, if you move the read/write pointer of either handle with DosRead, DosSetFilePtr, or DosWrite, the pointer for the other handle also is changed.
The valid values for pHfile include the following handles for standard I/O, which are always available to the process:
0x00000000
If a file-handle value of a currently open file is specified in pHfile the file handle is closed before it is redefined as the duplicate of hFile. Avoid using arbitrary values for pHfile.
Issuing DosClose for a file handle does not affect the duplicate handle.
Protected file handles cannot be duplicated.