Discussion:
A problem in TOleAuto?
Enrico Maria Giordano
2009-06-15 11:15:32 UTC
Permalink
The following sample

function Main()

local o := TOleAuto():New( CreateObject( "Word.Application" ):hObj )

? o:ClassName

return nil

gives

Error BASE/1004 No exported method: HOBJ
Called from WIN_OLEAUTO:HOBJ(0)
Called from MAIN(3)

What am I missing?

EMG

--
EMAG Software Homepage: http://www.emagsoftware.it
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
The EMG Music page: http://www.emagsoftware.it/emgmusic
Viktor Szakáts
2009-06-15 11:41:05 UTC
Permalink
Post by Enrico Maria Giordano
function Main()
local o := TOleAuto():New( CreateObject( "Word.Application" ):hObj )
? o:ClassName
return nil
gives
Error BASE/1004 No exported method: HOBJ
Called from WIN_OLEAUTO:HOBJ(0)
Called from MAIN(3)
What am I missing?
You're mixing the legacy class interface with the
legacy API call.

Try either:
- o := CreateObject( "Word.Application" ) // o will be win_oleauto class
- o := TOleAuto():New( "Word.Application" ) // o will be TOleAuto class

Or rather this:
- o := win_oleCreateObject( "Word.Application" ) // o will be
win_oleauto class

I'll commit compatibility patch for this, pls
try it because this will be a blind patch.

Brgds,
Viktor
Enrico Maria Giordano
2009-06-15 12:16:47 UTC
Permalink
-----Messaggio Originale-----
Da: "Viktor Szakáts" <harbour.01-tRMnPmjnDxeHXe+***@public.gmane.org>
A: "Harbour Project Main Developer List." <harbour-pG8skwman+OtlBvVaVFjCkB+***@public.gmane.org>
Data invio: lunedì 15 giugno 2009 13.41
Oggetto: Re: [Harbour] A problem in TOleAuto?
Post by Viktor Szakáts
- o := CreateObject( "Word.Application" ) // o will be win_oleauto class
- o := TOleAuto():New( "Word.Application" ) // o will be TOleAuto class
It seems to work both ways, thank you. Although the first prints

WIN_OLEAUTO

instead of

TOLEAUTO
Post by Viktor Szakáts
- o := win_oleCreateObject( "Word.Application" ) // o will be win_oleauto
class
Both work and print

WIN_OLEAUTO
Post by Viktor Szakáts
I'll commit compatibility patch for this, pls
try it because this will be a blind patch.
Thank you.

EMG

--
EMAG Software Homepage: http://www.emagsoftware.it
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
The EMG Music page: http://www.emagsoftware.it/emgmusic
Bruno Luciani
2009-06-15 13:06:32 UTC
Permalink
I have problems too with OLE

If I link HBWIN these functions don't works

C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x178): undefined reference to
`HB_FUN_OLESETPROPERTY'
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x3c8): undefined reference to
`HB_FUN_CREATEOLEOBJECT'
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x3e8): undefined reference to
`HB_FUN_OLEGETPROPERTY'
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x3f8): undefined reference to
`HB_FUN_OLEINVOKE'


Whats wrong in my code

Bruno
Post by Enrico Maria Giordano
function Main()
Post by Enrico Maria Giordano
local o := TOleAuto():New( CreateObject( "Word.Application" ):hObj )
? o:ClassName
return nil
gives
Error BASE/1004 No exported method: HOBJ
Called from WIN_OLEAUTO:HOBJ(0)
Called from MAIN(3)
What am I missing?
You're mixing the legacy class interface with the
legacy API call.
- o := CreateObject( "Word.Application" ) // o will be win_oleauto class
- o := TOleAuto():New( "Word.Application" ) // o will be TOleAuto class
- o := win_oleCreateObject( "Word.Application" ) // o will be win_oleauto
class
I'll commit compatibility patch for this, pls
try it because this will be a blind patch.
Brgds,
Viktor
_______________________________________________
Harbour mailing list
http://lists.harbour-project.org/mailman/listinfo/harbour
Viktor Szakáts
2009-06-15 13:50:58 UTC
Permalink
I've added support (untested) for CREATEOLEOBJECT().

