• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unmounting an arbitrary volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unmounting an arbitrary volume


  • Subject: Re: Unmounting an arbitrary volume
  • From: Quinn <email@hidden>
  • Date: Fri, 6 Jul 2007 13:09:17 +0100

At 12:11 +0100 6/7/07, Dr. Ian Silvester wrote:
I'll know the volume name that I'd like to unmount - I'm guessing this'll be included in the info returned per volume and I can make a match on that?

Yes. The prototype for FSGetVolumeInfo is:

extern OSErr FSGetVolumeInfo(
    FSVolumeRefNum     volume,
    ItemCount          volumeIndex,
    FSVolumeRefNum *   actualVolume,
    FSVolumeInfoBitmap whichInfo,
    FSVolumeInfo *     info,
    HFSUniStr255 *     volumeName,
    FSRef *            rootDirectory
);

You pass in the address of a HFSUniStr255, which it fills out. That's a structure containing an array of UTF-16 values. You can build a NSString/CFString from that and then do whatever comparisons you need.

S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Unmounting an arbitrary volume (From: Dr.Ian Silvester <email@hidden>)
 >Re: Unmounting an arbitrary volume (From: Ben Artin <email@hidden>)
 >Re: Unmounting an arbitrary volume (From: "Dr. Ian Silvester" <email@hidden>)

  • Prev by Date: Re: Unmounting an arbitrary volume
  • Next by Date: Re: Unmounting an arbitrary volume
  • Previous by thread: Re: Unmounting an arbitrary volume
  • Next by thread: Re: Unmounting an arbitrary volume
  • Index(es):
    • Date
    • Thread