Interrupt 2Fh Function 0101h Add File to Queue

mov dx, seg AddPacket

mov ds, dx

mov dx, offset AddPacket ;ds:dx points to level and filename

mov ax, 0101h ;Add File to Queue

int 2Fh ;Multiplex Interrupt

Add File to Queue (Interrupt 2Fh Function 0101h) adds a file to the print queue.

Parameter

AddPacket

Points to a QUEUEPACKET structure that contains the name of the file to add. The QUEUEPACKET structure has the following form:

QUEUEPACKET STRUC

qpLevel db 0 ;level, must be zero

qpFilename dd ? ;segment:offset pointing to ASCIIZ path

QUEUEPACKET ENDS

For a full description of the QUEUEPACKET structure, see Section 7.11, “Structures.”

Return Value

If the function is successful, the carry flag is clear. Otherwise, the carry flag is set and the AX register contains an error value, which may be one of the following:

Value Name

0001h ERROR_INVALID_FUNCTION
0002h ERROR_FILE_NOT_FOUND
0003h ERROR_PATH_NOT_FOUND
0004h ERROR_TOO_MANY_OPEN_FILES
0005h ERROR_ACCESS_DENIED
0008h ERROR_QUEUE_FULL
000Ch ERROR_INVALID_ACCESS
000Fh ERROR_INVALID_DRIVE

See Also

Interrupt 2Fh Function 0102h Remove File from Print Queue