locked
V4 Printer driver BiDi snmp RRS feed

  • Question

  • I'm developing a V4 driver for printer that connects via TCP/IP port.  I need to access snmp data from the printer, but am having trouble extending the BiDi to our custom data.

    From the V4 printer extension app,  within a IPrinterRequestEvent,  I have successfully gotten the IPrinterQueue interface and sent queries using  IPrinterQueue::SendBiDiQuery().

    I successfully receive responses through an IPrinterQueueEvent connected to a IConnectionPoint from IPrinterQueue.  Built-in queries, like "\Printer.DeviceInfo.NetworkingInfo:PresentationUrl" return valid results.  However, queries on my custom properties defined in the xml bidi file all return <BIDI_NULL> responses.

    If I query for all printer properties with "\Printer" query, I do get response for all the built-in and my custom properties, so I know the bidi xml file is being processed, but again all the custom properties come back <BIDI_NULL>

    I know the properties are not null, because I can successfully access them from the same application using an SNMP api that we developed previously.  

    Below is the Bidi-Spm.xml file contents that we have to extend the Printer properties.  

    This file defines these queries:

    \Printer\Extension\System\Custom:AgentDescription

    \Printer\Extension\System\ProcessColorants


    BiDi-Smp.xml file:

    <?xml version="1.0"?>
    <bidi:Schema xmlns:bidi="http://schemas.microsoft.com/windows/2005/03/printing/bidi">
        <Property name='Printer'>
            <!--   Add IHV Extensions to the \Printer section fo the Bidi Schema here  -- 
          <Property name="Extension">
            <Property name="System">
              <Property name="Custom">
                <Value name="AgentDescription" type="BIDI_STRING" oid="1.3.6.1.2.1.1.1.0" deviceIndex="false"/>
                <Value name="ProcessColorants" type="BIDI_INT" oid="1.3.6.1.2.1.43.10.2.1.6.1.1" deviceIndex="false"/>
              </Property>
            </Property>  
          </Property>
        </Property>
    </bidi:Schema>

    What is wrong with this?  Is there anything else I need to do to hook up the snmp queries?  Thanks for your help.

    Thursday, September 14, 2017 5:39 PM