Discussion:
baDiskInfo
(too old to reply)
Xposure Interactive
2009-03-26 08:57:27 UTC
Permalink
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.
Andrew Morton
2009-03-26 09:24:20 UTC
Permalink
Post by Xposure Interactive
I have been attempting to use the following code to retrieve the
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
Sean Wilson
2009-03-26 21:39:15 UTC
Permalink
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.
Xposure Interactive
2009-03-27 08:33:11 UTC
Permalink
[q][i]Originally posted by: [b][b]Newsgroup User[/b][/b][/i]
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.
[/q]


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.

Loading...