In article
<a7ca45868800aa31acf3105bfc83c6e6@localhost.talkaboutmac.com>,
> is there an equivalent for the windows "GetVolumeInformation" API that I
> could use to get the volume serial number for Mac OS 9 (or earlier)?
The volume serial number under Windows is just a string composed of some
arbitrary bits of information like the format date and capacity. It's
very distinctly _not_ the serial number of the drive hardware. The
scheme I used to identify a volume was to call FSGetVolumeInfo to get
the creation date and size and then build a string of the 5 components
that make up those two values.
CFStringRef CreateVolumeIdentifierFromVolumeRefNum(FSVolumeRefNum
inVolume)
{
CFStringRef theResult = NULL;
FSVolumeInfo theVolumeInfo = {};
FSVolumeInfoBitmap theBitmap = kFSVolInfoCreateDate | kFSVolInfoSizes;
if(FSGetVolumeInfo(inVolume, 0, NULL, theBitmap, &theVolumeInfo,
NULL, NULL) == noErr)
{
theResult = CFStringCreateWithFormat(kCFAllocatorDefault, NULL,
CFSTR("%.4X%.8X%.4X%.16qX"),
theVolumeInfo.createDate.highSeconds,
theVolumeInfo.createDate.lowSeconds,
theVolumeInfo.createDate.fraction,
theVolumeInfo.totalBytes);
}
return theResult;
}

Signature
Goal 2005: Convincing James Hetfield to cover the Strawberry Shortcake
"Are You Berry Berry Happy?" song.
On 25/10/2005, rolasa wrote in message
<a7ca45868800aa31acf3105bfc83c6e6@localhost.talkaboutmac.com>:
> is there an equivalent for the windows "GetVolumeInformation" API that I
> could use to get the volume serial number for Mac OS 9 (or earlier)?
Macs don't use volume serial numbers. In fact, Windows doesn't either:
it fakes them. If you tell us why you think you want one we can probably
suggest some alternative strategies.
Simon.

Signature
http://www.hearsay.demon.co.uk