Platforms to show: All Mac Windows Linux Cross-Platform
Back to MacHIDMBS class.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
Lasterror values for this function:
-1 | Not supported (Windows and Linux). |
0 | Everything okay. |
1 | Failed to get IOKit Plugin Interface for this IO object. |
2 | Failed to query interface |
3 | Failed to open interface |
4 | Failed to create async port |
5 | Failed to create async event source |
6 | no longer used |
7 | Failed to start queue |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
MacHIDMBS.FindFirstDevice as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns true on success and false on failure.
MacHIDMBS.FindNextDevice as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns true on success and false on failure.
MacHIDMBS.HIDProperties as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Value is a CFDictionaryMBS with details about current device. Returned as Variant to reduce plugin dependencies.
The plugin queries this dictionary to return SerialNumber, ProductID, Manufacturer, Product, VendorID and VersionNumber.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
Please use after connect. For use with ReceivedData event.
Some examples using this method:
MacHIDMBS.Manufacturer as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 7.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
On any error an empty string is returned.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
MacHIDMBS.ProductID as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
MacHIDMBS.ReadMessage(ReportID as Integer, reportType as Integer, length as Integer) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 14.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
This is for synchronously operation without the event/callback.
You can specify report id, report type and the maximum length to read.
Also set timeout property.
Doesn't work if InstallCallback with event is used.
MacHIDMBS.ReadMessageMemory(ReportID as Integer, reportType as Integer, length as Integer) as memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 14.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
This is for synchronously operation without the event/callback.
You can specify report id, report type and the maximum length to read.
Also set timeout property.
Doesn't work if InstallCallback with event is used.
MacHIDMBS.SendMessage(data as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
A connection must be open.
Lasterror is set. Lasterror -536854447 is an USB timeout.
Uses kIOHIDReportTypeOutput.
See also:
MacHIDMBS.SendMessage(ReportID as Integer, reportType as Integer, data as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
A connection must be open.
Lasterror is set. Lasterror -536854447 is an USB timeout.
ReportType can be kIOHIDReportTypeOutput or kIOHIDReportTypeFeature.
See also:
MacHIDMBS.SendMessageMemory(data as memoryblock, offset as Integer, length as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
A connection must be open.
Lasterror is set. Lasterror -536854447 is an USB timeout.
Internally ReportID=0 is used.
While writing a crossplatform application for one specific device we saw the following thing: The data buffer for the SendMessageMemory call must be 8 bytes long on Mac (with MacHIDMBS) and 61 bytes long for Windows (with WinHIDMBS) for our HID device. We have 1 byte for the ReportID and 60 data bytes where the first 8 are set like on the Mac. So if the calls fail on Windows, try with a higher length and check the WinHIDMBS.OutputReportByteLength property.
Uses kIOHIDReportTypeOutput.
See also:
MacHIDMBS.SendMessageMemory(ReportID as Integer, reportType as Integer, data as memoryblock, offset as Integer, length as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
A connection must be open.
Lasterror is set. Lasterror -536854447 is an USB timeout.
ReportType can be kIOHIDReportTypeOutput or kIOHIDReportTypeFeature.
See also:
MacHIDMBS.SerialNumber as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
MacHIDMBS.VersionNumber as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | USB | MBS USB Plugin | 7.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Value can be anything.
On any error, 0 is returned.
The items on this page are in the following plugins: MBS USB Plugin.