From 6d6232d831565d20d01cfb358038fb7cbb9b02ef Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 18 May 2011 18:46:11 +0000 Subject: [PATCH] 2011-05-18 20:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbwin/axcore.c ! added missing AddRef() for OLE object returbed by __AXREGISTERHANDLER() --- harbour/ChangeLog | 4 ++++ harbour/contrib/hbwin/axcore.c | 1 + 2 files changed, 5 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index cce70a40b6..e465169b05 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,10 @@ The license applies to all entries newer than 2009-04-28. */ +2011-05-18 20:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbwin/axcore.c + ! added missing AddRef() for OLE object returbed by __AXREGISTERHANDLER() + 2011-05-18 16:17 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbrun/hbrun.hbp * contrib/hbrun/pullext.prg diff --git a/harbour/contrib/hbwin/axcore.c b/harbour/contrib/hbwin/axcore.c index 0b4f23ef9e..1898395aca 100644 --- a/harbour/contrib/hbwin/axcore.c +++ b/harbour/contrib/hbwin/axcore.c @@ -662,6 +662,7 @@ HB_FUNC( __AXREGISTERHANDLER ) /* ( pDisp, bHandler [, cIID] ) --> pSink */ pSink->pConnectionPoint = pCP; pSink->dwCookie = dwCookie; + HB_VTBL( pDisp )->AddRef( HB_THIS( pDisp ) ); pOleItem = hb_oleItemPut( hb_stackReturnItem(), ( IDispatch* ) pDisp ); /* bind call back handler item with returned object */ hb_oleItemSetCallBack( pOleItem, &pSink->pItemHandler );