#include "l_eprint.h"
L_INT EXT_FUNCTION L_EpnGetPrinterFromList (hPrintersList, pBatchPrinterInfo, nIndex)
HEPNPRINTERSLIST hPrintersList; |
/* handle to an existing printers list */ |
EPNBATCHPRINTERINFO L_FAR * pBatchPrinterInfo; |
/* pointer to a structure */ |
L_INT nIndex; |
/* index */ |
Gets information about a printer from the printers list.
Parameter |
Description |
hPrintersList |
Handle to an existing printers list, created by calling the L_EpnCreatePrintersList function. |
pBatchPrinterInfo |
Pointer to an EPNBATCHPRINTERINFO structure to be updated with the information about the printer intended to get from the printers list. |
nIndex |
A zero-based index of a printer to get from the printers list. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Support for Basic functionality must be unlocked by calling the L_EpnUnlockSupport function before using this function.
Required DLLs and Libraries
LPKRN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to ePrint Files. |
See Also
Example
/* The hPrintersList passed should have already created HEPNPRINTERSLIST that was created using the L_EpnCreatePrintersList function. */
L_VOID GetPrinterFromList( HEPNPRINTERSLIST hPrintersList, L_CHAR * pszPrinterName )
{
EPNBATCHPRINTERINFO Info;
ZeroMemory( & Info, sizeof( EPNBATCHPRINTERINFO ) );
Info.uStructSize = sizeof( EPNBATCHPRINTERINFO );
strcpy( Info.szPrinterName, pszPrinterName );
L_INT nIndexOfPrinter = 0;
if( SUCCESS == L_EpnIsPrinterInList ( hPrintersList, & Info, & nIndexOfPrinter ) )
{
L_EpnGetPrinterFromList( hPrintersList, & Info, nIndexOfPrinter );
}
}