USB Host-Based Print Driver Sample
This driver sample demonstrates how to support host-based devices that use the v4 print driver model, and are connected via USB.
This sample is for the v4 print driver model.
By default, Bidi queries and status requests are routed over the USB device interface that is used for printing.
In addition to extending Bidi communication, this driver sample also specifies the schema elements that it supports. The usb_host_based_sample_extension.xml file that is included with the sample, provides information about the supported schema elements.
The Bidi schema is a hierarchy of printer attributes, some of which are properties and others that are values (or value entries):
- A property is a node in the schema hierarchy. A property can have one or more children, and these children can be other properties or values.
- A value is a leaf in the schema hierarchy that represents either a single data item or a list of related data items. A value has a name, a data type, and a data value. A value cannot have child elements.
Here are the core files that you will find in this sample:
Determine if the device is ready to receive data
Check to see if there is an error condition
Read the device status
A 'driver events' XML file that specifies an event which detects when the user needs to flip over the paper in the tray.
A USB Bidi Extension XML file that specifies the supported Bidi Schema elements for this driver.
Build the sample
For information and instructions about how to test and deploy drivers, see Developing, Testing, and Deploying Drivers.
Run the sample
To understand how to run this sample as a Windows driver, see the v4 Printer Driver collection of topics.