locked
Printer Device App for TcpMon printer

    Question

  • I'm trying to write a Device Companion app for a TcpMon connected printer.  The only device function however that shows up is "local print queue", which doesn't support the System.Devices.AppPackageFamilyName devpkey so there seems to be no way for the app to interact with the device, get the IPrinterQueue, etc.  The same device installed to a WSD port works fine with the app.  In both instances I'm using the same v4 driver.  Is TcpMon an unsupported scenario? 

    Friday, April 20, 2012 6:50 PM

Answers

  • Do you mean you want to see what hardware ID is currently associated with the device so you can figure out your metadata issue? The easy way to do that is to use Devices and Printers, right click on the printer, choose Properties, then the Hardware tab, and then choose the relevant device function and click Properties. In the new Window, go to the Details tab, then choose the combo box and select Hardware IDs.

    But if your app needs the data at runtime, we publish it in the Bidi Schema at \Printer.DeviceInfo:HardwareId.

    Thanks

    Justin

    Wednesday, April 25, 2012 6:01 PM

All replies

  • Payne,

    I will look into this for you.

    Best Wishes - Eric

    Saturday, April 21, 2012 5:04 PM
    Moderator
  • Payne,

    It sounds like you're trying to get status for the print queue from the start screen.

    Can you confirm that your TCP/IP connected print queue has the your device metadata package? I wouldn't expect AppPackageFamilyName to be set unless the metadata and app bound properly. The way we assign HardwareIDs for TCP/IP devices is different than plug and play devices. If the device  autodetected, we'll use the  HWID from the Port Monitor MIB.  Otherwise, we actually use the first HWID on the first line that matches the name of the driver you chose in the Add Printer Wizard.  So in the snippet below, we'd choose "HWID1". If you specified your PrinterDriverID in this position, we'd use that for the queue, which probably isn't what you want and could keep you from binding against the metadata.

    [Models]

    "Chosen Driver name" = Install_section, HWID1, HWID2

    "Chosen Driver name" = Install_section, HWID3, HWID4

    Thanks

    Justin

    Saturday, April 21, 2012 5:58 PM
  • Thank you Justin, that worked for manually selecting the driver.  Is there any way to get the HWID from the MIB?  Is it at a certain OID or listed in the device properties somewhere?
    Wednesday, April 25, 2012 5:05 PM
  • Do you mean you want to see what hardware ID is currently associated with the device so you can figure out your metadata issue? The easy way to do that is to use Devices and Printers, right click on the printer, choose Properties, then the Hardware tab, and then choose the relevant device function and click Properties. In the new Window, go to the Details tab, then choose the combo box and select Hardware IDs.

    But if your app needs the data at runtime, we publish it in the Bidi Schema at \Printer.DeviceInfo:HardwareId.

    Thanks

    Justin

    Wednesday, April 25, 2012 6:01 PM
  • The HWID from details/hwid is PRINTENUM\LocalPrintQueue.  So I can add that to my metadata but then it also associates the XPS writer, One Note, etc. to my MSDA.  I need a HWID that is unique to this device.

    Wednesday, April 25, 2012 6:14 PM
  • Yeah, that means that you didn't get the right HWID associated with your device. Please change your driver's INF based on the advice I gave above. That should fix the HWID for you.
    Wednesday, April 25, 2012 6:53 PM
  • Ok, thank you Justin, I'll look into that.

    Wednesday, April 25, 2012 8:50 PM