Re: [Harbour] error in hbwin ole with msvc

2009-05-06 Thread Francesco Saverio Giudice
Hi. Il 06/05/2009 18.13, Mindaugas Kavaliauskas ha scritto: Fixed. Thank you. Best regards, Francesco ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour

Re: [Harbour] error in hbwin ole with msvc

2009-05-06 Thread Mindaugas Kavaliauskas
Hi, Francesco Saverio Giudice wrote: Just a small error: ? :Birthday := CToD( "23/05/2006" ) Returns NIL, instead it should returns assigned date Think to ? dDate := :Birthday := CToD( "23/05/2006" ) in this case dDate is Nil. ? :Birthday // here it should return a date c

Re: [Harbour] error in hbwin ole with msvc

2009-04-24 Thread Francesco Saverio Giudice
Hi Mindaugas, Il 25/04/2009 1.21, Francesco Saverio Giudice ha scritto: No problem, Now I will try new updates. Perfect! Now it seems to works well also with WITH OBJECT version. Just a small error: ? :Birthday := CToD( "23/05/2006" ) Returns NIL, instead it should returns assigned date

Re: [Harbour] error in hbwin ole with msvc

2009-04-24 Thread Francesco Saverio Giudice
Hi, Il 25/04/2009 1.11, Mindaugas Kavaliauskas ha scritto: I have tested sample I sent previous time but I get: Error BASE/3012 Argument error: GETNAMESPACE Called from HB_OLEAUTO:GETNAMESPACE(0) Called from MAIN(37) Hi, I have the same error on my side. I've fixed it (it appeared after I'v

Re: [Harbour] error in hbwin ole with msvc

2009-04-24 Thread Mindaugas Kavaliauskas
I have tested sample I sent previous time but I get: Error BASE/3012 Argument error: GETNAMESPACE Called from HB_OLEAUTO:GETNAMESPACE(0) Called from MAIN(37) Hi, I have the same error on my side. I've fixed it (it appeared after I've implemented GC pointers). But the problem on my side is th

Re: [Harbour] error in hbwin ole with msvc

2009-04-24 Thread Francesco Saverio Giudice
Hi, Il 25/04/2009 0.07, Francesco Saverio Giudice ha scritto: Hi Mindaugas, Il 25/04/2009 0.04, Mindaugas Kavaliauskas ha scritto: Hi, Francesco, ... Do we have any FOR EACH sample code for OLE? attached an example, also with datetime fields. Can you look if FOR EACH and TIMESTAMP supp

Re: [Harbour] error in hbwin ole with msvc

2009-04-24 Thread Francesco Saverio Giudice
Hi Mindaugas, Il 25/04/2009 0.04, Mindaugas Kavaliauskas ha scritto: Hi, Francesco, ... Do we have any FOR EACH sample code for OLE? attached an example, also with datetime fields. Can you look if FOR EACH and TIMESTAMP support works for you? sure, I will check ASAP. Best Regards, Fr

Re: [Harbour] error in hbwin ole with msvc

2009-04-24 Thread Mindaugas Kavaliauskas
Hi, Francesco, ... Do we have any FOR EACH sample code for OLE? attached an example, also with datetime fields. Can you look if FOR EACH and TIMESTAMP support works for you? Regards, Mindaugas ___ Harbour mailing list Harbour@harbour-project.or

Re: [Harbour] error in hbwin ole with msvc

2009-04-11 Thread fmancera
Hello, I totally agree with Toninho. HWIN.lib should include an ActiveX class. Oscar Lira libero long time ago for a public use ActiveX class. GUI's as HWGUI, Mini, etc. .. are based on this class to support ActiveX. Plain C is built on and uses ATL of Microsoft Windows. Can download CActiv

Re: [Harbour] error in hbwin ole with msvc

