#define GETSETPAPERBINS 29 |
short Control(lpDevice, GETSETPAPERBINS, lpInData, lpOutData) | |||
LPPDEVICE lpDevice; | |||
LPBININFO lpInData; | |||
LPBININFO lpOutData; |
The GETSETPAPERBINS escape retrieves the number of paper bins available on a printer and sets the current paper bin.
lpDevice
Points to a PDEVICE structure specifying the destination device.
lpInData
Points to a BININFO structure that specifies the new paper bin. This parameter may be set to NULL. The BININFO structure has the following form:
typedef struct tagBININFO {
short BinNumber;
short NbrofBins;
short Reserved[4];
} BININFO;
lpOutData
Points to a BININFO structure that receives information about the current or previous paper bin and the number of bins available. This parameter may be set to NULL.
The return value is TRUE, if successful. Otherwise, it is FALSE.
If the lpInData parameter is NULL and the lpOutData parameter points to a BININFO structure, the escape retrieves the number of bins and the number of the current bin.
If both lpInData and lpOutData point to BININFO structures, the escape sets
the current bin to the number specified in the BinNumber member of the struc-ture pointed to by lpInData and retrieves the number of the previous bin.
If lpInData points to a BININFO structure but lpOutData is NULL, the escape sets the current bin to the number specified in the BinNumber member of the structure pointed to by lpInData.
When setting the paper bin with GETSETPAPERBINS, the bin selected is set for the current job by setting the bit 15 of the bin index. If this bit is not set, the selected paper bin becomes the default for later print jobs, and the current job's selection is unchanged. Setting bit 15 enables an application to change bins in the middle of a printing job.