From
jls@igsoft.be@21:1/5 to
All on Mon Jan 17 11:37:02 2022
Hi David
I use the SetPrinterByName() to select printer from a saved one.
If I look in rp2dsn32, I found that
METHOD SetPrinterByName(cPrinter,cPort) CLASS PtrDevice
// This method selects the printer by the port. Returns true if able to select printer.
// cPrinter - Name of printer to select
// cPort - Optional parameter to allow the selection of a printer and a port.
LOCAL lResult AS LOGIC
LOCAL aPrinters[0] AS ARRAY
LOCAL nEle AS DWORD
lResult :=FALSE
aPrinters :=SELF:GetPrinters() // get available printers
cPrinter :=upper(alltrim(cPrinter)) // find printer by port
IF cPort==NIL
nEle :=ascan(aPrinters,{|x| upper(x[1])==cPrinter})
ELSE // find printer by port and device name
cPort :=upper(alltrim(cPort))
nEle :=ascan(aPrinters,{|x| upper(x[1])==cPrinter .AND. upper(x[3])==cPort})
ENDIF
IF nEle>0 // if we found a printer..
lResult:=SELF:SetPrinterTo(aPrinters[nEle,1],aPrinters[nEle,2],aPrinters[nEle,3])
ENDIF
RETURN lResult
And, the method GetPrinters()
METHOD GetPrinters() CLASS PtrDevice
// This method retrieves the installed printer drivers from the win.ini file. The printers are returned
// in a two dimensional array structured as follows:
// aPrinters[x,1] == Printer Name ("HP LaserJet II")
// aPrinters[x,2] == Device Driver ("EPSON9")
// aPrinters[x,3] == Port ("LPT1:")
// If this function fails, an empty array is returned
LOCAL ptrDevices,ptrPrinter,ptrDevice AS PTR
LOCAL cTokenSep,cLine AS STRING
LOCAL pszDevices AS PSZ
LOCAL nDevSize,nPtrSize AS DWORD
LOCAL aPrinters[0] AS ARRAY
IF (ptrDevices:=MemAlloc(32*1024))==NULL_PTR // allocate buffer for the device names
RETURN aPrinters
ENDIF
IF (ptrPrinter:=MemAlloc(1024))==NULL_PTR // allocate buffer for the printer info
memfree(ptrDevices)
RETURN aPrinters
ENDIF
cTokenSep :=","
pszDevices := StringAlloc("devices")
// get the available devices
nDevSize := GetProfileString(pszDevices,null_psz,null_psz,psz(_cast,ptrDevices),64*1024)
ptrDevice := ptrDevices
DO WHILE DWORD(_CAST,ptrDevice)<DWORD(_CAST,ptrDevices)+DWORD(nDevSize)
// get information on each device
nPtrSize :=GetProfileString(pszDevices,PSZ(_CAST,PtrDevice),NULL_PSZ,PSZ(_CAST,ptrPrinter),1024)
cLine :=mem2string(ptrPrinter,WORD(nPtrSize)) // xlate to string for tokenizer
// parse out the printer information
aadd(aPrinters,{alltrim(psz2string(PSZ(_CAST,ptrDevice))),alltrim(Token(@cLine,@cTokenSep,1)),alltrim(Token(@cLine,@cTokenSep,2))})
// increment pointer to next device
ptrDevice:=PTR(_CAST,DWORD(_CAST,ptrDevice)+DWORD(len(psz2string(PSZ(_CAST,ptrDevice))))+1)
ENDDO
MemFree(ptrDevices) // free the memory
MemFree(ptrPrinter)
MemFree(pszDevices)
RETURN aPrinters
It returns a long printerlist, like this
18:48:42:734 > RPREPORTNEW:FINDPRINTER (78) Microsoft XPS Document Writer / winspool / Ne00:
18:48:42:750 > RPREPORTNEW:FINDPRINTER (78) Microsoft Print to PDF / winspool / Ne00:
18:48:42:750 > RPREPORTNEW:FINDPRINTER (78) LogisticsPdf61 / winspool / nul: 18:48:42:765 > RPREPORTNEW:FINDPRINTER (78) LogisticsPdf60 / winspool / nul: 18:48:42:765 > RPREPORTNEW:FINDPRINTER (78) Envoyer à OneNote 16 / winspool / nul:
18:48:42:781 > RPREPORTNEW:FINDPRINTER (78) CloudPrinter / winspool / Ne01: 18:48:42:796 > RPREPORTNEW:FINDPRINTER (78) HP LaserJet M607 Accounting on server-vad (redirected 883) / winspool / TS341
18:48:42:796 > RPREPORTNEW:FINDPRINTER (78) HP OpenSpace on server-vad (redirected 883) / winspool / TS343
18:48:42:812 > RPREPORTNEW:FINDPRINTER (78) HP PageWide Pro 477dw MFP [F27E9E] (2) (redirected 883) / winspool / TS342
18:48:42:812 > RPREPORTNEW:FINDPRINTER (78) NPIF1BC98 (HP LaserJet M607) (redirected 883) / winspool / TS346
18:48:42:828 > RPREPORTNEW:FINDPRINTER (78) HP LaserJet Pro M118dw (26D57D) (redirected 883) / winspool / TS345
18:48:42:828 > RPREPORTNEW:FINDPRINTER (78) OneNote (redirected 883) / winspool / TS349
18:48:42:843 > RPREPORTNEW:FINDPRINTER (78) Fax - HP PageWide Pro 477dw MFP (redirected 883) / winspool / TS350
18:48:42:843 > RPREPORTNEW:FINDPRINTER (78) Snagit 2020 (redirected 883) / winspool / TS351
18:48:42:859 > RPREPORTNEW:FINDPRINTER (78) HP OpenSpace on server-vad (redirected 104) / winspool / TS219
18:48:42:859 > RPREPORTNEW:FINDPRINTER (78) HP LaserJet Pro M118dw (26D57D) (redirected 104) / winspool / TS221
18:48:42:875 > RPREPORTNEW:FINDPRINTER (78) HP LaserJet M607 Accounting on server-vad (redirected 104) / winspool / TS222
18:48:42:890 > RPREPORTNEW:FINDPRINTER (78) HP PageWide Pro 477dw MFP [F27E9E] (2) (redirected 104) / winspool / TS223
18:48:42:890 > RPREPORTNEW:FINDPRINTER (78) NPIF1BC98 (HP LaserJet M607) (redirected 104) / winspool / TS260
18:48:42:906 > RPREPORTNEW:FINDPRINTER (78) Snagit 2020 (redirected 104) / winspool / TS342
18:48:42:906 > RPREPORTNEW:FINDPRINTER (78) Fax - HP PageWide Pro 477dw MFP (redirected 104) / winspool / TS345
18:48:42:921 > RPREPORTNEW:FINDPRINTER (78) Brother QL-1110NWB (redirected 215) / winspool / TS094
18:48:42:921 > RPREPORTNEW:FINDPRINTER (78) DYMO LabelWriter 450 (redirected 215) / winspool / TS095
18:48:42:937 > RPREPORTNEW:FINDPRINTER (78) PDFCreator (redirected 215) / winspool / TS136
18:48:42:937 > RPREPORTNEW:FINDPRINTER (78) Star TSP100 Cutter (TSP143) (redirected 215) / winspool / TS132
18:48:42:953 > RPREPORTNEW:FINDPRINTER (78) DYMO LabelWriter 450 (redirected 338) / winspool / TS195
18:48:42:953 > RPREPORTNEW:FINDPRINTER (78) EPSON ET-3750 Series (Copie 1) (redirected 338) / winspool / TS198
18:48:42:968 > RPREPORTNEW:FINDPRINTER (78) Brother QL-1110NWB (redirected 338) / winspool / TS199
18:48:42:968 > RPREPORTNEW:FINDPRINTER (78) Star TSP100 Cutter (TSP143) (redirected 338) / winspool / TS203
18:48:42:984 > RPREPORTNEW:FINDPRINTER (78) Brother QL-1110NWB (redirected 270) / winspool / TS328
18:48:42:984 > RPREPORTNEW:FINDPRINTER (78) DYMO LabelWriter 450 (redirected 270) / winspool / TS324
18:48:42:0 > RPREPORTNEW:FINDPRINTER (78) EPSON ET-3750 Series (Copie 1) (redirected 270) / winspool / TS327
18:48:42:0 > RPREPORTNEW:FINDPRINTER (78) Star TSP100 Cutter (TSP143) (redirected 270) / winspool / TS332
18:48:42:15 > RPREPORTNEW:FINDPRINTER (78) Brother QL-1110NWB (redirected 293) / winspool / TS071
18:48:42:31 > RPREPORTNEW:FINDPRINTER (78) EPSON ET-3750 Series (Copie 1) (redirected 293) / winspool / TS070
18:48:42:31 > RPREPORTNEW:FINDPRINTER (78) Star TSP100 Cutter (TSP143) (redirected 293) / winspool / TS075
18:48:42:46 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9330CDW Printer (Copie 1) (redirected 306) / winspool / TS027
18:48:42:46 > RPREPORTNEW:FINDPRINTER (78) Brother PC-FAX v.3.1 (redirected 306) / winspool / TS024
18:48:42:62 > RPREPORTNEW:FINDPRINTER (78) Brother QL-1110NWB (redirected 325) / winspool / TS006
18:48:42:62 > RPREPORTNEW:FINDPRINTER (78) Star TSP100 Cutter (TSP143) (redirected 325) / winspool / TS016
18:48:42:78 > RPREPORTNEW:FINDPRINTER (78) DYMO LabelWriter 450 (redirected 885) / winspool / TS193
18:48:42:93 > RPREPORTNEW:FINDPRINTER (78) Brother QL-1110NWB (redirected 885) / winspool / TS134
18:48:43:109 > RPREPORTNEW:FINDPRINTER (78) EPSON ET-3750 Series (Copie 1) (redirected 885) / winspool / TS133
18:48:43:109 > RPREPORTNEW:FINDPRINTER (78) Star TSP100 Cutter (TSP143) (redirected 885) / winspool / TS196
18:48:43:125 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer (redirected 910) / winspool / TS020
18:48:43:125 > RPREPORTNEW:FINDPRINTER (78) Bullzip PDF Printer (redirected 910) / winspool / TS022
18:48:43:140 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5440D series on HPPROBOOK4530 (redirected 910) / winspool / TS018
18:48:43:140 > RPREPORTNEW:FINDPRINTER (78) LAN-Fax Ricoh (redirected 910) / winspool / TS027
18:48:43:156 > RPREPORTNEW:FINDPRINTER (78) HP Color LaserJet M254nw (0833F1) (redirected 910) / winspool / TS029
18:48:43:156 > RPREPORTNEW:FINDPRINTER (78) Imprimante d'image PaperPort (redirected 910) / winspool / TS026
18:48:43:171 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C306Z (redirected 910) / winspool / TS066
18:48:43:171 > RPREPORTNEW:FINDPRINTER (78) Send To OneNote 2016 (redirected 910) / winspool / TS067
18:48:43:187 > RPREPORTNEW:FINDPRINTER (78) Adobe PDF (redirected 962) / winspool / TS018
18:48:43:187 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer (redirected 962) / winspool / TS019
18:48:43:203 > RPREPORTNEW:FINDPRINTER (78) Bullzip PDF Printer (redirected 962) / winspool / TS020
18:48:43:203 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5440D series on HPPROBOOK4530 (redirected 962) / winspool / TS017
18:48:43:218 > RPREPORTNEW:FINDPRINTER (78) LAN-Fax Ricoh (redirected 962) / winspool / TS025
18:48:43:218 > RPREPORTNEW:FINDPRINTER (78) Imprimante d'image PaperPort (redirected 962) / winspool / TS027
18:48:43:234 > RPREPORTNEW:FINDPRINTER (78) HP Color LaserJet M254nw (0833F1) (redirected 962) / winspool / TS028
18:48:43:234 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C306Z (redirected 962) / winspool / TS029
18:48:43:250 > RPREPORTNEW:FINDPRINTER (78) Send To OneNote 2016 (redirected 962) / winspool / TS066
18:48:43:250 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5150D series (redirected 448) / winspool / TS016
18:48:43:265 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J480DW Printer (redirected 448) / winspool / TS020
18:48:43:265 > RPREPORTNEW:FINDPRINTER (78) Brother HL-2150N series Printer (redirected 448) / winspool / TS017
18:48:43:281 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-7360N Printer (redirected 448) / winspool / TS019
18:48:43:281 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J5330DW Printer (redirected 448) / winspool / TS021
18:48:43:296 > RPREPORTNEW:FINDPRINTER (78) HPB4E219 (HP Officejet 7110 series) (redirected 448) / winspool / TS025
18:48:43:296 > RPREPORTNEW:FINDPRINTER (78) HP ePrint + JetAdvantage (redirected 448) / winspool / TS022
18:48:43:312 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series Printer (redirected 448) / winspool / TS023
18:48:43:312 > RPREPORTNEW:FINDPRINTER (78) HP_LaserJet_M551 (HP LaserJet 500 color M551) (redirected 448) / winspool / TS026
18:48:43:328 > RPREPORTNEW:FINDPRINTER (78) Imprimante Matélé (redirected 448) / winspool / TS029
18:48:43:328 > RPREPORTNEW:FINDPRINTER (78) NPI4F8AF6 (HP LaserJet 500 colorMFP M570dw) (redirected 448) / winspool / TS028
18:48:43:343 > RPREPORTNEW:FINDPRINTER (78) NPIA354EC (HP LaserJet MFP M426dw) (redirected 448) / winspool / TS031
18:48:43:343 > RPREPORTNEW:FINDPRINTER (78) NPIE80F65 (HP LaserJet MFP M130fw) (redirected 448) / winspool / TS065
18:48:43:359 > RPREPORTNEW:FINDPRINTER (78) NPIAC37D0 (HP LaserJet M402n) (redirected 448) / winspool / TS064
18:48:43:359 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C2050 (redirected 448) / winspool / TS066
18:48:43:375 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5150D series (redirected 1050) / winspool / TS209
18:48:43:375 > RPREPORTNEW:FINDPRINTER (78) Brother HL-2150N series Printer (redirected 1050) / winspool / TS267
18:48:43:390 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 1050) / winspool / TS268
18:48:43:390 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-7360N Printer (redirected 1050) / winspool / TS269
18:48:43:406 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J480DW Printer (redirected 1050) / winspool / TS270
18:48:43:421 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J5330DW Printer (redirected 1050) / winspool / TS271
18:48:43:421 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series Printer (redirected 1050) / winspool / TS272
18:48:43:437 > RPREPORTNEW:FINDPRINTER (78) HPB4E219 (HP Officejet 7110 series) (redirected 1050) / winspool / TS403
18:48:43:437 > RPREPORTNEW:FINDPRINTER (78) HP_LaserJet_M551 (HP LaserJet 500 color M551) (redirected 1050) / winspool / TS404
18:48:43:453 > RPREPORTNEW:FINDPRINTER (78) Imprimante Matélé (redirected 1050) / winspool / TS405
18:48:43:453 > RPREPORTNEW:FINDPRINTER (78) NPI4F8AF6 (HP LaserJet 500 colorMFP M570dw) (redirected 1050) / winspool / TS406
18:48:43:468 > RPREPORTNEW:FINDPRINTER (78) NPIA354EC (HP LaserJet MFP M426dw) (redirected 1050) / winspool / TS409
18:48:43:484 > RPREPORTNEW:FINDPRINTER (78) NPIAC37D0 (HP LaserJet M402n) (redirected 1050) / winspool / TS410
18:48:43:484 > RPREPORTNEW:FINDPRINTER (78) NPIE80F65 (HP LaserJet MFP M130fw) (redirected 1050) / winspool / TS412
18:48:43:500 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C2050 (redirected 1050) / winspool / TS411
18:48:43:500 > RPREPORTNEW:FINDPRINTER (78) Xerox Global Print Driver V4 PCL6 (redirected 453) / winspool / TS517
18:48:43:515 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5440D series on HPPROBOOK4530 (redirected 1042) / winspool / TS008
18:48:43:515 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer Bac 1 (redirected 1042) / winspool / TS013
18:48:43:531 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer Bac MU (redirected 1042) / winspool / TS015
18:48:43:531 > RPREPORTNEW:FINDPRINTER (78) Bullzip PDF Printer (redirected 1042) / winspool / TS017
18:48:43:546 > RPREPORTNEW:FINDPRINTER (78) HP Color LaserJet M254nw (0833F1) (redirected 1042) / winspool / TS018
18:48:43:546 > RPREPORTNEW:FINDPRINTER (78) LAN-Fax Ricoh (redirected 1042) / winspool / TS025
18:48:43:562 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C306Z Bipass (redirected 1042) / winspool / TS029
18:48:43:562 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J480DW Printer (redirected 539) / winspool / TS007
18:48:43:578 > RPREPORTNEW:FINDPRINTER (78) Brother HL-2150N series Printer (redirected 539) / winspool / TS005
18:48:43:578 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-7360N Printer (redirected 539) / winspool / TS006
18:48:43:593 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5150D series (redirected 539) / winspool / TS003
18:48:43:593 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series Printer (redirected 539) / winspool / TS009
18:48:43:609 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J5330DW Printer (redirected 539) / winspool / TS008
18:48:43:609 > RPREPORTNEW:FINDPRINTER (78) HPB4E219 (HP Officejet 7110 series) (redirected 539) / winspool / TS010
18:48:43:625 > RPREPORTNEW:FINDPRINTER (78) HP ePrint + JetAdvantage (redirected 539) / winspool / TS012
18:48:43:625 > RPREPORTNEW:FINDPRINTER (78) HP_LaserJet_M551 (HP LaserJet 500 color M551) (redirected 539) / winspool / TS013
18:48:43:640 > RPREPORTNEW:FINDPRINTER (78) NPI4F8AF6 (HP LaserJet 500 colorMFP M570dw) (redirected 539) / winspool / TS019
18:48:43:640 > RPREPORTNEW:FINDPRINTER (78) Imprimante Matélé (redirected 539) / winspool / TS016
18:48:43:656 > RPREPORTNEW:FINDPRINTER (78) NPIA354EC (HP LaserJet MFP M426dw) (redirected 539) / winspool / TS020
18:48:43:656 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C305 (redirected 539) / winspool / TS024
18:48:43:671 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C2050 (redirected 539) / winspool / TS023
18:48:43:671 > RPREPORTNEW:FINDPRINTER (78) NPIE80F65 (HP LaserJet MFP M130fw) (redirected 539) / winspool / TS022
18:48:43:687 > RPREPORTNEW:FINDPRINTER (78) NPIAC37D0 (HP LaserJet M402n) (redirected 539) / winspool / TS021
18:48:43:687 > RPREPORTNEW:FINDPRINTER (78) Brother HL-2150N series Printer (redirected 151) / winspool / TS002
18:48:43:703 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5150D series (redirected 151) / winspool / TS003
18:48:43:703 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-7360N Printer (redirected 151) / winspool / TS004
18:48:43:718 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J5330DW Printer (redirected 151) / winspool / TS006
18:48:43:734 > RPREPORTNEW:FINDPRINTER (78) HPB4E219 (HP Officejet 7110 series) (redirected 151) / winspool / TS010
18:48:43:734 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series Printer (redirected 151) / winspool / TS007
18:48:43:750 > RPREPORTNEW:FINDPRINTER (78) HP_LaserJet_M551 (HP LaserJet 500 color M551) (redirected 151) / winspool / TS011
18:48:43:750 > RPREPORTNEW:FINDPRINTER (78) Imprimante Matélé (redirected 151) / winspool / TS012
18:48:43:765 > RPREPORTNEW:FINDPRINTER (78) NPI4F8AF6 (HP LaserJet 500 colorMFP M570dw) (redirected 151) / winspool / TS015
18:48:43:765 > RPREPORTNEW:FINDPRINTER (78) NPIA354EC (HP LaserJet MFP M426dw) (redirected 151) / winspool / TS016
18:48:43:781 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C2050 (redirected 151) / winspool / TS019
18:48:43:781 > RPREPORTNEW:FINDPRINTER (78) NPIE80F65 (HP LaserJet MFP M130fw) (redirected 151) / winspool / TS018
18:48:43:812 > RPREPORTNEW:FINDPRINTER (78) NPIAC37D0 (HP LaserJet M402n) (redirected 151) / winspool / TS017
18:48:43:812 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C305 (redirected 151) / winspool / TS020
18:48:43:828 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 665) / winspool / TS153
18:48:43:828 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-7360N Printer (redirected 665) / winspool / TS154
18:48:43:843 > RPREPORTNEW:FINDPRINTER (78) Brother HL-2150N series Printer (redirected 665) / winspool / TS151
18:48:43:843 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5150D series (redirected 665) / winspool / TS152
18:48:43:859 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J480DW Printer (redirected 665) / winspool / TS155
18:48:43:859 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J5330DW Printer (redirected 665) / winspool / TS156
18:48:43:875 > RPREPORTNEW:FINDPRINTER (78) HP_LaserJet_M551 (HP LaserJet 500 color M551) (redirected 665) / winspool / TS159
18:48:43:875 > RPREPORTNEW:FINDPRINTER (78) HPB4E219 (HP Officejet 7110 series) (redirected 665) / winspool / TS192
18:48:43:890 > RPREPORTNEW:FINDPRINTER (78) NPIA354EC (HP LaserJet MFP M426dw) (redirected 665) / winspool / TS197
18:48:43:890 > RPREPORTNEW:FINDPRINTER (78) NPI4F8AF6 (HP LaserJet 500 colorMFP M570dw) (redirected 665) / winspool / TS195
18:48:43:906 > RPREPORTNEW:FINDPRINTER (78) Imprimante Matélé (redirected 665) / winspool / TS193
18:48:43:921 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C2003 (redirected 665) / winspool / TS202
18:48:43:921 > RPREPORTNEW:FINDPRINTER (78) NPIAC37D0 (HP LaserJet M402n) (redirected 665) / winspool / TS199
18:48:43:937 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C305 (redirected 665) / winspool / TS200
18:48:43:937 > RPREPORTNEW:FINDPRINTER (78) NPIE80F65 (HP LaserJet MFP M130fw) (redirected 665) / winspool / TS198
18:48:43:953 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C2050 (redirected 665) / winspool / TS201
18:48:43:953 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 687) / winspool / TS153
18:48:43:968 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J480DW Printer (redirected 687) / winspool / TS155
18:48:43:968 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-7360N Printer (redirected 687) / winspool / TS154
18:48:43:984 > RPREPORTNEW:FINDPRINTER (78) Brother HL-2150N series Printer (redirected 687) / winspool / TS152
18:48:43:984 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5150D series (redirected 687) / winspool / TS151
18:48:43:0 > RPREPORTNEW:FINDPRINTER (78) HPB4E219 (HP Officejet 7110 series) (redirected 687) / winspool / TS159
18:48:43:0 > RPREPORTNEW:FINDPRINTER (78) HP_LaserJet_M551 (HP LaserJet 500 color M551) (redirected 687) / winspool / TS192
18:48:43:15 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J5330DW Printer (redirected 687) / winspool / TS157
18:48:43:15 > RPREPORTNEW:FINDPRINTER (78) NPIA354EC (HP LaserJet MFP M426dw) (redirected 687) / winspool / TS197
18:48:43:31 > RPREPORTNEW:FINDPRINTER (78) NPI4F8AF6 (HP LaserJet 500 colorMFP M570dw) (redirected 687) / winspool / TS193
18:48:43:31 > RPREPORTNEW:FINDPRINTER (78) Imprimante Matélé (redirected 687) / winspool / TS194
18:48:43:46 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C305 (redirected 687) / winspool / TS201
18:48:43:46 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C2050 (redirected 687) / winspool / TS200
18:48:43:62 > RPREPORTNEW:FINDPRINTER (78) NPIE80F65 (HP LaserJet MFP M130fw) (redirected 687) / winspool / TS199
18:48:43:62 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C2003 (redirected 687) / winspool / TS202
18:48:43:78 > RPREPORTNEW:FINDPRINTER (78) NPIAC37D0 (HP LaserJet M402n) (redirected 687) / winspool / TS198
18:48:43:109 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J480DW Printer (redirected 115) / winspool / TS005
18:48:44:109 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-7360N Printer (redirected 115) / winspool / TS004
18:48:44:109 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5150D series (redirected 115) / winspool / TS003
18:48:44:125 > RPREPORTNEW:FINDPRINTER (78) Brother HL-2150N series Printer (redirected 115) / winspool / TS002
18:48:44:125 > RPREPORTNEW:FINDPRINTER (78) HP_LaserJet_M551 (HP LaserJet 500 color M551) (redirected 115) / winspool / TS010
18:48:44:140 > RPREPORTNEW:FINDPRINTER (78) HP ePrint + JetAdvantage (redirected 115) / winspool / TS008
18:48:44:156 > RPREPORTNEW:FINDPRINTER (78) HPB4E219 (HP Officejet 7110 series) (redirected 115) / winspool / TS009
18:48:44:156 > RPREPORTNEW:FINDPRINTER (78) Imprimante Matélé (redirected 115) / winspool / TS011
18:48:44:171 > RPREPORTNEW:FINDPRINTER (78) NPIA354EC (HP LaserJet MFP M426dw) (redirected 115) / winspool / TS072
18:48:44:171 > RPREPORTNEW:FINDPRINTER (78) NPI4F8AF6 (HP LaserJet 500 colorMFP M570dw) (redirected 115) / winspool / TS071
18:48:44:187 > RPREPORTNEW:FINDPRINTER (78) NPIAC37D0 (HP LaserJet M402n) (redirected 115) / winspool / TS073
18:48:44:187 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C2050 (redirected 115) / winspool / TS075
18:48:44:203 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C2003 (redirected 115) / winspool / TS077
18:48:44:203 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C305 (redirected 115) / winspool / TS076
18:48:44:218 > RPREPORTNEW:FINDPRINTER (78) NPIE80F65 (HP LaserJet MFP M130fw) (redirected 115) / winspool / TS074
18:48:44:218 > RPREPORTNEW:FINDPRINTER (78) Xerox Global Print Driver V4 PCL6 (redirected 872) / winspool / TS130
18:48:44:234 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5440D series on HPPROBOOK4530 (redirected 542) / winspool / TS009
18:48:44:234 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer Bac MU (redirected 542) / winspool / TS012
18:48:44:250 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer Bac 1 (redirected 542) / winspool / TS011
18:48:44:250 > RPREPORTNEW:FINDPRINTER (78) Bullzip PDF Printer (redirected 542) / winspool / TS013
18:48:44:281 > RPREPORTNEW:FINDPRINTER (78) HP Color LaserJet M254nw (0833F1) (redirected 542) / winspool / TS015
18:48:44:281 > RPREPORTNEW:FINDPRINTER (78) Imprimante d'image PaperPort (redirected 542) / winspool / TS016
18:48:44:296 > RPREPORTNEW:FINDPRINTER (78) LAN-Fax Ricoh (redirected 542) / winspool / TS017
18:48:44:296 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C306Z Bipass (redirected 542) / winspool / TS020
18:48:44:312 > RPREPORTNEW:FINDPRINTER (78) OneNote (redirected 542) / winspool / TS021
18:48:44:312 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5440D series on HPPROBOOK4530 (redirected 367) / winspool / TS002
18:48:44:328 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer Bac MU (redirected 367) / winspool / TS005
18:48:44:328 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer Bac 1 (redirected 367) / winspool / TS004
18:48:44:343 > RPREPORTNEW:FINDPRINTER (78) HP Color LaserJet M254nw (0833F1) (redirected 367) / winspool / TS015
18:48:44:343 > RPREPORTNEW:FINDPRINTER (78) LAN-Fax Ricoh (redirected 367) / winspool / TS013
18:48:44:359 > RPREPORTNEW:FINDPRINTER (78) Bullzip PDF Printer (redirected 367) / winspool / TS011
18:48:44:359 > RPREPORTNEW:FINDPRINTER (78) Imprimante d'image PaperPort (redirected 367) / winspool / TS014
18:48:44:375 > RPREPORTNEW:FINDPRINTER (78) Send To OneNote (redirected 367) / winspool / TS020
18:48:44:375 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C306Z Bipass (redirected 367) / winspool / TS017
18:48:44:390 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer Bac MU (redirected 372) / winspool / TS069
18:48:44:390 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5440D series on HPPROBOOK4530 (redirected 372) / winspool / TS071
18:48:44:406 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer Bac 1 (redirected 372) / winspool / TS073
18:48:44:406 > RPREPORTNEW:FINDPRINTER (78) Bullzip PDF Printer (redirected 372) / winspool / TS074
18:48:44:421 > RPREPORTNEW:FINDPRINTER (78) HP Color LaserJet M254nw (0833F1) (redirected 372) / winspool / TS076
18:48:44:421 > RPREPORTNEW:FINDPRINTER (78) LAN-Fax Ricoh (redirected 372) / winspool / TS078
18:48:44:437 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C306Z Bipass (redirected 372) / winspool / TS083
18:48:44:437 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5150D series (redirected 184) / winspool / TS004
18:48:44:453 > RPREPORTNEW:FINDPRINTER (78) Brother HL-2150N series Printer (redirected 184) / winspool / TS003
18:48:44:453 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-7360N Printer (redirected 184) / winspool / TS005
18:48:44:468 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J480DW Printer (redirected 184) / winspool / TS006
18:48:44:468 > RPREPORTNEW:FINDPRINTER (78) HPB4E219 (HP Officejet 7110 series) (redirected 184) / winspool / TS010
18:48:44:484 > RPREPORTNEW:FINDPRINTER (78) HP ePrint + JetAdvantage (redirected 184) / winspool / TS009
18:48:44:484 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-J5330DW Printer (redirected 184) / winspool / TS007
18:48:44:500 > RPREPORTNEW:FINDPRINTER (78) HP_LaserJet_M551 (HP LaserJet 500 color M551) (redirected 184) / winspool / TS011
18:48:44:500 > RPREPORTNEW:FINDPRINTER (78) Imprimante Matélé (redirected 184) / winspool / TS012
18:48:44:515 > RPREPORTNEW:FINDPRINTER (78) NPI4F8AF6 (HP LaserJet 500 colorMFP M570dw) (redirected 184) / winspool / TS015
18:48:44:515 > RPREPORTNEW:FINDPRINTER (78) NPIA354EC (HP LaserJet MFP M426dw) (redirected 184) / winspool / TS016
18:48:44:531 > RPREPORTNEW:FINDPRINTER (78) RICOH Aficio MP C2050 (redirected 184) / winspool / TS020
18:48:44:531 > RPREPORTNEW:FINDPRINTER (78) NPIE80F65 (HP LaserJet MFP M130fw) (redirected 184) / winspool / TS018
18:48:44:562 > RPREPORTNEW:FINDPRINTER (78) NPIAC37D0 (HP LaserJet M402n) (redirected 184) / winspool / TS017
18:48:44:562 > RPREPORTNEW:FINDPRINTER (78) Adobe PDF (redirected 208) / winspool / TS084
18:48:44:593 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer Bac 1 (redirected 208) / winspool / TS082
18:48:44:593 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-9970CDW Printer Bac MU (redirected 208) / winspool / TS086
18:48:44:609 > RPREPORTNEW:FINDPRINTER (78) Brother HL-5440D series on HPPROBOOK4530 (redirected 208) / winspool / TS085
18:48:44:609 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C306Z PCL 6 Mag 1 (redirected 208) / winspool / TS083
18:48:44:625 > RPREPORTNEW:FINDPRINTER (78) Bullzip PDF Printer (redirected 208) / winspool / TS087
18:48:44:625 > RPREPORTNEW:FINDPRINTER (78) LAN-Fax Ricoh (redirected 208) / winspool / TS088
18:48:44:640 > RPREPORTNEW:FINDPRINTER (78) Imprimante d'image PaperPort (redirected 208) / winspool / TS091
18:48:44:640 > RPREPORTNEW:FINDPRINTER (78) HP Color LaserJet M254nw (0833F1) (redirected 208) / winspool / TS090
18:48:44:656 > RPREPORTNEW:FINDPRINTER (78) RICOH MP C306Z Bipass (redirected 208) / winspool / TS128
18:48:44:656 > RPREPORTNEW:FINDPRINTER (78) AnyDesk Printer (redirected 559) / winspool / TS256
18:48:44:671 > RPREPORTNEW:FINDPRINTER (78) Brother QL-1110NWB (redirected 559) / winspool / TS257
18:48:44:671 > RPREPORTNEW:FINDPRINTER (78) EPSON37938E (ET-3750 Series) (redirected 559) / winspool / TS223
18:48:44:687 > RPREPORTNEW:FINDPRINTER (78) Star TSP100 Cutter (TSP143) (redirected 559) / winspool / TS264
18:48:44:687 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN V4 PCL6 (redirected 416) / winspool / TS012
18:48:44:703 > RPREPORTNEW:FINDPRINTER (78) HP LaserJet 500 colorMFP M570dw (4F8AF6) (redirected 486) / winspool / TS019
18:48:44:703 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN V4 PCL6 (redirected 486) / winspool / TS023
18:48:44:718 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 35) / winspool / TS008
18:48:44:718 > RPREPORTNEW:FINDPRINTER (78) Xerox GPD PCL6 V5.703.12.0 (redirected 35) / winspool / TS007
18:48:44:734 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 35) / winspool / TS012
18:48:44:750 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 165) / winspool / TS139
18:48:44:750 > RPREPORTNEW:FINDPRINTER (78) Xerox GPD PCL6 V5.703.12.0 (redirected 165) / winspool / TS141
18:48:44:765 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 165) / winspool / TS145
18:48:44:765 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 186) / winspool / TS155
18:48:44:781 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 186) / winspool / TS192
18:48:44:796 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 272) / winspool / TS202
18:48:44:796 > RPREPORTNEW:FINDPRINTER (78) Xerox GPD PCL6 V5.703.12.0 (redirected 272) / winspool / TS203
18:48:44:812 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 272) / winspool / TS208
18:48:44:812 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 327) / winspool / TS268
18:48:44:828 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series Printer (redirected 327) / winspool / TS267
18:48:44:828 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 327) / winspool / TS269
18:48:44:843 > RPREPORTNEW:FINDPRINTER (78) Xerox Global Print Driver V4 PCL6 (redirected 327) / winspool / TS274
18:48:44:843 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 453) / winspool / TS450
18:48:44:859 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 453) / winspool / TS449
18:48:44:875 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series Printer (redirected 453) / winspool / TS448
18:48:44:875 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 694) / winspool / TS141
18:48:44:890 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series Printer (redirected 694) / winspool / TS142
18:48:44:890 > RPREPORTNEW:FINDPRINTER (78) Xerox Global Print Driver V4 PCL6 (redirected 694) / winspool / TS192
18:48:44:906 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 705) / winspool / TS002
18:48:44:906 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series Printer (redirected 705) / winspool / TS004
18:48:44:921 > RPREPORTNEW:FINDPRINTER (78) Xerox Global Print Driver V4 PCL6 (redirected 705) / winspool / TS030
18:48:44:937 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 520) / winspool / TS147
18:48:44:937 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 520) / winspool / TS148
18:48:44:953 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series Printer (redirected 520) / winspool / TS149
18:48:44:953 > RPREPORTNEW:FINDPRINTER (78) Xerox Global Print Driver V4 PCL6 (redirected 520) / winspool / TS155
18:48:44:968 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 722) / winspool / TS389
18:48:44:968 > RPREPORTNEW:FINDPRINTER (78) OneNote (Desktop) (redirected 722) / winspool / TS396
18:48:44:984 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 722) / winspool / TS395
18:48:44:0 > RPREPORTNEW:FINDPRINTER (78) Xerox GPD PCL6 V5.703.12.0 (redirected 603) / winspool / TS075
18:48:44:0 > RPREPORTNEW:FINDPRINTER (78) Brother MFC-L8690CDW series (redirected 603) / winspool / TS132
18:48:44:15 > RPREPORTNEW:FINDPRINTER (78) Xerox WorkCentre 6605DN (redirected 603) / winspool / TS137
18:48:44:15 > RPREPORTNEW:FINDPRINTER (78) EPSONA1DF0E (ET-2720 Series) (redirection de 10) (redirected 151) / winspool / TS084
18:48:44:31 > RPREPORTNEW:FINDPRINTER (78) ET-2720 Series(Network) (redirection de 10) (redirected 151) / winspool / TS080
[continued in next message]
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
From
dlzc@21:1/5 to
j...@igsoft.be on Tue Jan 18 06:18:33 2022
On Monday, January 17, 2022 at 12:37:03 PM UTC-7,
j...@igsoft.be wrote:
Hi David
On Monday, January 17, 2022 at 10:55:20 AM UTC-7, Jean-Luc wrote:
Hello friends,
On a shared terminal server the GetPrinters() method of reportpro
(from ptrdevice{}) return a list of 817 printers.
What does it look like on their machine, when you look at installed printers? Do they have a default printer set?
OK, so you missed my question, and reeled off code, and some version of results. On this same machine, when you look at the list of installed printers, in the Windows dialog, do all these same printers show up? Does this computer have a default printer
setup?
Tried on differents server of the pool.
In this list are are obsolete printer (with an old redirect from)
The problem is that my app don't find de good printer. I guess it
is out of the list.
Any idea to solve this problem ?
Have a network admin set up user accounts to NOT by default
share their printer to everyone on the network. And I have to
delete auto-installed printer in Windoze all the time. At some point,
they stop installing at whim. So far. Today...
Might have the user find their printer, and set it for your program,
rather than forcing them through a list of possible printers every
time. Can you present them with a search, the model number say,
and only show matches?
...
It returns a long printerlist, like this
18:48:42:734 > RPREPORTNEW:FINDPRINTER (78) Microsoft XPS Document Writer / winspool / Ne00:
...
18:48:49:843 > RPREPORTNEW:FINDPRINTER (78) ET-3750 Series(Network) (redirected 1111) / winspool / TS196
18:48:49:859 > RPREPORTNEW:FINDPRINTER (78) DYMO L / /
So this is a database, and you don't know how to present a usable list to the user?
How about just showing the entries on the same network segment? 18:48:42:#...
How about showing the entries that say "laserjet" (or whatever) in the first array column?
How about showing the entries that have been assigned a logical "port" on the local computer? Anything with a ":" in the third array column...
This user has two problems... the person administering their network, and the tool being applied that finds every printer "on the internet", rather than just printers accessible to this computer.
David A. Smith
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)