Naming conventions for character devices are similar to those for naming files. The OS/2 operating system has reserved certain names for character devices supported by the base device drivers. These device names are listed below:
CLOCK$
These names can be used with DosOpen to open the corresponding devices. Reserved device names take precedence over file names; DosOpen checks for a device name before checking for a file name. Do not use a file name which is the same as a reserved device name; the file will never be opened, because the command will open the device instead.
COM1 through COM4 are reserved device names only when the ASYNC (RS-232C) device driver is loaded. The same is true for POINTER$ and MOUSE$, which are reserved only when a mouse device driver is loaded.
An application can call DosQueryFHState to verify that a file or device has been opened. See Determining and Setting the State of a File or Device Handle for more information on getting the state of a file handle.