Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to get the printer port name á la "NE01:"?

How to get the printer port name á la "NE01:"?

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminwindows-admintoolshelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MVH
    wrote on last edited by
    #1

    I am trying to make a little utility, that will delete from workstations an old network printer connection, add new one and set it as the default printer. I am using NT4.0. To be able to set the default printer, I need to know the port name. When I use PRINTER_INFO_2, I get the IP-address like "123.32.12.89:XJPRINT". I got the same using PORT_INFO. I would need to know the "weird" NExx: port name. Like currently my default printer is in port NE04. I can find in the registry a list of my printers (e.g. \\SERVER01\HP4100 -> "winspool,Ne04:,15,45"), but is there an another way to get that "Ne04" information?? Ps. Whatta heck is that NExx: for??? :wtf: Compatibility issue with older windows versions? ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

    M 1 Reply Last reply
    0
    • M MVH

      I am trying to make a little utility, that will delete from workstations an old network printer connection, add new one and set it as the default printer. I am using NT4.0. To be able to set the default printer, I need to know the port name. When I use PRINTER_INFO_2, I get the IP-address like "123.32.12.89:XJPRINT". I got the same using PORT_INFO. I would need to know the "weird" NExx: port name. Like currently my default printer is in port NE04. I can find in the registry a list of my printers (e.g. \\SERVER01\HP4100 -> "winspool,Ne04:,15,45"), but is there an another way to get that "Ne04" information?? Ps. Whatta heck is that NExx: for??? :wtf: Compatibility issue with older windows versions? ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

      M Offline
      M Offline
      MVH
      wrote on last edited by
      #2

      ..and so I digged the registry. ;) (just talking to myself) ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

      N 1 Reply Last reply
      0
      • M MVH

        ..and so I digged the registry. ;) (just talking to myself) ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

        N Offline
        N Offline
        Navin
        wrote on last edited by
        #3

        The world of drivers... abandon all hope, ye who enter! Even a broken clock is right twice a day.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups