UsbDiscoverer Class |
Namespace: Zebra.Sdk.Printer.Discovery
The UsbDiscoverer type exposes the following members.
Name | Description | |
---|---|---|
UsbDiscoverer |
A class used to discover USB connected Zebra printers. Printers can be accessed either directly or through a USB
printer driver.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetZebraDriverPrinters |
Enumerate locally installed Zebra Designer Drivers.
| |
GetZebraUsbPrinters |
Enumerate all currently connected Zebra USB printers.
| |
GetZebraUsbPrinters(DiscoveredPrinterFilter) |
Enumerate currently connected Zebra USB printers that meet the specified DiscoveredPrinterFilter criteria.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
using System; using Zebra.Sdk.Card.Printer.Discovery; using Zebra.Sdk.Comm; using Zebra.Sdk.Printer.Discovery; public class UsbCardDiscovererExample { public static void Main(string[] args) { try { foreach (DiscoveredUsbPrinter usbPrinter in UsbDiscoverer.GetZebraUsbPrinters(new ZebraCardPrinterFilter())) { Console.WriteLine(usbPrinter); } } catch (ConnectionException e) { Console.WriteLine($"Error discovering local printers: {e.Message}"); } Console.WriteLine("Done discovering local printers."); } }