Hello
Does anybody know how to convert Win32 FILETIME structure (number of 100-nanosecond intervals since January 1, 1601 written as 2 unsigned longs) to the Palm time format? (Presumably without 64-bit arithmetic.)
Why not use 64-bit arithmetic? It is supported by both C/C++ toolsets, AFAIK.
If you're doing this on the desktop, there are Win32 API calls that can convert a FILETIME to a seconds count. I'd start by getting the FILETIME of the Palm OS baseline (January 1, 1904 at 0:00), doing a subtract, and then scaling by dividing the result by 10,000,000, the number of 100-nanoseconds in a second.
Also in Win32, you could use FileTimeToSystemTime, and then take the SYSTEMTIME structure members and push them into a standard C library function to convert to a second count.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