I've no idea what the rest does, so someone else should do it.

In oohg, if you're using the .hbc file, try adding hbole to one
of the libs= lines, and see what happens. Looks like they
provide this lib, but I missed it from the liblist.

Brgds,
Viktor
Post by Bruno Luciani
I have problems too with OLE
If I link HBWIN   these functions don't works
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x178): undefined reference to
`HB_FUN_OLESETPROPERTY'
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x3c8): undefined reference to
`HB_FUN_CREATEOLEOBJECT'
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x3e8): undefined reference to
`HB_FUN_OLEGETPROPERTY'
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x3f8): undefined reference to
`HB_FUN_OLEINVOKE'
Whats wrong in my code
Bruno
Post by Viktor Szakáts
Post by Enrico Maria Giordano
function Main()
 local o := TOleAuto():New( CreateObject( "Word.Application" ):hObj )
 ? o:ClassName
return nil
gives
Error BASE/1004  No exported method: HOBJ
Called from WIN_OLEAUTO:HOBJ(0)
Called from MAIN(3)
What am I missing?
You're mixing the legacy class interface with the
legacy API call.
- o := CreateObject( "Word.Application" ) // o will be win_oleauto class
- o := TOleAuto():New( "Word.Application" ) // o will be TOleAuto class
- o := win_oleCreateObject( "Word.Application" ) // o will be win_oleauto
class
I'll commit compatibility patch for this, pls
try it because this will be a blind patch.
Brgds,
Viktor
_______________________________________________
Harbour mailing list
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list
http://lists.harbour-project.org/mailman/listinfo/harbour
Bruno Luciani
2009-06-15 23:12:18 UTC
Permalink
But viktor HBOLE I think that was discontinued or not ?

This the cuestion because I am trying HBWIN

Bruno
Post by Viktor Szakáts
I've added support (untested) for CREATEOLEOBJECT().
I've no idea what the rest does, so someone else should do it.
In oohg, if you're using the .hbc file, try adding hbole to one
of the libs= lines, and see what happens. Looks like they
provide this lib, but I missed it from the liblist.
Brgds,
Viktor
Post by Bruno Luciani
I have problems too with OLE
If I link HBWIN these functions don't works
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x178): undefined reference to
`HB_FUN_OLESETPROPERTY'
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x3c8): undefined reference to
`HB_FUN_CREATEOLEOBJECT'
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x3e8): undefined reference to
`HB_FUN_OLEGETPROPERTY'
C:\oohg\OBJO1GH\TWORD.o:TWORD.c:(.data+0x3f8): undefined reference to
`HB_FUN_OLEINVOKE'
Whats wrong in my code
Bruno
Post by Viktor Szakáts
Post by Enrico Maria Giordano
function Main()
local o := TOleAuto():New( CreateObject( "Word.Application" ):hObj )
? o:ClassName
return nil
gives
Error BASE/1004 No exported method: HOBJ
Called from WIN_OLEAUTO:HOBJ(0)
Called from MAIN(3)
What am I missing?
You're mixing the legacy class interface with the
legacy API call.
- o := CreateObject( "Word.Application" ) // o will be win_oleauto class
- o := TOleAuto():New( "Word.Application" ) // o will be TOleAuto class
- o := win_oleCreateObject( "Word.Application" ) // o will be
win_oleauto
Post by Bruno Luciani
Post by Viktor Szakáts
class
I'll commit compatibility patch for this, pls
try it because this will be a blind patch.
Brgds,
Viktor
_______________________________________________
Harbour mailing list
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list
http://lists.harbour-project.org/mailman/listinfo/harbour
Viktor Szakáts
2009-06-16 04:56:38 UTC
Permalink
Post by Bruno Luciani
But viktor HBOLE I think that was discontinued or not ?
This the cuestion because I am trying HBWIN
Yes, in Harbour it is. But oohg still supplies it in their package,
and that's what I was referring to.

Brgds,
Viktor

Loading...