Platforms to show: All Mac Windows Linux Cross-Platform
Back to Rockey2MBS class.
Rockey2MBS.Close
Function:
Closes the dongle.
Notes:
Lasterror is set.
This is called automatically by the destructor.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Dongle | MBS Dongle Plugin | 9.6 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Notes:
Lasterror is set.
This is called automatically by the destructor.
Rockey2MBS.Find as Int32
Function:
Searches for Rockey 2 dongles on the computer.
Notes:
Lasterror is set.
Returns the number of attached Rockey 2 dongles.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Dongle | MBS Dongle Plugin | 9.6 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Notes:
Lasterror is set.
Returns the number of attached Rockey 2 dongles.
Rockey2MBS.GenUID(byref uid as UInt32, seed as string, isProtect as boolean) as Int32
Function:
Generates an user ID.
Notes:
UID: the generated user id.
seed: Seed to generate UID. It is a character string with the maximum length of 64 bytes.
isProtect: Sets write protection. 0=dongle not write protected, 1=dongle write protected.
Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Dongle | MBS Dongle Plugin | 9.6 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Notes:
UID: the generated user id.
seed: Seed to generate UID. It is a character string with the maximum length of 64 bytes.
isProtect: Sets write protection. 0=dongle not write protected, 1=dongle write protected.
Lasterror is set.
Rockey2MBS.Open(mode as Int32, uid as UInt32, byref hid as UInt32)
Function:
Opens a specific rockey 2 dongle.
Notes:
mode:
This parameter indicates the way to open the dongle
mode = 0, open the first found ROCKEY2 dongle
mode > 0, open the dongle according to the UID. The mode value is thedongle number, for example: uid=12345678, mode=2, this means it willopen the second dongle with UID 12345678
mode = -1, open the dongle according to the HID, and *hid can not be 0We defined two constants: AUTO_MODE=0 and HID_MODE=-1
uid(UserID): You need to specify the dongle UID and this UID is generated withRY2_GenUID
hid(HardwareID): Open dongle with HID of hid. The dongle HID will be returned to hid regardless of how the dongle was opened.
Sets the handle and lasterror properties.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Dongle | MBS Dongle Plugin | 9.6 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Notes:
mode:
This parameter indicates the way to open the dongle
mode = 0, open the first found ROCKEY2 dongle
mode > 0, open the dongle according to the UID. The mode value is thedongle number, for example: uid=12345678, mode=2, this means it willopen the second dongle with UID 12345678
mode = -1, open the dongle according to the HID, and *hid can not be 0We defined two constants: AUTO_MODE=0 and HID_MODE=-1
uid(UserID): You need to specify the dongle UID and this UID is generated withRY2_GenUID
hid(HardwareID): Open dongle with HID of hid. The dongle HID will be returned to hid regardless of how the dongle was opened.
Sets the handle and lasterror properties.
Rockey2MBS.Read(BlockIndex as Int32) as string
Function:
Read dongle content.
Notes:
BlockIndex: Block index. Specify the block to write. The value range is 0-4
Returns 512 bytes on success.
Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Dongle | MBS Dongle Plugin | 9.6 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Notes:
BlockIndex: Block index. Specify the block to write. The value range is 0-4
Returns 512 bytes on success.
Lasterror is set.
Rockey2MBS.Transform(data as string) as string
Function:
Transforms data.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Dongle | MBS Dongle Plugin | 9.6 | ✅ Yes | ❌ No | ✅ Yes | ❌ No | Desktop, Console & Web |
Rockey2MBS.Write(BlockIndex as Int32, data as string)
Function:
Writes data to the dongle.
Notes:
Blockindex: Specify the block to write. The value range is 0-4.
Lasterror is set.
If you pass less than 512 bytes, the remaining space is filled with zeros.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Dongle | MBS Dongle Plugin | 9.6 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Notes:
Blockindex: Specify the block to write. The value range is 0-4.
Lasterror is set.
If you pass less than 512 bytes, the remaining space is filled with zeros.
The items on this page are in the following plugins: MBS Dongle Plugin.
