Page 1 of 2
FWH 9.09 and OLE methods problem
Posted: Fri Sep 25, 2009 11:29 am
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.
Re: FWH 9.09 and OLE methods problem
Posted: Sat Sep 26, 2009 6:55 am
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
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 9:56 am
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.
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 2:45 pm
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
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 5:32 pm
by Antonio Linares
Michel,
Do you also get the same message as Taavi ? thanks
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 5:35 pm
by Antonio Linares
Michel,
Could you provide an example to test the errors that you are having ? thanks
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 10:02 pm
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 :
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.
Re: FWH 9.09 and OLE methods problem
Posted: Mon Sep 28, 2009 10:54 pm
by Antonio Linares
Michel,
Are you using xHarbour commercial ?
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 9:03 am
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
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 11:18 am
by driessen
Antonio,
Yes, I use xHarbour commercial.
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 1:43 pm
by Antonio Linares
Michel, Taavi,
We send you by email a modified FiveHCM.lib, please test it, thanks
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 2:09 pm
by driessen
Antonio,
I tested the fivehcm.lib you send me, but unfortunately the errors do still occur. No change.
Thanks for your efforts.
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 2:38 pm
by Antonio Linares
Michel,
I sent you new LIBs again. There was a mistake in previous one, sorry
thanks!
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 2:48 pm
by Antonio Linares
Michel,
Please check FWH\samples\webexp.prg
Here it works fine.
Re: FWH 9.09 and OLE methods problem
Posted: Tue Sep 29, 2009 2:54 pm
by driessen
Antonio,
I'll try to test your suggestion tonight (have to go to a customer now).
Thanks.