DADiskMount usage
DADiskMount usage
- Subject: DADiskMount usage
- From: Zephyroth Akash <email@hidden>
- Date: Sun, 29 Nov 2009 12:12:19 +0100
Hi,
I need some help to understand what the user-defined context is.
Here's the code actually:
- (void)mountPartition:(char *)diskName atPath:(NSString *)path {
DASessionRef session = NULL;
DADiskRef disk = NULL;
CFURLRef url = NULL;
// create a new DiskArbitration session
session = DASessionCreate(kCFAllocatorDefault);
// create a new disk object from the given BSD device name
disk = DADiskCreateFromBSDName(kCFAllocatorDefault, session,
diskName);
// create the url where to mount the partition
url = CFURLCreateWithString(kCFAllocatorDefault, (CFStringRef)path,
NULL);
// This is the part where I'm stuck
I don't really know what context is neither if it must contains
infos or if it is filled with infos during the execution of the
DADiskMount function
// mount disk at given path
void *context;
DADiskMount(disk, url, kDADiskMountOptionDefault,
mountApprovalCallback, &context);
}
Can someone point me in the right direction ?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden