Gale FORd wrote:I just upgraded to FWH 2.7 and March 2006 xHarbour Builder.
Most everything works ok except for a couple of things.
I have narrowed it down to the sample below that creates the windows exception error.
If you remove the section with GetActiveObject() function there is no exception error.
#INCLUDE "FIVEWIN.CH"
function main
local oExcel
TRY
oExcel := GetActiveObject( "Excel.Application" )
CATCH
TRY
oExcel := CreateObject( "Excel.Application" )
CATCH
Alert( "ERROR! Excel not avialable. [" + Ole2TxtError()+ "]" )
RETU(.f.)
END
END
oExcel:WorkBooks:Add()
oExcel:Visible := .t.
return nil
Gale FORd wrote:CreateObject() works ok.
GetActiveObject() does not work ok with FWH?
If I compile without #include "fivewin.ch" it works ok.
Is there a reason not to use it?
Randal Ferguson wrote:Gale,
I have the same problem. I think there is some problem or conflict between xBuilder and FWH activex/ole features. Are you using xcc?
If you include fivewin.ch try removing the call to Ole2TxtError() in the Alert function and see if that works. Be interested to know your results.
Thanks,
Randal Ferguson
Randal Ferguson wrote:Gale,
Can you get the webexp.prg sample in \fwh\samples to work using xBuilder?
Antonio posted a link here recently for a new activex.lib we should link instead of the one that comes with xHarbour. I cannot get it to work which makes me think there is some incompatibilities using FWH ActiveX with xBuilder. If I build the webexp sample using harbour or xharbour with bcc it works fine.
Using xBuilder/xcc with the activex lib Antonio posted I get:
Application
===========
Path and name: D:\xHB\bin\webexp.exe (32 bits)
Size: 1,504,768 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 05/11/06, 09:42:34
Error description: Error BASE/1004 Class: 'NUMERIC' has no exported method: HWND
Args:
Stack Calls
===========
Called from: => HWND(0)
Called from: TActiveX.prg => TACTIVEX:NEW(0)
Called from: TActiveX.prg => CREATEACTIVEX(184)
Called from: TActiveX.prg => TACTIVEX:NEW(0)
Called from: webexp.prg => MAIN(11)
Thanks,
Randal Ferguson
Antonio Linares wrote:Gale,
Please use this ActiveX.lib:
http://fivetechsoft.com/forums/viewtopic.php?t=3003
instead of the one provided with xHB.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 76 guests