USB.Count
---------

Queries all USB Devices and returns the number of found devices.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [USB](component_USB.md) | [2.4](newinversion24.md) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ❌ No |

MBS( "USB.Count" ) ### Parameters

none

### Result

The number of devices found.

### Description

Queries all USB Devices and returns the number of found devices.   
This function must be called before all the other [USB](component_USB.md) functions to initialize the plugin and to refresh the USB device list.  
### Examples

Query number of devices

 MBS ( "USB.Count" )  
### See also

- [USB.FindDevice](USBFindDevice.md)
- [USB.FindSerialNumber](USBFindSerialNumber.md)
- [USB.GetProductID](USBGetProductID.md)
- [USB.GetProductName](USBGetProductName.md)
- [USB.GetSerialNumber](USBGetSerialNumber.md)
- [USB.GetVendorID](USBGetVendorID.md)
- [USB.GetVendorName](USBGetVendorName.md)

### Example Databases

- [Utility functions/USB Devices](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/USB%20Devices.shtml#1ScriptAnchor_)

This function is free to use.

Created 18th August 2014 , last changed 18th August 2014

  
[URLScheme.SetDefaultHandler](URLSchemeSetDefaultHandler.md) - [USB.FindDevice](USBFindDevice.md)

[HTML Version](USBCount.shtml)