3 Replies Latest reply on Mar 27, 2009 1:33 AM by Xposure Interactive

    baDiskInfo

    Xposure Interactive Level 1
      I have been attempting to use the following code to retrieve the serial number from a usb stick:

      on getNum me
      set theDrive = baFindDrive( "a", "UID.dir" )
      set UID = baDiskInfo( theDrive , "number" )
      alert "" & UID
      end

      The number retrieved by the above code (1333675516.0000) did not match the ones given to me by the manufaturer (00000022510003). I have since read the contents of the stick using 'USBlyzer' software and the iSerial number returned matches the one given to me by the manufaturer (00000022510003). I have no idea why I am not retrieving the correct value.

      This is part of a massive project for the future of my business so any help would be greatly appreciated.
        • 1. Re: baDiskInfo
          Level 7
          Xposure Interactive wrote:
          > I have been attempting to use the following code to retrieve the
          > serial number from a usb stick:
          >
          > on getNum me
          > set theDrive = baFindDrive( "a", "UID.dir" )
          > set UID = baDiskInfo( theDrive , "number" )
          > alert "" & UID
          > end
          >
          > The number retrieved by the above code (1333675516.0000) did not
          > match the ones given to me by the manufaturer (00000022510003).

          The docs for buddyAPI say it should be returning an integer
          http://www.mods.com.au/budapi_docs/baDiskInfo.htm

          but I also find it returns a float (buddyAPI v.3.75).

          I think the docs are out of step with the implemention. ISTR that as
          Director's integers are limited to signed 32-bit values there is a problem
          with "large" disk serial numbers so buddyAPI has to return a float. I
          suppose a better way might be to return a string.

          If you contact Gary ( http://www.mods.com.au/budapi/support.htm), I'm sure he
          will be helpful.

          Andrew


          • 2. Re: baDiskInfo
            Level 7
            Try using Valentin's Shell xtra or a DLL interface xtra to talk to a
            program/library that will do the serial number reading for you (like
            USBlyzer that you cite). I'm not convinced that Buddy API's
            baDiskInfo(drive, "number") will provide the serial number you are
            looking for.
            • 3. Re: baDiskInfo
              Xposure Interactive Level 1
              quote:

              Originally posted by: Newsgroup User
              Try using Valentin's Shell xtra or a DLL interface xtra to talk to a
              program/library that will do the serial number reading for you (like
              USBlyzer that you cite). I'm not convinced that Buddy API's
              baDiskInfo(drive, "number") will provide the serial number you are
              looking for.




              Indeed... Apparently the baDiskInfo doesn't return the unchangeable serial number for the drive it reads the DOS format number which DOS assigns to the drive when it is formatted.

              Thanks for your help. I'll post the solution when I find it.