2009-04-08 Thread Przemyslaw Czerpak
On Wed, 08 Apr 2009, Mindaugas Kavaliauskas wrote: Hi, >> 1. Empty date in hbwin TOLEAUTO is send as VT_NULL. Should we replicate it? > Well, it would be nice to hear OLE users opinion. Does OLE has EMPTY DATE, > etc.? Probably any date earlier then 1899-12-30 will create problems for applicati

Re: Re: [Harbour] error in hbwin ole with msvc

2009-04-08 Thread toni...@fwi
Hi Mindaugas. This is the part of FWH activeX class: ---cut--- METHOD Default() CLASS TActiveX local hSink, aEv, bOldError, oError ::hActiveX = CreateActiveX( ::cProgId, ::nStyle, ::nLeft, ::nTop, ::nWidth, ::nHeight, ::hWnd, 0 ) ::hObj = AtlAxGetDisp( ::hActiveX ) bOldError = Err

Re: [Harbour] error in hbwin ole with msvc

2009-04-08 Thread Viktor Szakáts
> > Viktor Szakáts wrote: > > > > I also opt for clean code. If compatibility is such concern we should > find > > some optional compatibility layer. Maybe cleaner OLE implementation > > will result in more robust app/3rd party lib code, too, which is always > > a good thing. > > > > But the questi

Re: [Harbour] error in hbwin ole with msvc

2009-04-08 Thread Pritpal Bedi
Me too. Viktor Szakáts wrote: > > I also opt for clean code. If compatibility is such concern we should find > some optional compatibility layer. Maybe cleaner OLE implementation > will result in more robust app/3rd party lib code, too, which is always > a good thing. > But the question is wh

Re: [Harbour] error in hbwin ole with msvc

2009-04-08 Thread Viktor Szakáts
I also opt for clean code. If compatibility is such concern we should find some optional compatibility layer. Maybe cleaner OLE implementation will result in more robust app/3rd party lib code, too, which is always a good thing. Brgds, Viktor On Wed, Apr 8, 2009 at 4:29 PM, Mindaugas Kavaliauskas

Re: [Harbour] error in hbwin ole with msvc

2009-04-08 Thread Mindaugas Kavaliauskas
Hello, Pritpul, The simplicity was the main goal, after I found original OLE is not working (it was xHarbour times) and I was unable to understand some implementation ideas. If you are looking at it, please make it syntactically compliant with hbwin/win_ole.c parameters, i.e., TOleAuto()

Re: [Harbour] error in hbwin ole with msvc

2009-04-08 Thread Pritpal Bedi
Mindaugus Mindaugas Kavaliauskas wrote: > > The simplicity was the main goal, after I found original OLE is not > working (it was xHarbour times) and I was unable to understand some > implementation ideas. > If you are looking at it, please make it syntactically compliant with hbwin/win_ol

Re: [Harbour] error in hbwin ole with msvc

2009-04-08 Thread Francesco Saverio Giudice
Hi Mindaugas, I've looked to hbwin OLE code. Each object uses ::pOleEnumerator to store enumerator. It is not very good solution, since we can have a few FOR EACH loops inside each other for the same object. I'll try to find a better way of implementation. Do we have any FOR EACH sample code f

Re: [Harbour] error in hbwin ole with msvc

2009-04-08 Thread Viktor Szakáts
Hi Mindaugas, > 3. Array support. Should we add it? >> > > It would be a feature. Does anybody have some sample code using OLE arrays? Yes, it's in contrib/hbole/tests/testole.prg, see Exm_OpenOffice(). Brdgs, Viktor ___ Harbour mailing list Harbour@

Re: [Harbour] error in hbwin ole with msvc

2009-04-08 Thread Mindaugas Kavaliauskas
Hi, Current code is very short and simple. At least I understand it so far ;-) The simplicity was the main goal, after I found original OLE is not working (it was xHarbour times) and I was unable to understand some implementation ideas. 1. Empty date in hbwin TOLEAUTO is send as VT_NULL.

Re: [Harbour] error in hbwin ole with msvc

