Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!shlump.nac.dec.com!shodha.dec.com!elvira!ridder From: ridder@elvira.enet.dec.com (Hans Ridder) Newsgroups: comp.sys.amiga Subject: Re: Help needed on AmigaDos Locks Keywords: Lock,Help,AmigaDos Message-ID: <630@shodha.dec.com> Date: 23 Jan 90 05:23:58 GMT References: <159@spodv4.UUCP> <2754@jolnet.ORPK.IL.US> <7857@nigel.udel.EDU> Sender: news@shodha.dec.com Organization: Digital Equipment Corporation, Customer Support Center Lines: 36 In article <7857@nigel.udel.EDU> new@udel.edu (Darren New) writes: >In article <2754@jolnet.ORPK.IL.US> caw@jolnet.UUCP (Chris Wichura) writes: >>A much more useful function would be a way to open a file based on the >>lock you have instead of having to go though some crap like use ARP's > >It's in there (Ooooh I always wanted to say that). I've got documentation >somewhere that says basically zero everything in the file handle except >set the buffer pointers to -1 and then put in the Lock and your file >is open. Supported? It's in official docs somewhere, so I guess so. Sorry for the long delay, but I kept forgetting to look this up when I had the manual. In my *ancient* (1985) AmigaDOS Technical Reference Manual, on page 3-9 it says that to do this you have to set up a DOS ActionFindInput "packet" with the FileHandle, the Lock (on the owning directory), and the name of the file. The FileHandle must be intitialized to 0's, except CharPos and BufEnd should be set to -1, and the ProcessID set to the handler process. You then send the packet to the Handler/Filesystem and check the result. Of course you can now do other things while the handler runs *asynchronously*. All in all, not that difficult, but not simple either. I assume that's what you were talking about, or did you see an easier way documented somewhere? > -- Darren -hans ======================================================================== Hans-Gabriel Ridder Digital Equipment Corporation ridder@elvira.enet.dec.com Customer Support Center ...decwrl!elvira.enet!ridder Colorado Springs, CO