FWH 9.09 and OLE methods problem

FWH 9.09 and OLE methods problem

Postby Taavi » 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: Select all  Expand view
#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.
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Re: FWH 9.09 and OLE methods problem

Postby Antonio Linares » Sat Sep 26, 2009 6:55 am

Taavi,

Please add this code to your PRG and test it again:
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 9.09 and OLE methods problem

Postby driessen » Mon Sep 28, 2009 9: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: FWH 9.09 and OLE methods problem

Postby Taavi » Mon Sep 28, 2009 2: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: Select all  Expand view
#pragma BEGINDUMP

#include <windows.h>

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

#pragma ENDDUMP
 
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Re: FWH 9.09 and OLE methods problem

Postby Antonio Linares » Mon Sep 28, 2009 5:32 pm

Michel,

Do you also get the same message as Taavi ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 9.09 and OLE methods problem

Postby Antonio Linares » Mon Sep 28, 2009 5:35 pm

Michel,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 9.09 and OLE methods problem

Postby driessen » 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: Select all  Expand view
JuWole1:Run("JUD_CHECK")


On this line, I got an error "No exported method:Open" :
Code: Select all  Expand view
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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: FWH 9.09 and OLE methods problem

Postby Antonio Linares » Mon Sep 28, 2009 10:54 pm

Michel,

Are you using xHarbour commercial ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 9.09 and OLE methods problem

Postby Taavi » Tue Sep 29, 2009 9: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
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Re: FWH 9.09 and OLE methods problem

Postby driessen » 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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: FWH 9.09 and OLE methods problem

Postby Antonio Linares » Tue Sep 29, 2009 1:43 pm

Michel, Taavi,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 9.09 and OLE methods problem

Postby driessen » Tue Sep 29, 2009 2: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: FWH 9.09 and OLE methods problem

Postby Antonio Linares » Tue Sep 29, 2009 2: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 9.09 and OLE methods problem

Postby Antonio Linares » Tue Sep 29, 2009 2:48 pm

Michel,

Please check FWH\samples\webexp.prg

Here it works fine.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 9.09 and OLE methods problem

Postby driessen » Tue Sep 29, 2009 2: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 81 guests