FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To Antonio : OLE-problem
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
To Antonio : OLE-problem
Posted: Tue Sep 30, 2008 08:33 PM

Hello Antonio,

I started using FWH 8.09 today.

I noticed that I got an error :

" Unresolved external symbol 'HB_FUN_OLEUNITIALIZE' ".

I also got a GPF in these lines :

  • OleInvoke(hWordDocs,"Close")
  • OleInvoke(hWordDocs,"Open",cPath)

In FWH 8.04 all these functions worked fine.

What happened ?

Thanks a lot in advance.

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: 4840
Joined: Fri Nov 18, 2005 04:52 PM
To Antonio : OLE-problem
Posted: Tue Sep 30, 2008 08:47 PM

Michel,

I'm not sure if this is the problem, but did you also download and install the version of Harbour or xHarbour that came with FWH 8.09?

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
To Antonio : OLE-problem
Posted: Tue Sep 30, 2008 08:49 PM

Michel,

We have modified FWH to use the standard Class TOleAuto from Harbour/xHarbour and remove our own functions for it.

To create an OLE auto object call to CreateObject( "..." ) and then use the datas and methods directly:

Instead of: OleInvoke(hWordDocs,"Close"), OleInvoke(hWordDocs,"Open",cPath)

do:

oWordDocs:Close()
oWordDocs:Open( cPath )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
To Antonio : OLE-problem
Posted: Tue Sep 30, 2008 09:58 PM

James,

I used xHarbour Builder which was released today.

Antonio,

Jesus Christ, that means a whole lot of work for me. I use OLE very, very much in my application.

Where can I find a list of all the possibilities ?

For instance, how do I change :

OleInvoke(hWordOle,"Run","JUD_OPSL")

This functions runs a macro "JUD_OPSL" which has been defined in Word.

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
To Antonio : OLE-problem
Posted: Tue Sep 30, 2008 10:53 PM

Michel,

>
that means a whole lot of work for me. I use OLE very, very much in my application.
>

Yes, we know it and we apologize for it but it has no sense to keep an OLE engine in FWH when Harbour/xHarbour provide a very good one.

> Where can I find a list of all the possibilities ?

The Class TOleAuto uses the ON ERROR classes sentence to route all datas and methods as if they really belong to the object.

> For instance, how do I change :
> OleInvoke(hWordOle,"Run","JUD_OPSL")

hWordOle:Run( "JUD_OPSL" )

the conversion is quite simple. A source code editor macro can help you to modify your code. Do you use UEStudio ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
To Antonio : OLE-problem
Posted: Wed Oct 01, 2008 03:04 PM

Antonio,

I did the conversion today to ToleAuto().

Everything is working fine.

Is ToleAuto() working likewise for OLE and Outlook ?

Thanks a lot for your help.

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
To Antonio : OLE-problem
Posted: Wed Oct 01, 2008 05:40 PM

Michel,

> I did the conversion today to ToleAuto().
> Everything is working fine.

Excellent, congratulations! :-) Thanks for your understanding and work to do the change.

> Is ToleAuto() working likewise for OLE and Outlook ?

Yes, of course. Look for CreateObject() in these forums. There are many examples.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion