FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH 9.09 and OLE methods problem
Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
FWH 9.09 and OLE methods problem
Posted: Fri Sep 25, 2009 11:29 AM
Hi, in our tests with FWH 9.09 and xHarbour builder (April release and latest beta) linking in
xhb.obj,oledlg.lib and version.lib seems to break somethiong in OLE object (tested with MSWord and MS EXCEL):
Object methods have numeric type instead of object and accessing them results on runtime error.

So code

Code (fw): Select all Collapse
#INCLUDE "Fivewin.ch"
#translate Alert( <msg> [, <opt,...>] )  => MessageBox( 0, <msg>, "xHarbour OleDemo", 0 )
#define CRLF Chr( 13 ) + Chr( 10 )

PROCEDURE MAIN()

   LOCAL oExcel, oAS

   TRY
      oExcel := GetActiveObject( "Excel.Application" )
   CATCH
      TRY
         oExcel := CreateObject( "Excel.Application" )
      CATCH
         Alert( "ERROR! Excel not avialable. [" + Ole2TxtError()+ "]" )
         RETURN
      END
   END

   oExcel:WorkBooks:Add()

return




Breaks with runtime error:

Error description: Error BASE/1004 Class: 'NUMERIC' has no exported method: ADD
Args:
[ 1] = N 1583492

Stack Calls
===========
Called from: => ADD(0)
Called from: Test_OLE.prg => MAIN(25)

Should we still link in xhb.obj,oledlg.lib and version.lib with FWH 9.09 ?


Taavi.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 9.09 and OLE methods problem
Posted: Sat Sep 26, 2009 06:55 AM
Taavi,

Please add this code to your PRG and test it again:
Code (fw): Select all Collapse
#pragma BEGINDUMP

#include <windows.h>

void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT * pVariant )
{
   MessageBox( 0, "Inside hb_oleVariantToItem()", "ok", 0  );
}

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 09:56 AM

Antonio,

I experienced also problems with OLE and FWH 9.09 which weren't occuring in FWH 9.08.

I also tried to add the source you send in this topic to my PRG, but I even got more errors.

I can't define exactly what is going wrong, but I always get errors like "no exported method", on OPEN, RUN, ADD, ...

Any idea ?

Meanwhile, I go back to FWH 9.08.

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 02:45 PM
Hi,
now i get this message (Inside hb_oleVariantToItem()) before program error.

Taavi




Antonio Linares wrote:Taavi,

Please add this code to your PRG and test it again:
Code (fw): Select all Collapse
#pragma BEGINDUMP

#include <windows.h>

void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT * pVariant )
{
   MessageBox( 0, "Inside hb_oleVariantToItem()", "ok", 0  );
}

#pragma ENDDUMP
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 05:32 PM

Michel,

Do you also get the same message as Taavi ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 05:35 PM

Michel,

Could you provide an example to test the errors that you are having ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 10:02 PM
Antonio,

I indeed get the same error as Taavi does.

And about an example : it's not that simple.

I got an error almost on every line OLE is used. Here are some of these lines :

On this line I can hear a strange beep, which wasn't heard before :
Code (fw): Select all Collapse
JuWole1:Run("JUD_CHECK")


On this line, I got an error "No exported method:Open" :
Code (fw): Select all Collapse
JuDoc1 := JuWole1:Documents:Open(ALLTRIM(&("US->UTMPPATH"+CheckTermServ()))+"BRIE"+IF(VAL(pUSER)>=100,"","F")+pUSER+".RTF")


In FWH 9.08 all these lines are just running fine. So, at the moment, I am obliged to use FWH 9.08 again.

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 10:54 PM

Michel,

Are you using xHarbour commercial ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 09:03 AM
Hi,
just sent my testfiles to Your e-mail

Taavi.


Antonio Linares wrote:Michel,

Could you provide an example to test the errors that you are having ? thanks
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 11:18 AM

Antonio,

Yes, I use xHarbour commercial.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 01:43 PM

Michel, Taavi,

We send you by email a modified FiveHCM.lib, please test it, thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 02:09 PM

Antonio,

I tested the fivehcm.lib you send me, but unfortunately the errors do still occur. No change.

Thanks for your efforts.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 02:38 PM

Michel,

I sent you new LIBs again. There was a mistake in previous one, sorry

thanks! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 02:48 PM

Michel,

Please check FWH\samples\webexp.prg

Here it works fine.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 02:54 PM

Antonio,

I'll try to test your suggestion tonight (have to go to a customer now).

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773