2009-04-06 Thread Alex Strickland
Viktor Szakáts wrote: I don't know about hbwin's OLE implementation, I thought we're talking about new one. Sorry, I thought so as well. In the old, it's missing/wrong extern declaration (in non-hbwin code, because this function was never officially made public by us), which makes caller in

Re: [Harbour] error in hbwin ole with msvc

2009-04-06 Thread Viktor Szakáts
Hi Alex, I don't know about hbwin's OLE implementation, I thought we're talking about new one. In the old, it's missing/wrong extern declaration (in non-hbwin code, because this function was never officially made public by us), which makes caller incompatible with now default C++ mode in msvc. Anyh

Re: [Harbour] error in hbwin ole with msvc

2009-04-06 Thread Alex Strickland
Viktor Szakáts wrote: I've added it, with the difference that it will return void, as HRESULT doesn't seem to have any reasonable meaning in this context. Thank you, but ... I have (as I often do) got the problem wrong, I am not even using the new library. hb_oleVariantToItem is not visible i

Re: [Harbour] error in hbwin ole with msvc

2009-04-06 Thread Viktor Szakáts
I've added it, with the difference that it will return void, as HRESULT doesn't seem to have any reasonable meaning in this context. Brgds, Viktor On Mon, Apr 6, 2009 at 12:49 PM, Alex Strickland wrote: > toni...@fwi wrote: > > There are any problem to change: >> >> static void hb_oleVariantTo

Re: Re: [Harbour] error in hbwin ole with msvc

2009-04-06 Thread toni...@fwi
Hi Alex >Toninho, how did you resolve your problem? No, I´m using old winole that have support for numeric handle in new(hobj). To support FWH/HWGUI/MiniGui the new OLE need support it, but to have: ---cut--- METHOD New( uObj, cClass, cLicense ) CLASS TOleAuto ... ELSEIF ISNUMBER( uObj )

Re: [Harbour] error in hbwin ole with msvc

2009-04-06 Thread Alex Strickland
toni...@fwi wrote: There are any problem to change: static void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant ) to HRESULT hb_oleVariantToItem( PHB_ITEM pItem, VARIANT *pVariant ); I am using a HWGUI library to embed ActiveX controls. It calls hb_oleVariantToItem and since it is

Re: Re: [Harbour] error in hbwin ole with msvc

2009-03-28 Thread toni...@fwi
>It still uses old code. TOLEAUTO() does not exists in new code so if >you were able to link above peace of code then for sure it was using >old implementation. >If you want you can try to create wrapper functions from old to new >class: > function TOleAuto( ... ) > return hb_OleAuto( ... ) Th

Re: [Harbour] error in hbwin ole with msvc

2009-03-28 Thread Przemyslaw Czerpak
On Sat, 28 Mar 2009, toni...@fwi wrote: Hi, > >Il 26/03/2009 21.11, Przemyslaw Czerpak ha scritto: > >> 5. The hbwin TOLEAUTO class supports iteration by FOR EACH loop. > >Could you add FOR EACH and TIMESTAMP support ? > >I've code like attached that doesn't work with new ole version. > FWH TActi

Re: Re: [Harbour] error in hbwin ole with msvc

2009-03-28 Thread toni...@fwi
>Hi Przemek and Mindaugas, > > >Il 26/03/2009 21.11, Przemyslaw Czerpak ha scritto: >> > >> 5. The hbwin TOLEAUTO class supports iteration by FOR EACH loop. > >Could you add FOR EACH and TIMESTAMP support ? >I've code like attached that doesn't work with new ole version. Hi friends, FWH TActiveX

Re: [Harbour] error in hbwin ole with msvc

2009-03-27 Thread Francesco Saverio Giudice
Hi Przemek and Mindaugas, Il 26/03/2009 21.11, Przemyslaw Czerpak ha scritto: 5. The hbwin TOLEAUTO class supports iteration by FOR EACH loop. Could you add FOR EACH and TIMESTAMP support ? I've code like attached that doesn't work with new ole version. Best regards, Francesco OL_Addre

