1010
1010
printers AddPrinter takes a while. So we'll tag all printers that
1011
1011
were automatically added last time around, if they still exist
1012
1012
we'll leave them be otherwise we'll delete them. */
1013
EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 5, NULL, 0, &needed, &num);
1013
if (EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 5, NULL, 0, &needed, &num) && needed) {
1015
1014
PRINTER_INFO_5A* pi = HeapAlloc(GetProcessHeap(), 0, needed);
1016
1015
if(EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 5, (LPBYTE)pi, needed, &needed, &num)) {
1017
1016
for(i = 0; i < num; i++) {