Return the contents of the debug string
Description:
This is a USBm.dll function that returns a string with debug information.
Command Syntax:
true⁄false USBm_DebugString( string )
The USBm_DebugString function syntax has these parts:
Part | Description |
string | Any valid string expression. |
Remarks:
In VB the string passed as an argument must be large enough to hold all the characters that the function places in the string. The best way to achieve this is to set the string to a large size with the String function as in this code:
strStrng = String(250, ” “) |
Note: USBm_DebugString always returns TRUE.
Note: USBm_DebugString does not affect the internal error string.
VB Declaration (USBmAPI.bas)
Public Declare Function USBm_DebugString _ Lib “USBm.dll” _ (ByVal debugstrng As String) _ As Integer |
VB Example
Dim strng As String * 255 USBm_DebugString strng frmStatus.lstDevices.AddItem “Debug: ” & strng |
This code fragment shows that strng is loaded with the “debug” text of the DLL. Assuming that the form called “Main” exists with a text box called “Info”, the “debug” information will be made visible to the user.
C Prototype
int USBm_DebugString( char *errorstring ); |
C Example
RobotBASIC
Recent Error and Debug String are handled by the RobotBASIC function usbm_ErrorSpecs().
usbm_ErrorSpecs()
Returns a string that contains information about the recent error string and the debug string if any in the DLL. There are two sections separated by the | character. You can use the Extract() function to extract each section separately if desired. The sections are:
Recent Error
Debug String