Re: Re: [Harbour] error in hbwin ole with msvc

2009-03-27 Thread toni...@fwi
>sorry Toninho, I've missed your mail with a problem. Przemek was right >about OLE object creation code. No problem Mindaugas. Thank you for the nice code. >Yes, I know I've implemented it in a incompatible way, but missing of >some OLE server depends on installed software and is a normal situat

Re: [Harbour] error in hbwin ole with msvc

2009-03-27 Thread Alex Strickland
Przemyslaw Czerpak wrote: Current code is very short and simple. At least I understand it so far ;-) Thank you very much. I just look at it and here are points I noticed: I have not looked at the new code. Is it possible to have strings with embedded null characters? It was not possible in t

Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread Mindaugas Kavaliauskas
procedure testolenew() local oWord, oText begin sequence oWord = GetActiveObject( "Word.Application" ) recover begin sequence oWord = CreateObject( "Word.Application" ) recover alert( "ERROR! Word not avialable." ) oWord = GetActiveObject( "Word.A

Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread Przemyslaw Czerpak
On Wed, 25 Mar 2009, Mindaugas Kavaliauskas wrote: Hi, > one of missing features is parameters passed by reference. Iterators is not > implemented also, but I do not know if it is implemented in current win_ole > code. Current code is very short and simple. At least I understand it so far ;-)

Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread Francesco Saverio Giudice
Hi Toninho, Il 26/03/2009 17.12, toni...@fwi ha scritto: Hi Francesco. do you use MSVC ? If yes, do you have tested same code after removing -TP flag in config/msvc.cf and rebuild entire SVN ? No, I´m using BCC 6.10. New OLE seems work fine, except that GetActiveObject() is not working, as

Re: Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread toni...@fwi
>New implementation does not generate RT error but simply returns NIL. >It's not longer necessary to use BEGIN SEQUENCE / END (BTW WITH {|e|break} >is missing) or TRY/CATCH. Thank you Przemek. Best regards, Toninho. ___ Yahoo! Mail - Sempre

Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread Przemyslaw Czerpak
On Thu, 26 Mar 2009, toni...@fwi wrote: Hi, > But with a more extensive test here I found that this code doesn´t > work: > procedure testolenew() >local oWord, oText >begin sequence > oWord = GetActiveObject( "Word.Application" ) >recover > begin sequence > oWord

Re: Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread toni...@fwi
Hi Francesco. >do you use MSVC ? If yes, do you have tested same code after removing >-TP flag in config/msvc.cf and rebuild entire SVN ? No, I´m using BCC 6.10. New OLE seems work fine, except that GetActiveObject() is not working, as I posted in my last sample. Best regards, Toninho. _

Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread Francesco Saverio Giudice
Hi Toninho, Il 26/03/2009 13.41, toni...@fwi ha scritto: But with a more extensive test here I found that this code doesn´t work: ---cut--- procedure testolenew() local oWord, oText begin sequence oWord = GetActiveObject( "Word.Application" ) recover begin sequence

Re: Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread toni...@fwi
Hi VIktor, >Toninho, please provide a patch because I have no idea what >HRESULT should be. An hbwinole.h is also needed if we >want to publish C level functions. I'd appreciate if you could >provide such patch and I will upload it. I looked at my code and I think that HRESULT is not needed. A si

Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread Mindaugas Kavaliauskas
Hi, ../../olecore.c(116) : error C2440: '=': impossibile convertire da 'void *' a 'char *' La conversione da 'void*' a puntatori a valori non 'void' richiede un cast esplicito Fixed. ../../olecore.c(134) : error C2039: 'n1': non Š un membro di 'tagVARIANT' c:\program files\m

Re: [Harbour] Re: Harbour] error in hbwin ole with msvc

