ENUMPAPERBINS

short Escape(hdc, ENUMPAPERBINS, sizeof(int),lpNumBins,lpOutData)

The ENUMPAPERBINS printer escape is maintained for backwards compatibility. Applications written for Windows 3.1 should call the DeviceCapabilities function with the DC_BINNAMES index to retrieve the number of available paper bins and the name of each bin.

This escape retrieves attribute information about a specified number of paper bins. The GETSETPAPERBINS escape retrieves the number of bins available on a printer.

Parameters

hdc

HDC Identifies the device context.

lpNumBins

LPINT Points to an integer that specifies the number of bins for which information is to be retrieved.

lpOutData

LPSTR Points to a structure to which information about the paper bins is copied. The size of the structure depends on the number of bins for which information was requested. For a description of this structure, see the following Comments section.

Return Value

The return value specifies the outcome of the escape. This value is 1 if the escape is successful. It is zero if the escape is not successful or not implemented.

Comments

The structure to which the lpOutData parameter points consists of two arrays. The first is an array of short integers containing the paper-bin identifier numbers in the following form:

short BinList[cBinMax]

The number of integers in the array (the cBinMax value) is equal to the value pointed to by the lpNumBins parameter.

The second array in the structure to which lpOutData points is an array of characters in the following form:

char PaperNames[cBinMax][cchBinName]

The cBinMax value is equal to the value pointed to by the lpNumBins parameter. The cchBinName value is the length of each string (currently 24).