Function 5E03h Get Printer Setup

mov bx, ListIndex ;assign-list index

mov di, seg SetupString

mov es, di

mov di, offset SetupString ;es:di points to buffer for setup string

mov ax, 5E03h ;Get Printer Setup

int 21h

jc error_handler ;carry set means error

mov SetupSize, cx ;length of setup string

Get Printer Setup (Function 5E02h) retrieves the string of control characters added to the beginning of each file sent to a network printer.

Parameters

ListIndex

Specifies the assign-list index for a network printer.

SetupString

Points to a 64-byte buffer that receives the current string for the specified network printer.

Return Value

If the function is successful, the carry flag is clear, the buffer pointed to by the ES:DI registers is filled in with the string currently used for printer setup, and the CX register contains the length of the printer setup string. Otherwise, the carry flag is set and the AX register contains an error value, which may be 0001h (ERROR_INVALID_FUNCTION).

Comment

This function returns 0001h (ERROR_INVALID_FUNCTION) if the network is not running.

See Also

Function 5E02h Set Printer Setup
Function 5F02h Get Assign-List Entry