2009-03-26 Thread Francesco Saverio Giudice
Hi Chen, no the problem is related to hbole itself, as I have tested without and with -TP and error is the same (I'm missing to wrote it in my mail) best regards, Francesco Il 26/03/2009 10.17, Chen Kedem ha scritto: I confirm problem with msvc I think its the same problem already reported

Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread Viktor Szakáts
Hi Francesco, Toninho, Thanks for the feeback. I'm completely lost how to fix this (except one obvious case) properly for C++ (bcc or msvc), so I'd like kindly to ask OLE users to look into it. Apparently, the method used in old code and hbwin will make it compile in C++ mode, but it won't run. To

[Harbour] Re: Harbour] error in hbwin ole with msvc

2009-03-26 Thread Chen Kedem
> I confirm problem with msvc I think its the same problem already reported with C++ mode (the -TP switch) and some of the contribs Chen. ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour

Re: [Harbour] error in hbwin ole with msvc

2009-03-26 Thread Massimo Belgrano
I confirm problem with msvc Il 25 marzo 2009 23.17, Francesco Saverio Giudice ha scritto: > > Hi Viktor, Mindaugas, > > Il 25/03/2009 20.00, Francesco Saverio Giudice ha scritto: >> >> Please wait until I (and probably other: Pritpal ?) will check if there >> are problems with new and if we need

Re: [Harbour] error in hbwin ole with msvc

2009-03-25 Thread Francesco Saverio Giudice
Hi Viktor, Mindaugas, Il 25/03/2009 20.00, Francesco Saverio Giudice ha scritto: Please wait until I (and probably other: Pritpal ?) will check if there are problems with new and if we need some other parts before delete ole version in hbwin. building current SVN I got below error, am I mis

Re: [Harbour] error in hbwin ole with msvc

2009-03-25 Thread Francesco Saverio Giudice
Hi Viktor, Il 25/03/2009 14.48, Viktor Szakáts ha scritto: If there won't be any objections, I'll move hbole code to hbwin to replace current implementation and delete separate hbole lib from repository. Please wait until I (and probably other: Pritpal ?) will check if there are problems wi

Re: Re: [Harbour] error in hbwin ole with msvc

2009-03-25 Thread toni...@fwi
>I'd like to ask OLE users to the hbole, and give opinions about the above. Hi, There are any problem to change: static void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant ) to HRESULT hb_oleVariantToItem( PHB_ITEM pItem, VARIANT *pVariant ); Thanks and best regards, Toninho. ___

Re: [Harbour] error in hbwin ole with msvc

2009-03-25 Thread Viktor Szakáts
Thanks for the info. IMO we can do without parameters passed by reference (iterators aren't implemented in hbwin AFAIK) and this reduction in functionality is well worth an otherwise stable and clean code. I'd like to ask OLE users to the hbole, and give opinions about the above. If there won't b

Re: [Harbour] error in hbwin ole with msvc

2009-03-25 Thread Mindaugas Kavaliauskas
Can you tell what are the missing features? This can help us decide if we can swap your code with the one in hbwin. I'd certainly be happy to do so. If the missing bits are not that important for OLE users, it may be enough to do the swap and document the differences for now. Hi, one of mis

Re: [Harbour] error in hbwin ole with msvc

2009-03-25 Thread Viktor Szakáts
Many thanks Mindaugas, very nice addition. Can you tell what are the missing features? This can help us decide if we can swap your code with the one in hbwin. I'd certainly be happy to do so. If the missing bits are not that important for OLE users, it may be enough to do the swap and document the

Re: [Harbour] error in hbwin ole with msvc

2009-03-25 Thread Mindaugas Kavaliauskas
Whole OLE code is very flakey, I hope Mindaugas can send us something before we release. Hi Viktor, I've committed "my" OLE code. It is more clean, but not so many features implemented. I'm not sure it is that Harbour needs. Best regards, Mindaugas _

Re: [Harbour] error in hbwin ole with msvc

2009-03-24 Thread Francesco Saverio Giudice
Hi Przemek, Il 23/03/2009 23.55, Przemyslaw Czerpak ha scritto: No. It was not even my intetion to make any fixes. I just simply corrected casting to pacify MinGW build warnings. Nothing more. This whole code is waiting for someone who will rewrite it from scratch. There are many things inside

Re: [Harbour] error in hbwin ole with msvc

2009-03-23 Thread Przemyslaw Czerpak
On Mon, 23 Mar 2009, Francesco Saverio Giudice wrote: Hi, > tested also after > 2009-03-23 21:42 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) > * harbour/contrib/hbodbc/odbc.c > * harbour/contrib/hbtpathy/tpwin.c > * harbour/contrib/hbwin/win_ole.c > * harbour/contrib/hbwin/win_re

