>I'm having a problem with GetLocalTime. It is returning very strange values. I'm quite sure I'm calling it properly. The calling code looks like this:
>
>DECLARE GetLocalTime IN Win32API STRING @
>
>lcSystemTime = SPACE(32)
>GETLOCALTIME(@lcSystemTime)
>
>The value returned in lcSystemTime looks like this (hex bytes):
> 210 7 6 0
> 3 0 12 0
> 11 0 45 0
> 12 0 158 1
> 0 0 0 0
> 0 0 0 0
> 0 0 0 0
> 0 0 0 0
>Of course, these values change slightly over time.
>
> These are clearly invalid values. Any idea what's going wrong here?
> Thanks.
Nope, they probably aren't. Look at my Window Time programming. It has a routine to convert a SYSTEMTIME structure to a date/time value.
FYI, the SYSTEMTIME structure is defined as follows:
typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME;
You'll note that each of the members is a word, not a dword, and therefore the structure is 16 bytes long.
George
Ubi caritas et amor, deus ibi est