[Openroad-users] WindowsAPI call to GetLocalTime
Fabian Anderson
fabian.anderson at Fintechnix.com
Mon Apr 21 12:28:28 EST 2008
Hi Jade,
As API calls use positional parameters, it looks like it is
just a mix-up of parameter positions. If the API call accepts a
"struct" parameter, you may need to add another dummy variable in the
call to get the correct parameter position. Look closely as the
"struct" that is accepted by GetLocalTime. If you are using an API
other than the one that accepts a "struct", then please let us know the
library (DLL) you have used.
Regards,
Fabian.
________________________________
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of jade
clements
Sent: Monday, 21 April 2008 12:18 PM
To: OpenRoad Users Group
Subject: [Openroad-users] WindowsAPI call to GetLocalTime
Hello,
I'm using a Window's API call, GetLocalTime, to obtain the user's pc
time however I'm getting some weird results.
procedure zGetTime ( ) =
declare
wYear = INTEGER NOT NULL;
wMonth = INTEGER NOT NULL;
wDayOfWeek = INTEGER NOT NULL;
wDay = INTEGER NOT NULL;
wHour = INTEGER NOT NULL;
wMinute = INTEGER NOT NULL;
wSecond = INTEGER NOT NULL;
wMilliseconds = INTEGER NOT NULL;
enddeclare
{
CALLPROC GetLocalTime(
byref(wYear),
byref(wMonth),
byref(wDayOfWeek),
byref(wDay),
byref(wHour),
byref(wMinute),
byref(wSecond),
byref(wMilliseconds));
CurProcedure.TRACE(
'Year: ' + VARCHAR(wYear) +
' Mth: ' + VARCHAR(wMonth) +
' Day: ' + VARCHAR(wDay) +
' Hr: ' + VARCHAR(wHour) +
' Min: ' + VARCHAR(wMinute) +
' Sec: ' + VARCHAR(wSecond) +
' DOW: ' + VARCHAR(wDayOfWeek));
}
Result:
Year: 264152 Mth: 1376257 Day: 45023240 Hr: 0 Min: 0 Sec: 0 DOW: 917516
The Day value changes everytime the procedure is run.
The API guide mentions that the GetSystemTime function returns the
system time expressed in Coordinated Universal Time (UTC). I guess the
same goes for GetLocalTime however, the return values just aren't right.
Can anyone help?
Regards
Jade Clements
MyWorkplace Solutions Pty Limited
Level 5, 11 Queens Road
Melbourne Victoria 3004
Ph: 1300 733 731
Making Service our Priority
www.MyWorkplace.com.au
If you receive this email by mistake, please notify us and do not make
any use of the email. We do not waive any privilege, confidentiality or
copyright associated with it.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
Specialist providers of back and front office systems for the financial services industry.
Featuring: Fintechnix(r)
Disclaimer:
Notice: This message contains privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it.
Any views expressed in this message are those of the individual sender,except where the sender specifically states them to be the views of Fintechnix Pty Ltd.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20080421/9602b66a/attachment-0003.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1436 bytes
Desc: image001.jpg
Url : http://www.peerlessit.com/pipermail/openroad-users/attachments/20080421/9602b66a/attachment-0003.jpe
More information about the Openroad-users
mailing list