'api_winspool.sbp


#ifndef _INC_WINSPOOL
#define _INC_WINSPOOL

#ifdef UNICODE
Const _FuncName_EnumPrinters = "EnumPrintersW"
#else
Const _FuncName_EnumPrinters = "EnumPrintersA"
#endif

Type PRINTER_INFO_5W
	pPrinterName As LPWSTR
	pPortName As LPWSTR
	Attributes As DWord
	DeviceNotSelectedTimeout As DWord
	TransmissionRetryTimeout As DWord
End Type

Type PRINTER_INFO_5A
	pPrinterName As LPSTR
	pPortName As LPSTR
	Attributes As DWord
	DeviceNotSelectedTimeout As DWord
	TransmissionRetryTimeout As DWord
End Type

#ifdef UNICODE
TypeDef PRINTER_INFO_5 = PRINTER_INFO_5W
#else
TypeDef PRINTER_INFO_5 = PRINTER_INFO_5A
#endif

Declare Function EnumPrinters Lib "winspool.drv" Alias _FuncName_EnumPrinters (Flags As DWord, Name As LPTSTR, Level As DWord, pPrinterEnum As *Byte, cbBuf As DWord, ByRef cbNeeded As DWord, ByRef cReturned As DWord) As BOOL

Const PRINTER_ENUM_DEFAULT     = &H00000001
Const PRINTER_ENUM_LOCAL       = &H00000002
Const PRINTER_ENUM_CONNECTIONS = &H00000004
Const PRINTER_ENUM_FAVORITE    = &H00000004
Const PRINTER_ENUM_NAME        = &H00000008
Const PRINTER_ENUM_REMOTE      = &H00000010
Const PRINTER_ENUM_SHARED      = &H00000020
Const PRINTER_ENUM_NETWORK     = &H00000040

Const PRINTER_ENUM_EXPAND      = &H00004000
Const PRINTER_ENUM_CONTAINER   = &H00008000

Const PRINTER_ENUM_ICONMASK    = &H00ff0000
Const PRINTER_ENUM_ICON1       = &H00010000
Const PRINTER_ENUM_ICON2       = &H00020000
Const PRINTER_ENUM_ICON3       = &H00040000
Const PRINTER_ENUM_ICON4       = &H00080000
Const PRINTER_ENUM_ICON5       = &H00100000
Const PRINTER_ENUM_ICON6       = &H00200000
Const PRINTER_ENUM_ICON7       = &H00400000
Const PRINTER_ENUM_ICON8       = &H00800000
Const PRINTER_ENUM_HIDE        = &H01000000

Const SPOOL_FILE_PERSISTENT    = &H00000001
Const SPOOL_FILE_TEMPORARY     = &H00000002


#endif '_INC_WINSPOOL
