Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Netware 4.11 Server Time
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00122462
Message ID:
00123821
Vues:
19
>Thanks guys, I realize that you are suggesting putting it in the the login script, and yes that would synch up the time at logon, but...The user can log in and out of the application via command buttons. Let me try to clarify what I am doing. I'm writing a TimeClock app. It will be launched from the system login script(Novell). It is one form that runs minimized. The form is not closable(other than Windows End-Task <g>). On the form is a button to Log out and a button to Log in. These buttons are used when the user goes to lunch and comes back from lunch. So if the user takes a long lunch, he can simply set his time back and click the log in button, then set his time back to the right time. That's what I'm trying to avoid and that's why I need to be able to retrieve the Novell SysTime on demand. I didn't think it would be that hard to do either, but it's been giving me fits.
>
>>Yep, I was suggesting it be placed in the login script on the Novell server so it would be run when the user logs in to the server via Win95. Are you saying that running SYSTIME from the VFP app is problematic? I wouldn't think it would be hard to do, nor especially time-consuming for the user...
>>
>>>I don't believe that is what Paul suggested. He was saying put the SYSTIME command in the container login script so the workstation gets synchronized when the user logs in. Do not place SYSTIME in your VFP app.
>>>
>>>>I could do that, but the form that is running has a button to allow the user to logout for lunch and on to log in from lunch. So I waould have to synch. the times multiple times during the execution of the program, not just at login.

You can still use the NetAPI32 call NetRemoteTOD to retrieve the time from a Novell server. The prototype is:
NET_API_STATUS NetRemoteTOD(  
    LPWSTR UncServerName, 
    LPBYTE *BufferPtr 
   );
The first parameter is the UNC of the server to address; this hsould be null terminated. The second parameter is a pointer to a buffer that receives a TIME_OF_DAY structure:
typedef struct _TIME_OF_DAY_INFO {
    DWORD      tod_elapsedt;
    DWORD      tod_msecs;    
    DWORD      tod_hours;
    DWORD      tod_mins;
    DWORD      tod_secs;    
    DWORD      tod_hunds;
    LONG       tod_timezone;
    DWORD      tod_tinterval;
    DWORD      tod_day;    
    DWORD      tod_month;
    DWORD      tod_year; 
   DWORD      tod_weekday;
} TIME_OF_DAY_INFO, *PTIME_OF_DAY_INFO, *LPTIME_OF_DAY_INFO;
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform