Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!boulder!ccncsu!longs.LANCE.ColoState.Edu!gs940971 From: gs940971@longs.LANCE.ColoState.Edu (glen sunada f84) Newsgroups: comp.sys.ibm.pc Subject: Re: HELP! Using DOS print Message-ID: <3296@ccncsu.ColoState.EDU> Date: 29 Nov 89 17:13:18 GMT References: <3289@ccncsu.ColoState.EDU> <6534@brspyr1.BRS.Com> Sender: news@ccncsu.ColoState.EDU Reply-To: gs940971@longs.LANCE.ColoState.Edu (glen sunada f84) Distribution: usa Organization: Colorado State U. Center for Computer Assisted Engineering Lines: 52 In my article I expressed ignorence to the mechanism used to communicate with print I recieved a mail message from Raymond Chen at Berkley that set me on the correct path to locateing that method. I then looked up the specifics in the Waite Group's _MS-DOS Developers Guide_ Second editions. What follows is my reply to him: >>Print uses some mechanism to detect if it is already resident to prevent >>multiple copies of the resident code. I do not know how this is done > >It installs itself into the DOS multiplex interrupt (Int 21, ah = 2f, >I think). This is a quasi-standard way of checking for multiple >installations, once you get an official multiplex ID number. I found my DOS reference and print does install itself on the DOS Multiplex interrupts. That is interruipt 2f. The calling parameters for interrupt 2f are as follows. AH = program code (supplied DOS codes as folows) 01 - print 02 - assign 10 - share b7 - append AL = requested function code 00 - get installed state (all) 01 - submit file to print DS:DX = pointer to submit packet 0 + DWORD pointer to ASCIIZ filespec 02 - cancel file in print queue DS:DX = pointer to fully qualified (no wild card) ASCIIZ filespec to cancel 03 - Cancel all files in print queue 04 - pause print and return status (I don't know the return codes here) 05 - end of print status (I don't know these reutrns either) Gaurenteed return codes if CF = 1 AX = error code if AL = 0FF a program with your identifier is installed if AL = 0 no program with your identifer installed ok to install if AL = 1 no program with your identifer installed not ok to install Glen Sunada gs940971@longs.LANCE.ColoState.EDU ARPA Internet (preferred) ...ncar!boulder!ccncsu!longs.LANCE.ColoState.EDU!gs940971 UUCP Money is the root of all evil. Men need roots. - Lazerus Long