Skip to content

Function: matchDevice()

ts
function matchDevice(
   vid: number, 
   pid: number, 
   registries: readonly DeviceEntry[]): DeviceEntry | undefined;

Match a USB device against a list of known device entries.

Entries without a transports.usb block (network-only printers) are skipped — they cannot match a USB device. VID/PID hex strings on the registry are parsed at the boundary.

Parameters

ParameterType
vidnumber
pidnumber
registriesreadonly DeviceEntry[]

Returns

DeviceEntry | undefined