Hello Przemek

Przemyslaw Czerpak-2 wrote:
> 
> The ported version is in hbw32 library in w32_ole.c and w32_tole.prg
> files. It's xHarbour's win32ole.prg code with some minor fixes AFAIR
> even synced with recent xHarbour's modifications.
> But please remember that this code inherited very serious problem
> from xHarbour. If you are using BCC then it will need -a8 alignment
> for OLE structures but it also access directly HB_ITEM internals
> (it needs to include hbvmopt.h) so you have to compile also whole
> Harbour core code with such alignment. It causes general slowness
> because [x]Harbour HVM is slower when compiled with -a8 by BCC then
> with -a4. It's sth what have to be definitely fixed because it can
> also can be source of other problems which cannot be resolved at all.
> F.e. commercial libraries can be also alignment dependent and compiled
> with different alignment, f.e. -a4 and in such case you will not be
> able to produce single binaries.
> 
> Fixing above alignment problem in xHarbour will also resolve the
> problem of compilation in Harbour. Just simply by default Harbour
> forbids danger operation and it's the reason why this code cannot
> be compiled. So far no one tries to make it. In fact exactly these
> to functions hb_oleItemToVariant() and hb_oleVariantToItem() should
> be rewritten to not access item internals and this should resolve
> the problem. If the alignment problem is unimportant for you then
> you can use hacked version from hbw32 as is with Harbour compiled
> with -a8. If you want to fix the problem then look at places marked
> with TOFIX in contrib/hbw32/w32_ole.c - probably such fix can be also
> valuable for xHarbour users.
> 

I should have looked into contribs before posting the message, pity on me
--((.

Even compiling Harbour, hbw32, and my sources, with default flags I am able
to host Active-X's and receive events properly (will be updating FreeWin
shortly). No problems, may be for the time-being. 

But as you have pointed out above, it will be heartening to see it fixed
sooner than later to avoid possible future GPF's or while manipulating
comples COM objects. Can you guide me in this direction what exactly have to
be done. I read in-between lines to understand (TO FIX) but what I could not
figure out. I am just a beginner on C levels.

Pritpal Bedi, INDIA-USA
-- 
View this message in context: 
http://www.nabble.com/OLE-Implementation---xHarbour-Compatibility-tp15392521p15403138.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to