Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: FSGetVolumeInfo problem



Larry,

Whenever a kEventVolumeMounted occurs, how I can know the mounted volume
info such as its reference number? How I can know if the mounted device
is a USB flash mem stick?

Ben



-----Original Message-----
From: Laurence Harris [mailto:email@hidden] 
Sent: Wednesday, November 30, 2005 3:42 PM
To: Ben Zhu; carbon-dev
Subject: Re: FSGetVolumeInfo problem

On 11/30/05 6:11 PM, Ben Zhu didst favor us with:

> Larry,
> 
> Can you point out where I can get some sample code to show how to use
> the kEventVolumeMounted and
> kEventVolumeUnmounted events?

Just install a handler on the application for the events that interest
you
and it will be called when a volume is mounted or unmounted. Read about
them
in CarbonEvents.h. If you've done anything with CarbonEvents then you
shouldn't need any sample code for these. I install my handler on the
application. I don't remember off the top of my head if these events are
sent to windows or not.

Larry
> 
> Thanks,
> 
> Ben
> 
> 
> 
> -----Original Message-----
> From: Laurence Harris [mailto:email@hidden]
> Sent: Wednesday, November 30, 2005 2:16 PM
> To: Ben Zhu; carbon-dev
> Subject: Re: FSGetVolumeInfo problem
> 
> On 11/30/05 4:33 PM, Ben Zhu didst favor us with:
> 
>> 
>> I guess this is not the first message about FSGetVolumeInfo problem.
>> 
>> I have a loop to find out the specific volume name among the mounted
>> volumes.
>> 
>> First I insert a USB device, then go through a loop to call the API
>> FSGetVolumeInfo to get the mounted volume. It is fine.
>> 
>> Secondly I insert another USB device, then go through the loop and
> call
>> the same API, but the FSGetVolumeInfo return error code -35.
>> 
>> What's wrong and how to fix this problem?
> 
> I'm not sure exactly what you're doing, but can you not use a
> kEventVolumeMounted handler instead?
> 
> Larry
> 
> 
> 



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.