On Feb 14, 2011, at 7:46 AM, Abhijeet Singh wrote:

> Hi,In my application 1. I want to check whether my application is running 
> from CD (removable media) or from hard disk.I dont want to allow my user to 
> run my application from hard disk. 2. Same application i developed in 
> windows. I used to store the volume serial number of the CD that was first 
> time used to run my application. How can i get Volume Serial Number of the CD 
> here?(I found stat() of BSD. It returns several volume information 
> parameters. Can i get volume serial number from stat()?)

Volume serial numbers, as such, are a Windows-specific concept.

Mac OS X supports the notion of a volume UUID, but not all file systems support 
it.  It should be supported for a CD or a hard disk, though.

There are a couple of APIs that can obtain that.  As mentioned, Disk 
Arbitration is one.  The getattrlist() function is another.

Regards,
Ken

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to