cramer@optilink.UUCP (Clayton Cramer) (09/25/89)
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. I have been calling the system function call with the PRINT command as the argument up til now, but that burns off a lot of RAM while system is executing, and I would prefer to cut out the unnecessary levels of calls, if possible. -- Clayton E. Cramer {pyramid,pixar,tekbspa}!optilink!cramer What shall it be today? Watch Three's Company? Or unify the field theory? ---------------------------------------------------------------------------- Disclaimer? You must be kidding! No company would hold opinions like mine!
poj@saturn.dk (Per Olsvig Jensen) (09/26/89)
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