re: 51170
Cheath, I am the fellow who asked about DOS packets a while ago. Found out how
to send/create them and got them to work. BUT when I tried to use the setdate
action with the information in the 1.2 gamma1 autodocs all I get when the
packet comes back is the error for invalid lock. I know that I am looking at a
file because my test program tells me if I try to change the date of a
non-existant file. What I am trying to do is set the date of the file to the
current date (I first set it back from CLI with SetDate). Currently the file's
date is not changed. here is what I am doing:
packet->sp_Msg.mn_Node.ln_Name = (char *) &(packet->sp_Pkt);
packet->sp_Pkt.dp_Link = (struct Message *)&(packet->sp_Msg);
packet->sp_Pkt.dp_Port = rport; /* port I created with CreatPort */
packet->sp_Pkt.dp_Type = ACTION_SETDATE /* 34L */
packet->sp_Pkt.dp_Arg1 = loc; /* lock I created with loc = Lock() */
packet->sp_Pkt.dp_Arg2 = (APTR)dstamp; /* datestamp returned by
DateStamp() */
Everything works ok but res2 tells me that the lock was invalid and the date of
the target file is unchanged. WHAT AM I DOING WRONG? Sigh, I have a version
of the shell that copies files without changing dates now by calling SetDate
with the approiate arguments. It is a KLUDGE. Would like to change to the
right way (using packets) but I seem to be missing something. Heard you
mention that you had a replacement for setdate, so I thought you might know.
If not, sorry, will post right method when I find out. If so,
YEEAAAAAAAA HOOOOOOOOOOOO!!!!!!!!!
Thanks in advance either way.
jim powell