At 11:17 AM -0700 4/14/99, Christian Vandendorpe wrote:
> MemSet(&dateTimeType,0,sizeof(DateTimeType));
>
>This code works fine on POSE but on a real Palm3 I was getting back the
>strangest dates. I traced this down to the fact that MemSet was not setting
>all my DateTimeType fields to 0 and therefore TimDateTimeToSeconds was
>returning the strangest values. If instead of doing the MemSet I manually
>set all fields to 0, it works fine.
>
>Any ideas?
Yep, read the docs on MemSet. You got the 2nd and 3rd paramaters
backwards. :)
If it works on Poser, it's only because the initial values of the memory
are different. That by itself is kind of disturbing... Poser shouldn't be
doing anything to the application's stack, which is where that variable
lives.
--Bob