-----Messaggio Originale----- Da: "Przemyslaw Czerpak" <[email protected]>
A: "Harbour Project Main Developer List." <[email protected]>
Data invio: martedì 15 settembre 2009 20.29
Oggetto: Re: [Harbour] Another OLE problem


I have a question here.
In your previous example you used:
  oWord = CREATEOBJECT( "Word.Application" )
I'm interesting if using WIN_OLECREATEOBJECT() resolved the problem you
reported.
CREATEOBJECT() should be an wrapper to WIN_OLECREATEOBJECT()
and in such simple example both function should work without any
problems so if CREATEOBJECT() does not work for you then it may
suggest some problems with old libraries having old version of
CREATEOBJECT() which are linked with final application.

The following sample

FUNCTION MAIN()

   LOCAL oWord

//    oWord = WIN_OLECREATEOBJECT( "Word.Application" )
   oWord = CREATEOBJECT( "Word.Application" )

   oWord:Documents:Add()

   oWord:Visible = .T.

   RETURN NIL

stops with

Error TOleAuto/65535  : TOLEAUTO:NEW
Called from THROW(0)
Called from TOLEAUTO:NEW(0)
Called from CREATEOBJECT(0)
Called from MAIN(6)

while works fine with WIN_OLE* version. Do I have something wrong in my link configuration file?

Do you use hbmk2 to link your examples?

No, I'm using a batch file.

Objects created by WIN_OLECREATEOBJECT() do not overload operators
like [], +, -, *, /, %, ++, --. ^. \. ==. != which are overload in
TOLEAUTO class in xHarbour.
AFAIR Mindaugas was explaining on this list why he do not want to
overload [] operator but I do not remember exact reasons.
In the past we had similar to xHarbour TOleAuto class with such
operators. If it's important then we can try to reactivate some
parts of such functionality in our legacy.prg code but I would like
to hear Mindaugas opinion first.

It would be nice if you can implement the operator overload in OLE.

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
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to