Printer port ipaddress [modified]
-
Hi, How do I programatically find the ipaddress of a printer port connected to a particular printer driver ? Added - If I have the port name how do I find out if the port is a 'Standard TCP/IP port' and once I have done that, how do I find the ipaddress ? Kevin Keeler -- modified at 9:36 Thursday 6th July, 2006
-
Hi, How do I programatically find the ipaddress of a printer port connected to a particular printer driver ? Added - If I have the port name how do I find out if the port is a 'Standard TCP/IP port' and once I have done that, how do I find the ipaddress ? Kevin Keeler -- modified at 9:36 Thursday 6th July, 2006
Use
EnumPrinters()
. If level is 5, look at thepPortName
member of the returned structure.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
Use
EnumPrinters()
. If level is 5, look at thepPortName
member of the returned structure.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
Thanks, but I did not make myself clear EnumPrinters gets the port names, but then how do I get from the port name to the IP address if the port is a Standard TCP/IP port? or even how do I find if it is a Standard TCP/IP port?
I have three networked printers configured on my machine.
pPortName
contained 192.168.200.11, 192.168.200.100, and 192.168.200.150 for them.Kevin13 wrote:
how do I find if it is a Standard TCP/IP port?
Use
EnumPorts(NULL, 2, ...)
.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
I have three networked printers configured on my machine.
pPortName
contained 192.168.200.11, 192.168.200.100, and 192.168.200.150 for them.Kevin13 wrote:
how do I find if it is a Standard TCP/IP port?
Use
EnumPorts(NULL, 2, ...)
.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
I have just checked my printer and the
pPortName
contains IP_200.128.1.115. I then added another printer and port from control panel and specified the name of the port as 'A Test Port'. Then running the enumeration I got the original port ( IP_200.128.1.115 ) and the new one ( A Test Port ) returned as the pPortName. ThanksEnumPorts
does return thepMonitorName
in the PORT_INFO_2 structure so now I have got half an answer. Doing some more searching it looks as if I need to use 'TCPMON Xcv Commands' which seems to be sort of documented in the DDK. -
Hi, How do I programatically find the ipaddress of a printer port connected to a particular printer driver ? Added - If I have the port name how do I find out if the port is a 'Standard TCP/IP port' and once I have done that, how do I find the ipaddress ? Kevin Keeler -- modified at 9:36 Thursday 6th July, 2006
The portname returned on our network for 'standard tcp/ip' always starts with IP_, so if this is returned strip of the IP_ and the rest is your IP address. Hope this helps.
-
The portname returned on our network for 'standard tcp/ip' always starts with IP_, so if this is returned strip of the IP_ and the rest is your IP address. Hope this helps.