Using FSMountServerVolumeAsync
Using FSMountServerVolumeAsync
- Subject: Using FSMountServerVolumeAsync
- From: "Fazekas, Miklós" <email@hidden>
- Date: Mon, 17 Jan 2005 14:37:01 +0100
How do i use FSMountServerVolumeAsync?!
I'd like to control the timeout of the mounting so i've tried to use
the code bellow.
But it seems that the FSMountServerVolumeAsync call is blocked in
waiting for the server search then the authentication dialog from the
user.
Shall i fire a new thread to use FSMountServerVolumeAsync???
Or is it imposibble what i'm trying?! I probably don't want to cancel
a mount operation the user is entering the authentication dialog. I'd
like to cancel the mounting in case the server is not reachable as the
default timeout seems to be 120 seconds which is too big for us.
FSCreateVolumeOperation(&volOp);
FSMountServerVolumeAsync (url, mountDir, user, password, volOp, 0,
flags, VolumeMountedProc, CFRunLoopGetCurrent(), CFSTR("MountMode"));
SInt32 runLoopStatus = CFRunLoopRunInMode (CFSTR("MountMode"), timeout,
false);
if (runLoopStatus != kCFRunLoopRunStopped) {
FSCancelVolumeOperation (volOp);
return kMPTimeoutErr;
}
FSGetAsyncMountStatus (...); //
void VolumeMountedProc (FSVolumeOperation volumeOp, void * clientData,
OSStatus err, FSVolumeRefNum mountedVolumeRefNum)
{
CFRunLoopStop (CFRunLoopGetCurrent ());
}
Regards,
Miklós
_______________________________________________
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