#include "l_eprint.h"
L_INT EXT_FUNCTION L_EpnRemovePrinterFromList (hPrintersList, nIndex)
HEPNPRINTERSLIST hPrintersList; |
/* handle to an existing printers list */ |
L_INT nIndex; |
/* index */ |
Removes the printer at the specified index from the printers list.
Parameter |
Description |
hPrintersList |
Handle to an existing printers list, created by calling the L_EpnCreatePrintersList function. |
nIndex |
A zero-based index of the printer to be removed 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 created using the L_EpnCreatePrintersList function. */
L_VOID RemovePrinterFromList( 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_EpnRemovePrinterFromList( hPrintersList, nIndexOfPrinter );
}
}