Path: utzoo!mnetor!uunet!husc6!bbn!rochester!ur-tut!dpvc From: dpvc@ur-tut (Davide P. Cervone) Newsgroups: comp.sys.amiga.tech Subject: Re: Changing Directories Message-ID: <1950@ur-tut.UUCP> Date: 2 May 88 21:47:43 GMT References: <8804230242.AA03176@jade.berkeley.edu> Reply-To: dpvc@tut.cc.rochester.edu.UUCP (Davide P. Cervone) Organization: Univ. of Rochester Computing Center Lines: 21 In article <8804230242.AA03176@jade.berkeley.edu> SLMYQ@USU.BITNET writes: >The only time when you need to know is when AmigaDOS gives you one of >those crazy NULL locks as a current directory. They're hard to work >with, to say the least. :) They refer to the boot device, and all I >want is to be able to get a *real* lock on the boot device when I find >one of those NULL locks, and switch over to that. > Bryan Why don't you call DupLock() on the NULL lock, and then use the lock that it returns? I recall using this trick way back in version 1.0 days, and I think it worked, since (as I understand it), DupLock() is guaranteed to return a pointer to a newly created lock on the same structure; i.e., it can NOT be the NULL lock, since that one already exists. Anyway, it got me out of that trouble back when I was messing with the DevInfo structures. Hope this helps. Davide P. Cervone dpvc@tut.cc.rochester.edu dpvc@ur-tut.UUCP DPVC@UORDBV.BITNET