VpeGetDevPaperBinName

<< Click to Display Table of Contents >>

Navigation:  Device Control Properties >

VpeGetDevPaperBinName

Previous pageReturn to chapter overviewNext page

[Windows platform only; not supported by the Community Edition]

Returns the paper bin name specified by "index" of the currently selected output device.  If index is out of range, an empty string ("") will be returned. This method only works correctly if you called VpeDevEnumPaperBins() before.

void VpeGetDevPaperBinName(

VpeHandle hDoc,

int index,

LPSTR bin_name,

int size

)

VpeHandle hDoc

Document Handle

int index

must be in the range between 0 and the value returned by VpeDevEnumPaperBins() - 1

LPSTR bin_name

receive string for the paper bin name

int size

maximum size of the receive string "bin_name"

Returns:

the Paper Bin name in parameter "bin_name"

Remarks:

In case of an error, LastError is set to VERR_COMMON. This method only works correctly if you called VpeDevEnumPaperBins() before.

Example:

char s[256]

count = VpeDevEnumPaperBins(hDoc) - 1        // initialize enumeration

for i = 0 to count

 VpeGetDevPaperBinName(hDoc, i, s, sizeof(s))

 MessageBox(s)   // show each available bin in a separate message box

next i

 

Do not call VpeDevEnumPaperBins() repeatedly, because each time VPE will query all available paper bins of the currently selected output device from the system.

WRONG EXAMPLE:

char s[256]

for i = 0 to VpeDevEnumPaperBins(hDoc) - 1

 VpeGetDevPaperBinName(hDoc, i, s, sizeof(s))

 MessageBox(s)   // show each available bin in a separate message box

next i