Manually mount device (DADiskMountWithArguments), Desktop not updated until next Finder launch
Manually mount device (DADiskMountWithArguments), Desktop not updated until next Finder launch
- Subject: Manually mount device (DADiskMountWithArguments), Desktop not updated until next Finder launch
- From: Tim Schooley <email@hidden>
- Date: Tue, 23 Sep 2008 10:31:56 +0100
Hi all,
The title kinda says it all. Steps to reproduce:
1) Mount a device to a specific location, using the following kind of code:
DADiskMountWithArguments(disk_ref,
mount_url,
kDADiskMountOptionDefault,
&mount_disk_callback,
(void*)&mount_result,
mount_args);
where mount_url is a valid CFURL...
2) Look on the Desktop. There's no volume icon! :(
3) Open a Finder window.
4) Look on the Desktop. Now there's a volume icon! :D
So my question is, how can I get the volume icon to appear programmatically?
I've tried notifying processes of a Desktop refresh, which I'm guessing
_isn't_ the way to go about it, since nothing has added the alias to the
Desktop as yet... :
OSStatus result = FNNotifyByPath(
(const UInt8*)desktop_buf,
kFNDirectoryModifiedMessage,
kNilOptions)
I really don't want to go down the route of sending a kAESync message either
(all that effort for this little issue...).
Any ideas?
Thanks for any help.
Kind regards,
Tim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden