From: | Jack York |
Date: | 11 Aug 2001 at 05:06:21 |
Subject: | [amiga-c] Re: How do I copy clone |
Hello Colin
On 11-Aug-01, Colin Wenzel wrote:
> On 10-Aug-01, Jack York wrote:
>> This works except for SetFileDate. I even tried
>
>> struct DateStamp ds;
>> ds.ds_Days = 300; ds.ds_Hour = 0; ds.ds_Tick = 0;
>> SetFileDate(target_file, &ds);
>
>> But no matter what I do the written file has the current date and
>> time. Any ideas why this may be failing.
>> Jack
>
> All DOS structures require LONGWORD alignment,
> your compiler only guarantees WORD alignment from storage
> classes.
It was failing with the fib I had allocated with AllocPooled also. Which
way does AllocPooled align? In a different post I mentioned that I was
told that AllocPooled called AllocMem and AllocMem says it returns LONGWORD
aligned memory. So if I use AllocPooled to obtain memory for a fib, is that
incorrect? I am not opposed to using AllocDosObject but I would like to
know why I am doing it.
>
> SetFileDate() doesn't work (yet doesn't return fail) on
> an SFS filesystems that have not been formatted with NORECYCLED.
I use PFS and SetFileDate works fine now. Turns out that it was because my
file was already open when trying to set the file date.
Jack
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/