FWH 9.09 and OLE methods problem

Taavi
Posts: 77
Joined: Mon Nov 21, 2005 10:29 am

FWH 9.09 and OLE methods problem

Post by Taavi »

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

#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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 9.09 and OLE methods problem

Post by Antonio Linares »

Taavi,

Please add this code to your PRG and test it again:

Code: Select all

#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
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: FWH 9.09 and OLE methods problem

Post by driessen »

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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Taavi
Posts: 77
Joined: Mon Nov 21, 2005 10:29 am

Re: FWH 9.09 and OLE methods problem

Post by Taavi »

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

#pragma BEGINDUMP

#include <windows.h>

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

#pragma ENDDUMP
 
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 9.09 and OLE methods problem

Post by Antonio Linares »

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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 9.09 and OLE methods problem

Post by Antonio Linares »

Michel,

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

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: FWH 9.09 and OLE methods problem

Post by driessen »

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

JuWole1:Run("JUD_CHECK")
On this line, I got an error "No exported method:Open" :

Code: Select all

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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 9.09 and OLE methods problem

Post by Antonio Linares »

Michel,

Are you using xHarbour commercial ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Taavi
Posts: 77
Joined: Mon Nov 21, 2005 10:29 am

Re: FWH 9.09 and OLE methods problem

Post by Taavi »

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
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: FWH 9.09 and OLE methods problem

Post by driessen »

Antonio,

Yes, I use xHarbour commercial.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 9.09 and OLE methods problem

Post by Antonio Linares »

Michel, Taavi,

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

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: FWH 9.09 and OLE methods problem

Post by driessen »

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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 9.09 and OLE methods problem

Post by Antonio Linares »

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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 9.09 and OLE methods problem

Post by Antonio Linares »

Michel,

Please check FWH\samples\webexp.prg

Here it works fine.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: FWH 9.09 and OLE methods problem

Post by driessen »

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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Post Reply