Re: systemtime
- Posted by rml at rubis.trix.net Sep 19, 2003
- 429 views
Hi Derek; Thanks for the quick response! I write this small program: ---------------------------------------------------------------------------- include Win32lib.ew constant xGetSystemTime = registerw32Procedure(kernel32,"GetSystemTime", {C_POINTER}) constant xGetLocalTime = registerw32Procedure(kernel32,"GetLocalTime", {C_POINTER}) object bla,t t=GetSystemTime() bla=message_box(sprint(t),"",0) E:\EUPHORIA\PROGRAMAS\backup.EXW:10 GetSystemTime has not been declared t=GetSystemTime() ^ Rubens At 02:01 19/9/2003, you wrote: > >On Thu, 18 Sep 2003 22:08:30 -0300 (09/19/03 11:08:30) >, <rml at rubis.trix.net> wrote: > >> >>Could anyone please explain to me how to use and for what is this >>function from win32lib: >> >> >>fecth_systemtime(atom SYSTEMTIME) >> >> >>In the win32lib documentation there's is nothing about it. > >So about the poor docs, I'll fix that. Anyhow, all this does is return the >data inside the supplied SYSTEMTIME structure pointer as a formatted >sequence of values. Namely ... > > { > Year, > Month, > DayOfWeek, > Day, > Hour, > Minute, > Second, > Milliseconds > } > >Now the real question is, how does the SYSTEMTIME structure get the right >values into it? Currently, these values are populated by the MonthCalendar >control type. In the next release there is also two new functions - >getSystemTime() which returns the current date/time in UTC and >getLocalTime() which returns it according to your timezone settings. > >If you can't wait for the next release, here are the two new functions... > > >Firstly though you will need to add these three lines just after the >win32lib include... > >constant > xGetSystemTime = registerw32Procedure(kernel32,"GetSystemTime", > {C_POINTER}), > xGetLocalTime = registerw32Procedure(kernel32,"GetLocalTime", > {C_POINTER}) > >------------------------ >-- > >cheers, >Derek Parnell > > > >TOPICA - Start your own email discussion group. FREE! > >