home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18364 < prev    next >
Encoding:
Text File  |  1992-11-13  |  1.9 KB  |  46 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!mcsun!sunic!kth.se!hemul.nada.kth.se!d88-jwa
  3. From: d88-jwa@hemul.nada.kth.se (Jon WΣtte)
  4. Subject: Re: about PBGetCatInfo in file manager
  5. Message-ID: <1992Nov13.124003.24735@kth.se>
  6. Sender: usenet@kth.se (Usenet)
  7. Nntp-Posting-Host: hemul.nada.kth.se
  8. Organization: Royal Institute of Technology, Stockholm, Sweden
  9. References: <HLIU.92Nov12164404@eniac.cs.oberlin.edu>
  10. Distribution: comp.sys.mac.programmer
  11. Date: Fri, 13 Nov 1992 12:40:03 GMT
  12. Lines: 32
  13.  
  14. >In the Inside Mac IV  page 156 says that if ioFDIRIndex is negative, the file manager ignores ioNamePtr and returns information about the directory specified by ioDirID.  I have assigned ioNamePtr pointed to a null string, ioFDIRIndex:=-1, and iovrefnum:=-1, I am not able to get the info about the directory or files specified by ioDirID.  I am keeping getting and error -43 can anyone tell me what is wrong here?
  15.  
  16. Try and break your lines up into < 80 character lines, please!
  17.  
  18. Anyway, are you SURE ioVRefNum should be -1? Are you SURE your
  19. dirID is a long and doesn't get sign extended? Are you SURE you
  20. clear out the entire block (using memset) before filling it in?
  21. Are you SURE the dirID exists? etc. etc.
  22.  
  23. If you do this:
  24.  
  25.     unsigned char theString [ 32 ] ;
  26.  
  27.     memset ( ( void * ) & theBlock , 0 , sizeof ( theBlock ) ) ;
  28.  
  29.     theBlock . hFileInfo . ioVRefNum = theVRefNum ;
  30.     theBlock . hFileInfo . ioDirID = theDirID ;
  31.     theBlock . hFileInfo . ioFDirIndex = -1 ;
  32.     theBlock . hFileInfo . ioNamePtr = theString ;
  33.  
  34.     err = PBGetCatInfoSync ( & theBlock ) ;
  35.  
  36. You should get correct results, provided theVRefNum and theDirID
  37. are valid. Try dirID 2 == the root of the volume.
  38.  
  39.                             / h
  40.  
  41. -- 
  42.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Suedoise (not french speaking) --
  43.   "It was, in fact, cool as all get-out.  Fortunately it was a little
  44.    too late (historically speaking) to be groovy."
  45.                      -- Dennis Pelton
  46.