1、PB打印实现增强功能PB打印实现增强功能global type n_printer from nonvisualobject end type end forward type str_printer_info_1 from structure long flags long Description long name long comment end type type str_printer_info_2 from structure long servername long printername long sharename long portname long drivername
2、long comment long location long devmode long sepfile long printprocessor long datatype long parameters long securitydescriptor long attributes long priority long defaultpriority long starttime long untiltime long status long cjobs long averageppm character reserve500 end type type str_devmode from s
3、tructure character dmdevicename32 unsignedinteger dmspecversion unsignedinteger dmdriverversion unsignedinteger dmsize unsignedinteger dmdriverextra unsignedlong dmfields unsignedinteger dmorientation unsignedinteger dmpapersize unsignedinteger dmpaperlength unsignedinteger dmpaperwidth integer dmsc
4、ale integer dmcopies integer dmdefaultsource integer dmprintquality integer dmcolor integer dmduplex integer dmyresolution integer dmttoption integer dmcollate character dmformname32 unsignedinteger dmlogpixels unsignedlong dmbitsperpel unsignedlong dmpelswidth unsignedlong dmpelsheight unsignedlong
5、 dmdisplayflags unsignedlong dmdisplayfrequency unsignedlong dmicmmethod unsignedlong dmicmintent unsignedlong dmmediatype unsignedlong dmdithertype unsignedlong dmreserved1 unsignedlong dmreserved2 unsignedlong dmreserved3 end type type str_printer_defaults from structure long Datatype long DevMode
6、 long DesiredAccess end type type str_printdlg from structure unsignedlong lstructsize unsignedlong hwndowner unsignedlong hdevmode unsignedlong hdevnames unsignedlong hdc unsignedlong flags unsignedinteger nfrompage unsignedinteger ntopage unsignedinteger nminpage unsignedinteger nmaxpage unsignedi
7、nteger ncopies unsignedlong hinstance unsignedlong lcustdata unsignedlong lpfnprinthook unsignedlong lpfnsetuphook unsignedlong lpprinttemplatename unsignedlong lpsetuptemplatename unsignedlong hprinttemplate unsignedlong hsetuptemplate uint reserve1 end type type str_devnames from structure UINT wD
8、riverOffset UINT wDeviceOffset UINT wOutputOffset UINT wDefault character drivername32 character devicename32 character portname32 end type type str_point from structure long x long y end type type str_rect from structure long left long top long right long bottom end type type str_PAGESETUPDLG from
9、structure ulong lStructSize ulong hwndOwner ulong hDevMode ulong hDevNames ulong Flags str_point ptPaperSize str_rect rtMinMargin str_rect rtMargin ulong hInstance ulong lCustData ulong lpfnPageSetupHook ulong lpfnPagePaintHook ulong lpPageSetupTemplateName ulong hPageSetupTemplate end type global t
10、ype n_printer from nonvisualobject autoinstantiate end type type prototypes function boolean EnumPrinters(ulong flags, string name, ulong level, ref blob buffer, ulong cbbuf, ref ulong cbneeded, ref ulong returned) library winspool.drv alias for EnumPrintersA function ulong CopyMem ( ref str_printer
11、_info_1 dest, ref blob source, ulong length ) library kernel32 alias for RtlMoveMemory function ulong CopyMem ( ref str_printer_info_2 dest, ref blob source, ulong length ) library kernel32 alias for RtlMoveMemory function ulong CopyMem ( ref blob source, ref str_printer_info_2 dest, ulong length )
12、library kernel32 alias for RtlMoveMemory function boolean OpenPrinter ( string PrinterName, ref ulong hPrinter, ulong null) library winspool.drv alias for OpenPrinterA function boolean OpenPrinter ( string PrinterName, ref ulong hPrinter, ref str_printer_defaults null) library winspool.drv alias for
13、 OpenPrinterA function boolean ClosePrinter ( ulong hPrinter ) library winspool.drv function boolean GetPrinter ( ulong hPrinter, ulong level, ref blob Printer, ulong cbbuf, ref ulong cbNeeded ) library winspool.drv alias for GetPrinterA function boolean SetPrinter ( ulong hPrinter, ulong level, ref
14、 blob Printer, ulong command ) library winspool.drv alias for SetPrinterA function boolean PrinterProperties ( ulong hwnd, ulong hprinter ) library winspool.drv function ulong CopyMem ( ref str_devmode dest, ref blob src, ulong length ) library kernel32 alias for RtlMoveMemory function ulong CopyMem
15、 ( ref str_devmode dest, ulong src, ulong length ) library kernel32 alias for RtlMoveMemory function ulong CopyMem ( ref blob src, ref str_devmode dest, ulong length ) library kernel32 alias for RtlMoveMemory function ulong CopyMem ( ulong src, ref str_devmode dest, ulong length ) library kernel32 a
16、lias for RtlMoveMemory function long DocumentProperties ( ulong hwnd, ulong hprinter, string null, ref blob DevModeOutput, long null_1, ulong fMode ) library winspool.drv alias for DocumentPropertiesA function long DocumentProperties ( ulong hwnd, ulong hprinter, string null, ulong null_1, ref str_d
17、evmode pDevModeInput , ulong fMode ) library winspool.drv alias for DocumentPropertiesA function long DocumentProperties ( ulong hwnd, ulong hprinter, string null, ulong null_1, ref blob pDevModeInput , ulong fMode ) library winspool.drv alias for DocumentPropertiesA function long DeviceCapabilities
18、 ( string Device, string Port, uint fwCapability, ref blob pOutput, long devmode ) library winspool.drv alias for DeviceCapabilitiesA function long DeviceCapabilities ( string Device, string Port, uint fwCapability, long null, long devmode ) library winspool.drv alias for DeviceCapabilitiesA functio
19、n ulong CreateDC ( long driver, string device, long output, long devmode ) library gdi32 alias for CreateDCA function boolean DeleteDC ( ulong hdc ) library gdi32 function int Escape ( ulong hdc, int nEscape, int cbInput, long inData, ref blob outdata ) library gdi32 function ulong GlobalAlloc(uint
20、uFlags, ulong dwBytes ) library kernel32 function ulong GlobalFree ( ulong hmem ) library kernel32 function ulong GlobalLock ( ulong hmem ) library kernel32 function boolean GlobalUnlock (ulong hmem ) library kernel32 function ulong GlobalSize ( ulong hem ) library kernel32 function long PrintDlg(re
21、f str_printdlg printdlg) library comdlg32 alias for PrintDlgA function ulong CopyMem ( ref str_devnames dest, ulong src, ulong length ) library kernel32 alias for RtlMoveMemory function ulong CopyMem ( ref blob dest, ulong src, ulong length ) library kernel32 alias for RtlMoveMemory function boolean
22、 PageSetupDlg(ref str_pagesetupdlg ll ) library comdlg32 alias for PageSetupDlgA end prototypes type variables constant ulong PRINTER_ENUM_DEFAULT = 1 constant ulong PRINTER_ENUM_LOCAL = 2 constant ulong PRINTER_ENUM_CONNECTIONS = 4 constant ulong PRINTER_ENUM_FAVORITE = 4 constant ulong PRINTER_ENU
23、M_NAME = 8 constant ulong PRINTER_ENUM_REMOTE = 16 constant ulong PRINTER_ENUM_SHARED = 32 constant ulong PRINTER_ENUM_NETWORK = 64 constant ulong PRINTER_ENUM_EXPAND = 16384 constant ulong PRINTER_ENUM_CONTAINER = 32768 constant ulong PRINTER_ENUM_ICONMASK = 16711680 constant ulong PRINTER_ENUM_ICO
24、N1 = 65536 constant ulong PRINTER_ENUM_ICON2 = 131072 constant ulong PRINTER_ENUM_ICON3 = 262144 constant ulong PRINTER_ENUM_ICON4 = 545288 constant ulong PRINTER_ENUM_ICON5 = 1048576 constant ulong PRINTER_ENUM_ICON6 = 2097152 constant ulong PRINTER_ENUM_ICON7 = 4194304 constant ulong PRINTER_ENUM_
25、ICON8 = 8388608 constant integer PRINTER_INFO_1_LEN = 16 constant integer PRINTER_INFO_2_LEN = 84 constant integer DEVMODE_LEN = 148 constant ulong DM_ORIENTATION = 00000001 constant ulong DM_PAPERSIZE = 00000002 constant ulong DM_PAPERLENGTH = 00000004 constant ulong DM_PAPERWIDTH = 00000008 consta
26、nt ulong DM_SCALE = 00000016 constant ulong DM_COPIES = 00000256 constant ulong DM_DEFAULTSOURCE = 00000512 constant ulong DM_PRINTQUALITY = 000001024 constant ulong DM_COLOR = 000002048 constant ulong DM_DUPLEX = 00004096 constant ulong DM_YRESOLUTION = 00008192 constant ulong DM_TTOPTION = 0000163
27、84 constant ulong DM_COLLATE = 32768 constant ulong DM_FORMNAME = 65536 constant ulong DM_LOGPIXELS = 131072 constant ulong DM_BITSPERPEL = 262144 constant ulong DM_PELSWIDTH = 524288 constant ulong DM_PELSHEIGHT = 1048576 constant ulong DM_DISPLAYFLAGS = 2097152 constant ulong DM_DISPLAYFREQUENCY =
28、 4194304 constant ulong DM_ICMMETHOD = 8388608 constant ulong DM_ICMINTENT = 16777216 constant ulong DM_MEDIATYPE = 33554432 constant ulong DM_DITHERTYPE = 67108864 constant ulong DM_PANNINGWIDTH = 134217728 constant ulong DM_PANNINGHEIGHT = 268435456 /* orientation selections */ constant ulong DMOR
29、IENT_PORTRAIT = 1 constant ulong DMORIENT_LANDSCAPE = 2 constant ulong PRINTER_ATTRIBUTE_QUEUED = 0001 constant ulong PRINTER_ATTRIBUTE_DIRECT = 0002 constant ulong PRINTER_ATTRIBUTE_DEFAULT = 0004 constant ulong PRINTER_ATTRIBUTE_SHARED = 0008 constant ulong PRINTER_ATTRIBUTE_NETWORK = 0016 constan
30、t ulong PRINTER_ATTRIBUTE_HIDDEN = 0032 constant ulong PRINTER_ATTRIBUTE_LOCAL = 0064 constant ulong PRINTER_ATTRIBUTE_ENABLE_DEVQ = 128 constant ulong PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = 256 constant ulong PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = 512 constant ulong PRINTER_ATTRIBUTE_WORK_OFFLINE = 102
31、4 constant ulong PRINTER_ATTRIBUTE_ENABLE_BIDI = 2048 constant ulong PRINTER_ATTRIBUTE_RAW_ONLY = 4096 constant ulong DM_IN_BUFFER = 8 constant ulong DM_IN_PROMPT = 4 constant ulong DM_OUT_BUFFER = 2 constant ulong DM_OUT_DEFAULT = 1 constant ulong DC_FIELDS = 1 constant ulong DC_PAPERS = 2 constant ulong DC_PAPERSIZE = 3 constant ulong DC_MINEXTENT
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1