home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / amiga / programm / 15867 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  1.6 KB

  1. Path: sparky!uunet!know!cass.ma02.bull.com!think.com!ames!kronos.arc.nasa.gov!iscnvx!netcomsv!terapin!paulk
  2. From: paulk@terapin.com (Paul Kienitz)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Help with my C program anyone?
  5. Message-ID: <paulk.27os@terapin.com>
  6. Date: 15 Nov 92 19:51:30 GMT
  7. References: <1992Nov13.065904.1066@cs.uow.edu.au>
  8. Organization: BBS
  9. Lines: 28
  10.  
  11. > My problem is this: I get no error messages from any of the OS
  12. > functions, they all seem to work fine, except that the current
  13. > directory has NOT been changed. (I have verified this because the
  14. > program is run from the CLI and I just printf the GetCurrentDirName
  15. > string).
  16. > The main problem is however, that a) the directory name on the
  17. > shell prompt is not the new directory ( I was thinking that perhaps
  18. > this has to be set manually)
  19.  
  20. CurrentDir() does NOT change the directory name string.  That's what
  21. SetCurrentDirName() is for.  If you want the two to match you have to
  22. use both.
  23.  
  24. > b) when I do another disk command such as 'dir' after running my
  25. > program the machine crashes!
  26.  
  27. Well, let's see.  Your procedure was to do this:
  28.  
  29. > By now, I assume that the UnLock function has unlocked the preous
  30. > directory, and there is now a valid lock on the new directory, and
  31. > it has become the current directory. Before my program finishes I
  32. > make sure that it unlocks the new current directory.
  33.  
  34. So once the lock that you used for the new CD has been unlocked and
  35. is no longer usable, what did you put in its place?  What is
  36. CurrentDir set to when your program exits?  The one you just
  37. unlocked?  You discarded the original value you found there...
  38.