MS-DOS Device Names

Product Version(s): 3.20
Operating System:   MS-DOS
Flags: ENDUSER |
Last Modified: 12-MAY-1988    ArticleIdent: Q10200

Question:
   DOS treats file names such as CON and ERR as device names when the
DOS2FOR library is used.
   Can DOS treat any file name as a device?

Response:
   The association of the name ERR to the DOS device handle "stderr"
is done by FORTRAN (i.e., DOS2FOR, not DOS itself).
   There is no FORTRAN command, subroutine, or function to determine
whether or not a given name is the name of a DOS device. It is
possible to make this determination in an assembly language subroutine
by doing the following:

   1. Open a handle using the file name
   2. Perform an IOCTL call on that handle