Re: [Harbour] error in hbwin ole with msvc

2009-03-23 Thread Francesco Saverio Giudice
Hi Viktor, Przemek, tested also after 2009-03-23 21:42 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbodbc/odbc.c * harbour/contrib/hbtpathy/tpwin.c * harbour/contrib/hbwin/win_ole.c * harbour/contrib/hbwin/win_regc.c ! casting but the -TP problem is still t

Re: [Harbour] error in hbwin ole with msvc

2009-03-23 Thread Francesco Saverio Giudice
Hi Viktor, Il 23/03/2009 17.05, Viktor Szakáts ha scritto: PS: I will test also you patch ASAP to see if it also solves the problem. I have tested your patch. Results (full SVN rebuilt with MSVC 2008 express) : 1) without -TP flag in msvc.cf contrib/hbwin/tests/testole.prg selectin

Re: [Harbour] error in hbwin ole with msvc

2009-03-23 Thread Viktor Szakáts
Hi Francesco, found the problem: is -TP flag used in config/win/msvc.cf at line 15. > > I have removed it changing from > CPPFLAGS = -nologo -W4 -wd4127 -Gs -I. -I$(HB_INC_COMPILE) -TP > to > CPPFLAGS = -nologo -W4 -wd4127 -Gs -I. -I$(HB_INC_COMPILE) > > and now ole works again with msvc. > Now I'

Re: [Harbour] error in hbwin ole with msvc

2009-03-23 Thread Francesco Saverio Giudice
Hi Viktor, found the problem: is -TP flag used in config/win/msvc.cf at line 15. I have removed it changing from CPPFLAGS = -nologo -W4 -wd4127 -Gs -I. -I$(HB_INC_COMPILE) -TP to CPPFLAGS = -nologo -W4 -wd4127 -Gs -I. -I$(HB_INC_COMPILE) and now ole works again with msvc. Now I'm testing other p

Re: [Harbour] error in hbwin ole with msvc

2009-03-23 Thread Viktor Szakáts
Thank you very much. I've attached a small patch to convert some parameters to ptr type, but it probably won't solve the problem by itself. Whole OLE code is very flakey, I hope Mindaugas can send us something before we release. BTW, new xhb whatsnew advertised that they had an OLE update which e

Re: [Harbour] error in hbwin ole with msvc

2009-03-23 Thread Francesco Saverio Giudice
Hi Viktor, Il 23/03/2009 10.36, Viktor Szakáts ha scritto: Hi Francesco, could easily be my MinGW64 changes broke it. I will check. Best regards, Francesco ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman

Re: [Harbour] error in hbwin ole with msvc

2009-03-23 Thread Viktor Szakáts
Hi Francesco, could easily be my MinGW64 changes broke it. Brgds, Viktor On Sun, Mar 22, 2009 at 10:26 PM, Francesco Saverio Giudice < i...@fsgiudice.com> wrote: > Hi, > > I have problems with ole using msvc that always returns error creating a > new ole object: > "Error: xx not available. [U

[Harbour] error in hbwin ole with msvc

2009-03-22 Thread Francesco Saverio Giudice
Hi, I have problems with ole using msvc that always returns error creating a new ole object: "Error: xx not available. [Unknown error]" where xx is ole name, i.e. InternetExplorer.Application but it was working surely until: 2009-03-11 17:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.