Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with GetLocalTime
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00667458
Message ID:
00667464
Vues:
20
This message has been marked as the solution to the initial question of the thread.
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform