[comp.sys.mac.programmer] System 7 File Manager & AppleShare Volumes

llama@eleazar.dartmouth.edu (Joe Francis) (06/11/91)

There is an error in IM VI's  description of the File Manager routine
PBGetVolMountSize (Chapter: 25, Page: 48).

In the description of the parameter block it states that ioBuffer is a
pointer to long.  In fact, it is treated by the File Manager as a pointer
to short.  If you use the "size" it returns as a long and try to allocate
storage for that "size", you will wind up trying to allocate $A7xxxx bytes
instead of $A7 bytes, which is the size of a volume mounting record for an
AppleShare volume (currently).

Please let me know if I'm full of crap; and I'll take this opportunity to
say thanks to the DTS folks who frequent this group and take the time to
set us straight.

Cheers,
Joe Francis                DCIS Project                   Dartmouth College
----------------------------------------------------------------------------
"Read My Lips: No Nude Texans!" - George Bush clearing up a misunderstanding

keith@Apple.COM (Keith Rollin) (06/12/91)

In article <1991Jun11.054037.10499@dartvax.dartmouth.edu> llama@eleazar.dartmouth.edu (Joe Francis) writes:
>There is an error in IM VI's  description of the File Manager routine
>PBGetVolMountSize (Chapter: 25, Page: 48).
>
>In the description of the parameter block it states that ioBuffer is a
>pointer to long.  In fact, it is treated by the File Manager as a pointer
>to short.  If you use the "size" it returns as a long and try to allocate
>storage for that "size", you will wind up trying to allocate $A7xxxx bytes
>instead of $A7 bytes, which is the size of a volume mounting record for an
>AppleShare volume (currently).
>
>Please let me know if I'm full of crap; and I'll take this opportunity to
>say thanks to the DTS folks who frequent this group and take the time to
>set us straight.

I think you are right on this. I trapped on the call, and noticed that
the client treated it as a pointer to a short as well.


P.S. I'm not a DTS folk, but I play one on TV.

-- 
------------------------------------------------------------------------------
Keith Rollin  ---  Apple Computer, Inc. 
INTERNET: keith@apple.com
    UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith
"But where the senses fail us, reason must step in."  - Galileo