Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!eru!luth!sunic!dkuug!daimi!saturn!poj
From: poj@saturn.dk (Per Olsvig Jensen)
Newsgroups: comp.sys.ibm.pc
Subject: Re: Print Spooler Interrupts in DOS
Message-ID: <3283@daimi.dk>
Date: 26 Sep 89 10:03:18 GMT
References: <2381@optilink.UUCP>
Sender: news@daimi.dk
Reply-To: poj@daimi.DK (Per Olsvig Jensen)
Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
Lines: 59

In article <2381@optilink.UUCP> cramer@optilink.UUCP (Clayton Cramer) writes:
>Has anyone used the print spooler interrupts INT 2F, AH = 0100 through
>0105?  I'm trying to do so, and I'm having some problems.  If the DOS
>print spooler is already installed, trying to submit a file to the
>print spool gives the "function invalid" error code.  If I don't have
>the DOS print spooler installed, I get the "spooler busy" error code.
>
>-- 
>Clayton E. Cramer {pyramid,pixar,tekbspa}!optilink!cramer


Hmm, are you sure ? I'm using the multiplexor print commands with success.
A couple of possible errors strike me:
  a) before you are trying to send the file you check with 'hold queue/
     get status' call AX=0104h and forgets to release the queue again
     with 'restart queue' call AX=0105h
  b) when you submit the file, your parameters aren't correct, they should
     be:
        AX = 0102h
        DS:DX pointer to submit packet:
                          BYTE level must be 0
                          ASCIIZ file name must contain the
                          drive, path and filename of the file
                          you want to print. Terminate with a 0C.
                          The filename cannot contain wildcards.
  c) you misinterpret the result parameters:
     only if the carry flag CF is set, you should care about the
     error register AX.

I'd better mention that I've only tried using this on DOS vers 3.21
on my vanilla IBM AT.

Hope this helps.

P.S. If it doesn't you might want to try an other solution:
The (undocumented) Interrupt 2Eh is an Alternate EXEC, which
passes a command line addressed by DS:SI to the upmost COMMAND.COM.
The command line must be formatted just like the unformatted parameter
area of a Program Segment Prefix. That is, the first byte must be a
count of characters, and the second and subsequent bytes must be a
command line with parameters, including redirection and piping,
terminated by a carriage return and a null byte. The count does not
include the carriage return.
  But beware:
    Destroys ALL registers including stack pointer !
    (only code segment preserved).
    If called from a program that was called from a batch file,
    it will abort the batch file.
    If executed from a program which has been spawned by the EXEC
    function, it will abort the whole chain and probably lock up
    the computer.
    Calling another program, which in turn do another INT 2Eh,
    will forget the first INT2Eh call.
    This is all due to that COMMAND.COM only remembers ONE call.
    Maybe its different in DOS 3.3+, I haven't tried.

Regards
Per Olsvig Jensen
poj@daimi.dk