Alaska Software Inc. - OLE 2 DATE ?
Username: Password:
AuthorTopic: OLE 2 DATE ?
JorgeOLE 2 DATE ?
on Fri, 11 Jul 2008 20:31:35 -0300
Hello to all
i have an OCX that have this function ( as is it declared into IDL )
this function it must return the date and time of a special printer

        HRESULT FechaHoraFiscal([out, retval] DATE* pVal);
        [id(0x00000037), propput, helpstring("Fecha y hora del controlador 
fiscal")]
        HRESULT FechaHoraFiscal([in] DATE pVal);

into xbase return a value type DATE in format AAAAMMDD, but no return de 
date and time

the manufacturer say that return date in ole format !

are any way to transform the "ole date" to date and time in xbase ?
or it is true that the "ole date" have included the time information ?

reagards
Hannes ZieglerRe: OLE 2 DATE ?
on Sun, 13 Jul 2008 04:02:18 +0200
Jorge,

>        HRESULT FechaHoraFiscal([out, retval] DATE* pVal);

COM date values carry date and time information. Exchanging Date/Time values 
between your Xbase++ application and an external process is not possible in 
native Xbase++, because Xbase++ does not support a DateTime data type.

The COM DATE data type is represented by eight bytes. You might want to try 
the demo version of "The Yukon Project" for encoding/decoding COM Date/Time 
values and exchangng them with external processes.

Regards,
--
Hannes

http://www.knowleXbase.com




"Jorge" <jlborlando@way.com.ar> schrieb im Newsbeitrag 
news:39f2c900$7e219ccb$4a6c@news.alaska-software.com...
> Hello to all
> i have an OCX that have this function ( as is it declared into IDL )
> this function it must return the date and time of a special printer
>
>        HRESULT FechaHoraFiscal([out, retval] DATE* pVal);
>        [id(0x00000037), propput, helpstring("Fecha y hora del controlador 
> fiscal")]
>        HRESULT FechaHoraFiscal([in] DATE pVal);
>
> into xbase return a value type DATE in format AAAAMMDD, but no return de 
> date and time
>
> the manufacturer say that return date in ole format !
>
> are any way to transform the "ole date" to date and time in xbase ?
> or it is true that the "ole date" have included the time information ?
>
> reagards
>
JorgeRe: OLE 2 DATE ?
on Sun, 13 Jul 2008 18:14:49 -0300
Hi Hannes

> the demo version of "The Yukon Project" for encoding/decoding COM 
> Date/Time

what is this ?, can you tell more about this ?

i don't know how work the activex system
can you helpme or sayme of about to resolve this problem ?

thanks


> values and exchangng them with external processes.
>
> Regards,
> --
> Hannes
>
> http://www.knowleXbase.com
>
>
>
>
> "Jorge" <jlborlando@way.com.ar> schrieb im Newsbeitrag 
> news:39f2c900$7e219ccb$4a6c@news.alaska-software.com...
>> Hello to all
>> i have an OCX that have this function ( as is it declared into IDL )
>> this function it must return the date and time of a special printer
>>
>>        HRESULT FechaHoraFiscal([out, retval] DATE* pVal);
>>        [id(0x00000037), propput, helpstring("Fecha y hora del controlador 
>> fiscal")]
>>        HRESULT FechaHoraFiscal([in] DATE pVal);
>>
>> into xbase return a value type DATE in format AAAAMMDD, but no return de 
>> date and time
>>
>> the manufacturer say that return date in ole format !
>>
>> are any way to transform the "ole date" to date and time in xbase ?
>> or it is true that the "ole date" have included the time information ?
>>
>> reagards
>>
>
>
Hannes ZieglerRe: OLE 2 DATE ?
on Mon, 14 Jul 2008 01:53:55 +0200
Jorge,

>> the demo version of "The Yukon Project" for encoding/decoding COM 
>> Date/Time
>
> what is this ?, can you tell more about this ?

Please read more about "The Yukon Project" following this link:

http://www.knowlexbase.com/en/software/yukon/index.html

> i don't know how work the activex system
> can you helpme or sayme of about to resolve this problem ?

>>>        HRESULT FechaHoraFiscal([out, retval] DATE* pVal);

This is a pointer to a COM DATE value. You can read its value via MemRead() 
as an eight byte character string into your Xbase++ application and convert 
this string using Yukon's Bin2Date() function documented at the end of this 
message.

HTH,
--
Hannes

Bin2Date()
Converts a binary character string to a Date value.

Syntax
Bin2Date( <cBinaryString>,  [@<nSeconds>|<oDateTime>] ) --> dDate | 
oDateTime
Arguments
  <cBinaryString>
  The parameter is a binary character string of 8 bytes length. It is 
returned from function Date2Bin().
  <nSeconds>
  If passed by reference, the second parameter gets assigned the number of 
seconds stored in the binary string.
  <oDateTime>
  Alternatively, a DateTime() object can be passed. It is filled in with 
Date, Seconds and Milliseconds of the binary data.
Return
Depending on the passed parameters, the function returns a Date value or 
fills a DateTime() object with data of the binary string.

Description
The function extracts the binary string created from function Date2Bin() and 
converts it to a Date value.
Günter Beyes Re: OLE 2 DATE ?
on Sun, 20 Jul 2008 21:43:53 +0200
Hi Jorge,

on the automation object which exposes method :FechaHoraFiscal(), try

oObj:treatDateAsString( .T. )

before calling

cDateTime := oObj:FechaHoraFiscal or perhaps

cDateTime := oObj:FechaHoraFiscal()

The first 8 bytes of the returned string should contain an ANSI format
date, yyyymmdd.

The last six bytes should contain the time in hhmmss format.

Regards,
Günter
Andreas Gehrs-Pahl
Re: OLE 2 DATE ?
on Sun, 20 Jul 2008 16:58:43 -0400
Günter,

>oObj:treatDateAsString(.T.)

Wouldn't it be nice if that were documented somewhere?

-- Andreas

---                                                                      ---
  Andreas Gehrs-Pahl              E-Mail: GPahl@CharterMI.net
  415 Gute Street                     or: Andreas@DDPSoftware.com
  Owosso, MI 48867-4410               or: Andreas@Aerospace-History.net
  Tel: (989) 723-9927           Web Site: http://www.Aerospace-History.net
---                                                                      ---
Günter Beyes Re: OLE 2 DATE ?
on Sun, 20 Jul 2008 23:25:57 +0200
Am Sun, 20 Jul 2008 16:58:43 -0400 schrieb Andreas Gehrs-Pahl:
 
>>oObj:treatDateAsString(.T.)
> 
> Wouldn't it be nice if that were documented somewhere?

Hello Andreas,

I agree. It's been an age since that was first mentioned in one of these
news groups.

Regards,
Günter
JorgeRe: OLE 2 DATE ?
on Sun, 20 Jul 2008 21:42:17 -0300
Many thanks Gunter !

"Gnter Beyes" <"gbeyes at gmx.de"> escribi en el mensaje 
news:o7x00fr3zbq6$.1jnfgo7vhxyyj.dlg@40tude.net...
> Am Sun, 20 Jul 2008 16:58:43 -0400 schrieb Andreas Gehrs-Pahl:
>
>>>oObj:treatDateAsString(.T.)
>>
>> Wouldn't it be nice if that were documented somewhere?
>
> Hello Andreas,
>
> I agree. It's been an age since that was first mentioned in one of these
> news groups.
>
> Regards,
> Gnter
>
Hannes ZieglerRe: OLE 2 DATE ?
on Mon, 21 Jul 2008 03:10:41 +0200
Hi Günter,

>>>oObj:treatDateAsString(.T.)
>>
>> Wouldn't it be nice if that were documented somewhere?
>
> Hello Andreas,
>
> I agree. It's been an age since that was first mentioned in one of these
> news groups.
>
> Regards,
> Günter

IMO this is a clear indication that Alaska's documentation and 
implementation of COM/ActiveX is a real mess.

If you have ever tried to receive events fired by an ActiveXObject, you 
could have noticed that parameters are received in reverse order (c,b,a 
instead of a,b,c). Reference parameters are not sent back from Xbase++ to 
COM.

The fact that noone has claimed these implementation errors so far, tells 
much about the poor implementation of Alaska's COM model and its more than 
poor documentation.

Regards,
--
Hannes
AUGE_OHRRe: OLE 2 DATE ?
on Tue, 16 Sep 2008 22:16:10 +0200
hi,

> If you have ever tried to receive events fired by an ActiveXObject, you 
> could have noticed that parameters are received in reverse order (c,b,a 
> instead of a,b,c).

are you shure ? can you give us a Sample ?

can it be a Diffence using *.OCX or direct call ComCtl32.DLL ?
( e.g. Sample Monthview Event "GetBOLDday" ? )

greetings by OHR
Jimmy
Hannes ZieglerRe: OLE 2 DATE ?
on Thu, 18 Sep 2008 03:17:24 +0200
Hi Jimmy,

>> If you have ever tried to receive events fired by an ActiveXObject, you 
>> could have noticed that parameters are received in reverse order (c,b,a 
>> instead of a,b,c).
>
> are you shure ? can you give us a Sample ?

Please see attached file...

> can it be a Diffence using *.OCX or direct call ComCtl32.DLL ?
> ( e.g. Sample Monthview Event "GetBOLDday" ? )

No.

The attached file uses callback code blocks, not :subscribeEvent(). ActiveX 
callback code blocks are totally wrong implemented by Alaska. They receive 
parameters in reverse order (BTW, the attached program crashes for this very 
reason), and do not pass reference parameters back to ActiveX.

Regards,
--
Hannes


feed.prg
JorgeRe: OLE 2 DATE ?
on Mon, 21 Jul 2008 08:22:16 -0300
Hello Gunter, abusing your amiability, there is some form that you indicate 
me like to use the mthodo:: ncabezado() in the theory it is loaded by the 
following parameters: (nLine, cString), but it does not work, giveme error 
when indicate it cString parameter


regards
Günter Beyes Re: OLE 2 DATE ?
on Mon, 21 Jul 2008 20:58:13 +0200
Am Mon, 21 Jul 2008 08:22:16 -0300 schrieb Jorge:

> Hello Gunter, abusing your amiability, there is some form that you indicate 
> me like to use the méthodo:: ncabezado() in the theory it is loaded by the 
> following parameters: (nLine, cString), but it does not work, giveme error 
> when indicate it cString parameter
> 
> 
> regards

Hi Jorge,

have you got that method's IDL declaration and perhaps even a brief
description of its purpose? Otherwise it's hard to guess what that method
is supposed to do.

Regards,
Günter
JorgeRe: OLE 2 DATE ?
on Mon, 21 Jul 2008 17:11:28 -0300
here it is



"Gnter Beyes" <"gbeyes at gmx.de"> escribi en el mensaje 
news:3aww5r02on89$.860cpc4m1mii.dlg@40tude.net...
> Am Mon, 21 Jul 2008 08:22:16 -0300 schrieb Jorge:
>
>> Hello Gunter, abusing your amiability, there is some form that you 
>> indicate
>> me like to use the mthodo:: ncabezado() in the theory it is loaded by 
>> the
>> following parameters: (nLine, cString), but it does not work, giveme 
>> error
>> when indicate it cString parameter
>>
>>
>> regards
>
> Hi Jorge,
>
> have you got that method's IDL declaration and perhaps even a brief
> description of its purpose? Otherwise it's hard to guess what that method
> is supposed to do.
>
> Regards,
> Gnter
> 




FISCAL01.IDL
Günter Beyes Re: OLE 2 DATE ?
on Thu, 24 Jul 2008 22:18:11 +0200
Hi Jorge,

> propget, helpstring("Setea/Obtiene las líneas de encabezado/pie del impresor")]
> HRESULT Encabezado( long Linea, 
>                    [out, retval] BSTR* pVal);

you might try

cString := obj:Encabezado( nLinea )

to get one line of letterhead. 

Just a shot in the dark...

Regards, Günter
JorgeRe: OLE 2 DATE ?
on Fri, 25 Jul 2008 11:37:13 -0300
Hello Gunter

this ocx are design to VB, and to can wotk fine, i must to be use the method 
of the class AutomationObject()
:setProperty() and :callMethod()

thank you very much !

"Gnter Beyes" <"gbeyes at gmx.de"> escribi en el mensaje 
news:1e8m6oxybtdqa.2ah7y8b4bvov.dlg@40tude.net...
> Hi Jorge,
>
>> propget, helpstring("Setea/Obtiene las lneas de encabezado/pie del 
>> impresor")]
>> HRESULT Encabezado( long Linea,
>>                    [out, retval] BSTR* pVal);
>
> you might try
>
> cString := obj:Encabezado( nLinea )
>
> to get one line of letterhead.
>
> Just a shot in the dark...
>
> Regards, Gnter
>
JorgeRe: OLE 2 DATE ?
on Sun, 20 Jul 2008 21:23:47 -0300
EXPECTACULAR !!!!!!


work very good  !

i made a program in C to read the method, convert to date and time to string 
and return to xbase



"Andreas Gehrs-Pahl" <Andreas@DDPSoftware.com> escribi en el mensaje 
news:1clpxvsxj5i01.9p14zd5lj05g$.dlg@40tude.net...
> Gnter,
>
>>oObj:treatDateAsString(.T.)
>
> Wouldn't it be nice if that were documented somewhere?
>
> -- Andreas
>
> ---                                                                      ---
>  Andreas Gehrs-Pahl              E-Mail: GPahl@CharterMI.net
>  415 Gute Street                     or: Andreas@DDPSoftware.com
>  Owosso, MI 48867-4410               or: Andreas@Aerospace-History.net
>  Tel: (989) 723-9927           Web Site: http://www.Aerospace-History.net
> ---                                                                      ---
>
AUGE_OHRRe: OLE 2 DATE ?
on Tue, 16 Sep 2008 22:10:33 +0200
hi,

> oObj:treatDateAsString( .T. )

as the Name say you will get a "String"

if you realy need a OLE_DATE you must use
*** snip ***
OleDate := VTType():new( "YYYYMMDDHHMMSS", VT_DATE)
*** eof ***

else you can not use it as ValType() "Date" like
*** snip ***
OleDate := OleDate +10
*** eof ***

!!! Note : some activeX "seems" to work if they get a "DateString",
                but later when need a ValType() "Date" it will fail !!!
(see Sample Common Control v5.x/v6.x DatePicker/Monthview )

greetings by OHR
Jimmy
Jorge LRe: OLE 2 DATE ?
on Tue, 16 Sep 2008 21:16:02 -0300
Hi Jimmy

i use a wrapper provide for a manufacturer of a special printer
the ocx work with a dll and give the date and time in ole format

xbase not read this format but i had other problem with this ocx, i didn't 
work it


regards






"AUGE_OHR" <AUGE_OHR*AT*WEB.DE> escribi en el mensaje 
news:342a857d$b4eb20$6e8@news.alaska-software.com...
> hi,
>
>> oObj:treatDateAsString( .T. )
>
> as the Name say you will get a "String"
>
> if you realy need a OLE_DATE you must use
> *** snip ***
> OleDate := VTType():new( "YYYYMMDDHHMMSS", VT_DATE)
> *** eof ***
>
> else you can not use it as ValType() "Date" like
> *** snip ***
> OleDate := OleDate +10
> *** eof ***
>
> !!! Note : some activeX "seems" to work if they get a "DateString",
>                but later when need a ValType() "Date" it will fail !!!
> (see Sample Common Control v5.x/v6.x DatePicker/Monthview )
>
> greetings by OHR
> Jimmy
>
>
>
>