BOOL EnumPrinters(
DWORD Flags, // types of printer objects to enumerate
LPTSTR Name, // name of printer object
DWORD Level, // specifies type of printer info structure
LPBYTE pPrinterEnum,// pointer to buffer to receive printer info structures
DWORD cbBuf, // size, in bytes, of array
LPDWORD pcbNeeded,// pointer to variable with no. of bytes copied (or required)
LPDWORD pcReturned // pointer to variable with no. of printer info. structures copied
);