home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name PRINSTLD -- Determines whether print spooler is
- * installed.
- *
- * Synopsis instld = prinstld ();
- *
- * int instld Return code -- 0 (boolean false) if not
- * installed, not 0 (boolean true) if
- * installed.
- *
- * Description This function determines if the DOS print spooler
- * (usually PRINT.COM) has been installed.
- *
- * Special If the DOS the machine is running is older than 3.00,
- * Cases then PRINSTLD always returns 0.
- *
- * Returns Returns 1 if print spooler installed, 0 if not installed
- * or DOS older than 3.00.
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1987,1989
- *
- **/
-
-
- #include <dos.h>
-
- #include <bprint.h>
- #include <butil.h>
-
- #define FALSE 0
-
-
- int prinstld ()
- {
- union REGS regs;
-
- /* If DOS version is older than 3.00, we know that */
- /* there is no spooler we can talk to. */
- if (utdosmajor < 3)
- return (FALSE);
-
- else
- { /* When we put 0x0100 in AX, we are telling the */
- /* request processor that we mean device 1 (print */
- /* spooler), request 0 (installed??). */
- regs.x.ax = 0x0100;
-
- /* Do the request. */
- int86 (PR_DOS_INT, ®s, ®s);
-
- return ((regs.x.ax & 0xff) == 0xff);
- }
- }