[Openroad-users] WindowsAPI call to GetLocalTime

Doug White black_belt101 at hotmail.com
Thu Apr 24 15:21:35 EST 2008


Hey all, haven't read through every single post, but this is how you get data out of a STRUCT api call.

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
{
    Li_Return = CALLPROC GetLocalTime 
                        ( BYREF(wYear),
                                 BYREF(wMonth),
                                 BYREF(wDayOfWeek),
                                 BYREF(wDay),
                                 BYREF(wHour),
                                 BYREF(wMinute),
                                 BYREF(wSecond),
                                 BYREF(wMilliseconds));
}

__ÐöUgWa__

Date: Wed, 23 Apr 2008 11:13:45 +0100
From: gareth.2.edwards at bt.com
To: openroad-users at peerlessit.com
Subject: Re: [Openroad-users] WindowsAPI call to GetLocalTime












 >Where an API 
specifies a STRUCT as a parameter, you should be able to declare a 
LongByteObject to pass to the API.   
 
I tried this with the following code and get a runtime 
error.
 
DECLARE
 LBO = 
LongByteObject;
BEGIN
 
    CALLPROC GetLocalTime 
(BYREF(LBO));
 
=====
 
E_EO001B Objects and arrays can not be passed BYREF to 
3GL procedures.
    Parameter number 1 to the 3GL procedure 
'GetLocalTime' is an object or
    array value. Objects and 
arrays can not be passed BYREF to 3GL
    procedures.  
You will have to remove the BYREF keyword from the
    
parameter list to this procedure.
 
=====


_________________________________________________________________
Search for local singles online @ Lavalife - Click here
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Flavalife9%2Eninemsn%2Ecom%2Eau%2Fclickthru%2Fclickthru%2Eact%3Fid%3Dninemsn%26context%3Dan99%26locale%3Den%5FAU%26a%3D30290&_t=764581033&_r=email_taglines_Search_OCT07&_m=EXT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20080424/3ac117c8/attachment.html 


More information about the Openroad-users mailing list