Hi Guillermo,

For sure there is a function to convert Windows
printer name to port name, but you'll have to check
the exact function name in win_prn*.* files, it
was something like printertofile() AFAIR.

For more, I'm afraid you'll have to dig into hbwin
lib a bit deeper, or maybe someone else can help,
as I've never used these functions.

If that helps they are largely compatible with xhb
ones, maybe you can find it in xhb docs.

Brgds,
Viktor

On 2008.11.11., at 18:04, Guillermo Varona Silupú wrote:

Szakáts Viktor escribió:
Hi,

Check GETPRINTERS() in hbwin.lib.
In this PRG:
-----------------------------------------------------------------
function main()
 setmode(25,80)
 aPrn := GETPRINTERS()
 cPrn := GetDefaultPrinter()
 aPor := PRINTERPORTTONAME()
 ? aPrn
 wait
 return nil
-----------------------------------------------------------------
I have identified the following functions:
aPrn := GETPRINTERS(), give me this:
APRN[1] "\\Estudio0393\Epson FX-2180"
APRN[2] "\\Estudios0596\HP DesignJet 1055CM by HP"
APRN[3] "Xerox Phaser 3420 PCL 6"
APRN[4] "PDFCreator"
APRN[5] "Microsoft Office Document Image Writer"
APRN[6] "Adobe PDF"

cPrn := GetDefaultPrinter(), give me this:
"Xerox Phaser 3420 PCL 6"

aPor := PRINTERPORTTONAME(), give me this:
""
What does this function?

How can I obtain a list of ports used by printers (aPrn)?

TIA

Best Regards
GVS
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to