This sample shows a very simple console program that displays
some information about the local printers installed on the local system. For
this, it uses the EnumPrinters() API in level 2, which returns the printers
information in a PRINTER_INFO_2 structure array. Some of the information
contained therein is:
So, without anything else, here it is: enumprint.c