To Antonio : OLE-problem

To Antonio : OLE-problem

Postby driessen » Tue Sep 30, 2008 8: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. 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

Postby James Bott » Tue Sep 30, 2008 8: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Tue Sep 30, 2008 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby driessen » Tue Sep 30, 2008 9: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. 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

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

Postby driessen » Wed Oct 01, 2008 3: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. 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

Postby Antonio Linares » Wed Oct 01, 2008 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests