Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Back to HIDAPIDeviceMBS class.
HIDAPIDeviceMBS.Enumerate(VendorID as Integer = 0, ProduceID as Integer = 0) as HIDAPIDeviceInfoMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | USB | MBS USB Plugin | 16.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
This function returns a linked list of all the HID devices attached to the system which match VendorID and ProduceID. If VendorID is set to 0 then any vendor matches. If ProduceID is set to 0 then any product matches. If VendorID and ProduceID are both set to 0, then all HID devices will be returned.
HIDAPIDeviceMBS.Init as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | USB | MBS USB Plugin | 16.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
This function initializes the HIDAPI library. Calling it is not strictly necessary, as it will be called automatically by Enumerate() and any of the Open*() functions if it is needed. This function should be called at the beginning of execution however, if there is a chance of HIDAPI handles being opened by different threads simultaneously.
This function returns 0 on success and -1 on error.
HIDAPIDeviceMBS.LoadError as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | USB | MBS USB Plugin | 16.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
HIDAPIDeviceMBS.LoadLibrary(File as FolderItem) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | USB | MBS USB Plugin | 16.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Returns true on success.
You can load a custom libhidapi.dylib (Mac), libhidapi.so (Linux) or libhidapi.dll (Windows).
But since MBS Plugin contains the code, you may not need to load a custom library.
See also:
HIDAPIDeviceMBS.LoadLibrary(Path as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | USB | MBS USB Plugin | 16.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Returns true on success.
You can load a custom libhidapi.dylib (Mac), libhidapi.so (Linux) or libhidapi.dll (Windows).
But since MBS Plugin contains the code, you may not need to load a custom library.
See also:
HIDAPIDeviceMBS.Open(VendorID as Integer, ProduceID as Integer, SerialNumber as String = "") as HIDAPIDeviceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | USB | MBS USB Plugin | 16.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
If SerialNumber is "", the first device with the specified VID and PID is opened.
VendorID: The Vendor ID (VID) of the device to open.
ProduceID: The Product ID (PID) of the device to open.
SerialNumber: The Serial Number of the device to open (Optionally "").
This function returns a pointer to a HIDAPIDeviceMBS object on success or nil on failure.
HIDAPIDeviceMBS.OpenPath(path as string) as HIDAPIDeviceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | USB | MBS USB Plugin | 16.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The path name be determined by calling Enumerate(), or a platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
Path: The path name of the device to open
This function returns a pointer to a HIDAPIDeviceMBS object on success or nil on failure.
For macOS path must be one of:
HIDAPIDeviceMBS.Shutdown as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | USB | MBS USB Plugin | 16.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
This function frees all of the static data associated with HIDAPI. It should be called at the end of execution to avoid memory leaks.
This function returns 0 on success and -1 on error.
HIDAPIDeviceMBS.VersionString as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | USB | MBS USB Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The items on this page are in the following plugins: MBS USB Plugin.