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: Help: PBGetVolMountInfo (random crashes)



On Tue, 25 Oct 2005 22:01:07, Dave Kip <email@hidden> wrote:

> I am getting random crashes on trying to get mounted folder details.
> Most of the time crashes come when my folder is on "Windows 2000
> Server". Following is the code with inline comments I am using to get
> the machine name.
> 
> //pbp is ParamBlockRec pointer
> if (err = PBGetVolMountInfo(pbp)) goto errorabort;
> 
> // I am not sure if casting to AFPVolMountInfo * is ok!
> sourcecp = (uchar *)(buf1+((AFPVolMountInfo *)buf1)
> ->serverNameOffset);

Not a direct answer:
In general casting to AFPVolMountInfo is not ok. It is ok only
for AppleShare volumes. Other volume formats use completely
different mount info structures. I never saw it documented what
format use smb, DAVE, etc. Though, sometimes this knowledge is
not required (if you already have the volume mounted you can
grab the info and treat it as raw bytes and later you can
remount this volume using these raw bytes - this is what alias
manager does).

Mike

 _______________________________________________
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.