Announcement

Collapse
No announcement yet.

New USB2 Application Programming Interface (API)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • New USB2 Application Programming Interface (API)

    A new API has been released to help 3rd party developers to create solutions around the PassMark USB2 test plugs.

    This free USB2 Application Programming Interface has been designed to allow access by 3rd party programs to the PassMark USB 2.0 loop back plug. It provides several functions to communicate with the USB2 loop back plugs as an easy way to use the plugs without having to write any device driver or extra firmware code.

    The API will allow software developers to integrate the USB test plug seamlessly into their own applications.

    The usb2api.zip file contains;
    • - The API, consisting of the USB2Dll.lib, USB2Dll.dll and USB2DLL.h files
      - A program that demonstrates how to use the API, USB2_DLL_Demo.exe
      - The C++ source code for the demo USB program
      - The USB2 API user guide that defines the available functions in the DLL.

    More details about the API and source code downloads are available on this page,
    http://www.passmark.com/products/usb2api.htm

    ------
    David

  • #2
    Using USB2API in VB

    Does anyone know how to use it in VisualBasic.

    I got "USB2NumPlugsConnected" to work but cant get "USB2GetConnectedPlugs" to work

    Thanks

    Comment


    • #3
      We don't know of anyone that uses VB to access the USB2 API. But there is no reason why it should not be possible. If you have gotten one function to work, then I am guessing your problem might be with the paramters of the USB2GetConnectedPlugs that are causing a problem.

      The USB2GetConnectedPlugs function accepts and returns an array of 'bools'.

      In C++ this is defined as,
      #define MAX_USB_DEV_NUMBER 32
      bool connectedPlugs[MAX_USB_DEV_NUMBER];

      The bool character type in C++ is the same as single byte (8bits). But it is only every given the value 0 or 1. An array of bools is packed tight (not on 4 byte boundries for example).

      So if you create an array of bytes and pass in a pointer to it, it should work.

      I am not an expert in VB so I am not sure of the exact code required to do this.

      -----
      David

      Comment


      • #4
        Bug in USB2DLL.DLL

        I'm almost finished a wrapper DLL to allow me to use the API in Visual Basic. but I have noticed a bug in the passmark DLL.

        here it is, When you set test parameters, but dont have any devices set to true (mean dont preform tests on any device) then run StartTest. you would think it shouldn't do anything. but thats not the case, if you call is Testrunning, it returns true. eventhough no tests are running.

        can you please verify this for me.

        Thanks.

        Comment


        • #5
          One more question for PassMark.

          is there anyway to set the speed of the Loopback device. I would like to be able to Set the device to the 3 speeds, Low, Full, and high seperatly and run a benchmark test at each speed. to verify it can operate at all 3 speeds.

          I dont see this in the docs, so if its not can this be added?

          Comment


          • #6
            We'll have a look at the StartTest issue. But it might be a couple of days before we can get back to you.

            On the 2nd issue. I don't think there is any facility in the firmware of the plugs to force a particular speed. Free RAM in the EEPROM is also tight. So this would probably require a lot of development effort (New firmware, device driver and API). I don't think we would be prepared to go to this amount of effort unless there was significant demand for the feature.

            --
            David

            Comment


            • #7
              The StartTest issue should now be fixed in the latest build available from http://www.passmark.com/ftp/usb2api.zip.

              Comment


              • #8
                You wouldn't like to share that wrapper dll for VB would you? It sure would save me the time of having to make one myself.

                Comment


                • #9
                  You wouldn't like to share that wrapper dll for VB would you?
                  If we had VB code we would share it. But we don't. We only have C++ demo code for this DLL. But the process for calling DLLs from VB is fairly well documented on the web.

                  Comment

                  Working...
                  X