Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How get printer port name.

0 views
Skip to first unread message

Salvador Huertas

unread,
Jun 13, 2003, 6:30:35 AM6/13/03
to
I need get the printer port name giving the windows printer name. More or
less:

PortName = Func(PrinterName);

There are any function into the windows Api for do this?.

Thanks in advance!
Salvador Huertas.


Vladimir Afanasyev

unread,
Jun 13, 2003, 7:05:28 AM6/13/03
to

Hi,

"Salvador Huertas" <shue...@ghuertasauto.com> wrote:
>I need get the printer port name giving the windows printer name. More or
>less:
>
>PortName = Func(PrinterName);
>
>There are any function into the windows Api for do this?.
>

First OpenPrinter
in : printer name
out : printer handle

tnen GetPrinter with level=2
in: printer handle, level
out: PRINTER_INFO_2 member pPortName

and ClosePrinter
in: printer handle

All function Win32 API

Vladimir.

0 new messages