dos12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DosMonOpen (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSMONITORS
 
USHORT DosMonOpen(pszDevName, phmon)
PSZ pszDevName;     /* pointer to device name                 */
PHMONITOR phmon;    /* pointer to variable for monitor handle */
 
The DosMonOpen function opens a monitor and creates a handle that can be
used to identify the monitor. Only one monitor per process is allowed──that
is, DosMonOpen must not be called more than once by any process.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
pszDevName  Points to a null-terminated string. This string specifies the
            name of the device for which the monitor is to be opened.
 
phmon       Points to the variable that receives the monitor handle.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
     ERROR_MON_INVALID_DEVNAME
     ERROR_NOT_ENOUGH_MEMORY
 
Comments
 
You can determine whether a device supports a monitor by using the
DosDevIOCtl function. For more information, see DEV_QUERYMONSUPPORT.
 
See Also
 
DosMonClose, DosMonRead, DosMonWrite, DEV_QUERYMONSUPPORT