![]() ![]() Also, for some reason the CopyMemory function cannot be used to successfully transfer the array information into the structure. Note for Visual Basic users: Due to limitations in the Visual Basic language, it is impossible to pass an array of PRINTER_INFO_* structures as pPrinterEnum - the array must be of Long-type elements. The function returns 1 if successful, or 0 if an error occured. The information itself is put into the array passed as pPrinterEnum, which can then be copied into an array of data structures. The attributes of the chosen structure determine what kinds of information about the printer(s) is returned. Note that structures 4 and 5 are the quickest ones to use. Under Win NT, the information can be passed in a PRINTER_INFO_1, PRINTER_INFO_2, or PRINTER_INFO_4 structure. Under Win 95/98, the information can be passed in a PRINTER_INFO_1, PRINTER_INFO_2, or PRINTER_INFO_5 structure. ![]() These include both local printers (physically connected to the machine) and network printers (accessible via the network). Declare Function EnumPrinters Lib "winspool.drv" Alias "EnumPrintersA" (ByVal flags As Long, ByVal name As String, ByVal Level As Long, pPrinterEnum As Long, ByVal cdBuf As Long, pcbNeeded As Long, pcReturned As Long) As LongĮnumPrinters finds and returns information about one or more printers which the computer has access to. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |