Online Development Notebook > Index > ODN > USBm DLL Programming > DLL Commands > Version

Version


Description:

This is a USBm.dll function that returns the version of the DLL.

 

Command Syntax:

number USBm_Version(string)

The USBm_Version 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 acheive this is to set the string to a large size with the String function as in this code:

strStrng = String(250, " ")

Note: USBm_Version does not return TRUE⁄FALSE. The return value is the integer version number.

Note: USBm_Version does not affect the internal error string.

 

VB Declaration (USBmAPI.bas)

Public Declare Function USBm_Version _
    Lib "USBm.dll" _
        (ByVal versionstring As String) _
    As Integer

 

VB Example

Dim strng As String * 255
Dim result As Integer

    result = USBm_Version strng
    frmStatus.lstDevices.AddItem "About the USBm DLL: " & strng

This code fragment shows that strng is loaded with the "version" text of the DLL. Assuming that the form called "Main" exists with a text box called "Info", the "version" information will be made visible to the user. "Result" will contain a numerical version number.

 

C Example

-TBD-


Hardware:  U401 USB Interface    U421 USB Interface
Programming:  USBm DLL Programming    Download Files
Application Notes:  U4x1 Application Notes    Misc Applications and Information    FAQ