Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems getting Server time
Message
De
16/01/2004 12:30:32
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Problems getting Server time
Divers
Thread ID:
00867552
Message ID:
00867552
Vues:
78
I've been using NetRemoteTOD and RtlMoveMemory and following http://support.microsoft.com/default.aspx?scid=kb;[LN];249716 trying to get the server time. It works, but not consistently. Sometimes when it doesn't work NetRemoteTOD will return error code 123 or error code 1113. But most of the time when it doesn't work I wind up with a blank datetime value. Has anyone noticed this behaviour before? Any ways to get around it?

I can't be writting files to the server so I can't use the write a file to the server and ADIR trick.

I'm using VFP 7. The workstation will usually be Win XP and the server is Win 2K. But I still want the code to work in case we upgrade the server someday, so I don't think I can use NET TIME. Plus, I only need to get the server time, not actually set the local computer.

My current work around is to try using NetRemoteTOD with the server name as "MYSERVER" and as "\\MYSERVER". I also added a loop so it will repeately try getting the server time until it actually gets the server time. Every tenth try the user has the option to cancel as it seems that if it won't work the first few times it probably won't work at all.

Thanks,
Chris
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform