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 Oct 25, 2005, at 9:31 AM, Dave Kip 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.

//Buf1 is of type "Ptr"
	pbp->ioParam.ioBuffer = buf1;

//pbp is ParamBlockRec pointer
          if (err = PBGetVolMountInfo(pbp)) goto errorabort;

Has the code also set up ioVRefNum and ioNamePtr?

Does pbp point to some allocated memory of type ParamBlockRec? (For example, an uninitialized "ParamBlockRec* pbp;" is no good.)

Does "buf1" point to allocated memory with size determined by a previous call to PBGetVolMountInfoSize?

(See <http://developer.apple.com/documentation/Carbon/Reference/ File_Manager/file_manager/chapter_1.2_section_33.html>.)

// I am not sure if casting to AFPVolMountInfo * is ok!
          sourcecp = (uchar *)  (buf1+((AFPVolMountInfo *)buf1)
                                       ->serverNameOffset);

Does the rest of the data, surrounding the server name, make sense? Maybe it has actually returned an empty server name.


Cheers,

--Dave

_______________________________________________
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
References: 
 >Help: PBGetVolMountInfo (random crashes) (From: Dave Kip <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.