Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!cbmvax!ken From: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Newsgroups: comp.sys.amiga.tech Subject: Re: UnLocking locks returned by CurrentDir() Message-ID: <16342@cbmvax.commodore.com> Date: 6 Dec 90 15:07:45 GMT References: <4046@mindlink.UUCP> Reply-To: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Organization: Commodore, West Chester, PA Lines: 42 In article <4046@mindlink.UUCP> a665@mindlink.UUCP (Anthon Pang) writes: >First of all, IMO, CurrentDir takes the old lock, frees it, and gives you a new >one. Secondly, NULL isn't a valid lock value (returned by Lock, CurrentDir, >DupLock...)...it is used as a function parameter to specify the root directory >or system volume. CurrentDir does not free anything. NULL is a valid result. When in doubt, consult the documentation: dos.library/CurrentDir dos.library/CurrentDir NAME CurrentDir -- Make a directory associated with a lock the working directory SYNOPSIS oldLock = CurrentDir( lock ) D0 D1 struct FileLock *oldlock, *lock; FUNCTION CurrentDir() causes a directory associated with a lock to be made the current directory. The old current directory lock is returned. A value of zero is a valid result here, this 0 lock represents the root of fiat you booted from (which is, in effect, the parent of all other file system roots.) INPUTS lock - BCPL pointer to a lock OUTPUTS oldLock - BCPL pointer to a lock SEE ALSO Lock -- -- Ken Farinsky - CATS - (215) 431-9421 - Commodore Business Machines uucp: ken@cbmvax.commodore.com or ...{uunet,rutgers}!cbmvax!ken bix: kfarinsky