From 70f4989f313efd80f654b8e15c16d819165f49bd Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Fri, 23 Oct 2009 16:08:06 +0000 Subject: [PATCH] 2009-10-23 18:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbwin/axcore.c ! fixed wrongly initialized reference counter in AX control. Now when AX Window is closed and all .prg references to OLE are cleared pSink is released. --- harbour/ChangeLog | 6 ++++++ harbour/contrib/hbwin/axcore.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e5d08c4e6c..0a5a40f0f2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,12 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-10-23 18:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbwin/axcore.c + ! fixed wrongly initialized reference counter in AX control. + Now when AX Window is closed and all .prg references to OLE + are cleared pSink is released. + 2009-10-23 15:09 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/gtxwc/gtxwc.c ! fixed clipboard property change in 64bit builds diff --git a/harbour/contrib/hbwin/axcore.c b/harbour/contrib/hbwin/axcore.c index 0a79b3d262..6cc76a4c4b 100644 --- a/harbour/contrib/hbwin/axcore.c +++ b/harbour/contrib/hbwin/axcore.c @@ -435,7 +435,7 @@ HB_FUNC( __AXREGISTERHANDLER ) /* ( pDisp, bHandler [, cID] ) --> pSink */ pSink = ( ISink* ) hb_xgrab( sizeof( ISink ) ); /* TODO: GlobalAlloc/Free GMEM_FIXED ??? */ pSink->lpVtbl = ( IDispatchVtbl * ) &ISink_Vtbl; - pSink->count = 1; /* 1 for Harbour collectible pointer [Mindaugas] */ + pSink->count = 0; pSink->pItemHandler = hb_itemNew( pItemBlock ); pSink->rriid = rriid; lOleError = HB_VTBL( pCP )->Advise( HB_THIS_( pCP ) ( IUnknown* ) pSink, &dwCookie );