Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

HIDAPIDeviceMBS.Enumerate(VendorID as Integer = 0, ProduceID as Integer = 0) as HIDAPIDeviceInfoMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method USB MBS USB Plugin 16.0 Yes Yes Yes Yes No
Function: Enumerate the HID Devices.
Notes: 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.

Feedback, Comments & Corrections

HIDAPIDeviceMBS.Init as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method USB MBS USB Plugin 16.0 Yes Yes Yes Yes No
Function: Initialize the HIDAPI library.
Notes:
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.

Feedback, Comments & Corrections

HIDAPIDeviceMBS.LoadError as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method USB MBS USB Plugin 16.0 Yes Yes Yes Yes No
Function: The load error message.

Feedback, Comments & Corrections

HIDAPIDeviceMBS.LoadLibrary(File as FolderItem) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method USB MBS USB Plugin 16.0 Yes Yes Yes Yes No
Function: Loads the library.
Notes:
Returns true on success.
You can load a custom libhidapi.dylib (Mac), libhidapi.so (Linux) or libhidapi.dll (Windows).

See also:

Feedback, Comments & Corrections

HIDAPIDeviceMBS.LoadLibrary(Path as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method USB MBS USB Plugin 16.0 Yes Yes Yes Yes No
Function: Loads the library.
Notes:
Returns true on success.
You can load a custom libhidapi.dylib (Mac), libhidapi.so (Linux) or libhidapi.dll (Windows).

See also:

Feedback, Comments & Corrections

HIDAPIDeviceMBS.Open(VendorID as Integer, ProduceID as Integer, SerialNumber as String = "") as HIDAPIDeviceMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method USB MBS USB Plugin 16.0 Yes Yes Yes Yes No
Function: Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number.
Notes:
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.

Feedback, Comments & Corrections

HIDAPIDeviceMBS.OpenPath(path as string) as HIDAPIDeviceMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method USB MBS USB Plugin 16.0 Yes Yes Yes Yes No
Function: Open a HID device by its path name.
Notes:
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.

Feedback, Comments & Corrections

HIDAPIDeviceMBS.Shutdown as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method USB MBS USB Plugin 16.0 Yes Yes Yes Yes No
Function: Finalize the HIDAPI library.
Notes:
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.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS USB Plugin.




Links
MBS Xojo Plugins