Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!usc!apple!uokmax!servalan!epmooch!ben From: ben@epmooch.UUCP (Rev. Ben A. Mesander) Newsgroups: comp.sys.amiga.programmer Subject: Re: dos.library ACTION_SET_DATE question. Message-ID: Date: 7 Apr 91 23:04:37 GMT References: <182@atesysv.UUCP> Lines: 55 >In article <182@atesysv.UUCP> lanzo@wgate.UUCP (Mark Lanzo) writes: >In a prior article ben@epmooch.UUCP (Rev. Ben A. Mesander) wrote: > > I grabbed an excellent program called PickPacket from a fish disk. It's > > a great tool to play with dos.library packets. > >Another fine product brought to you by those folks at >the Software Distillery :-) [...] >Unfortunately, I can't remember what the exact args for ACTION_SET_DATE >are; but I'll take a few stabs in the dark: > > 1. Pickpacket is incorrectly passing the pointer to the DateStamp > structure (BPTR vs APTR). > > 2. Pickpacket is prompting for the wrong args, and you need: > Arg1 = Lock on parent, Arg2 = name of file, Arg3 = Ptr to DateStamp. > Note that Arg1 can NOT be null. Arg1 = unused Arg2 = lock to parent dir (BPTR) Arg3 = name of file (BSTR) Arg4 = CPTR to date stamp Thanks to you and Randall Jesup, I patched my copy of PickPacket. It works fine for ACTION_SET_DATE (aside from the fact that I can only set the time of a file to the "beginning of time") That's no big deal though, I can always "touch" it later. >Also, try this: > > 3a. Get a lock on DF1: > LOCATE_OBJECT: Arg1=NULL, Arg2=NULL, Arg3=Shared > (assume pickpacket returns "FileLock 1"). > 3b. Get a lock on DF1:ruru > LOCATE_OBJECT: Arg1="FileLock 1", Arg2="ruru", Arg3=Shared > (assume pickpacket returns "FileLock 2"). > 3c. Now do the SET_DATE, using "FileLock 2". Now that's strange - I thought that I had to put a lock on the parent directory in the SET_DATE packet, not a lock on the file itself. Also, I can set the date of a file using shared locks? That seems odd to me also... >If this is due to a bug in pickpacket 1.0, then the solution is to wait >until I finish with pickpacket 2.0! Yeah, except I'd like to get it done ASAP! :-) Thanks, Mark. -- | ben@epmooch.UUCP (Ben Mesander) | "Cash is more important than | | ben%servalan.UUCP@uokmax.ecn.uoknor.edu | your mother." - Al Shugart, | | !chinet!uokmax!servalan!epmooch!ben | CEO, Seagate Technologies |