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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to