[comp.sys.mac.programmer] accessing disk low level

Eliot.Henry@samba.acs.unc.edu (BBS Account) (07/30/90)

Thanks for the information i will try that code. You said it work for floppies 
what about the hard drive is there another means to access that? I've
been trying pbread for both and neither seems to be working.

stevec@Apple.COM (Steve Christensen) (07/31/90)

In article <653@beguine.UUCP> Eliot.Henry@samba.acs.unc.edu writes:
>Thanks for the information i will try that code. You said it work for floppies 
>what about the hard drive is there another means to access that? I've
>been trying pbread for both and neither seems to be working.

For doing block level reads of floppies and hard disks, the starting byte
offset (pb.ioOffset) and byte count (pb.ioByteCount) must be even multiples
of 512 bytes (the block size).  Arbitrary values in either of these fields
will return a paramErr (-50).  Likewise, the driver reference number
(pb.ioRefNum) and drive number (pb.ioVRefNum) must be setup correctly.
Both of these numbers for a particular drive can be found by either doing
a PBHGetVolInfo() call and checking the driver/driver number fields, or
perusing the drive queue.

What error is PBRead returning?

steve

-- 
____________________________________________________________________

  Steve Christensen             Internet:   stevec@goofy.apple.com
  Apple Computer, Inc.          AppleLink:  STEVEC
  20525 Mariani Ave, MS 81-CS   CompuServe: 76174,1712
  Cupertino, CA  95014

  "You just contradicted me."  "No I didn't."
____________________________________________________________________