diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2385c32fd7..9e93f9c78b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,10 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-04-25 02:05 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + * harbour/contrib/hbole/olecore.c + ! fixed OleCreateObject(), OleGetActiveObject() return value + 2009-04-24 15:41 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtqtc/gtqtc.cpp * harbour/contrib/gtqtc/gtqtc.h diff --git a/harbour/contrib/hbole/olecore.c b/harbour/contrib/hbole/olecore.c index 6536493280..9ac520d374 100644 --- a/harbour/contrib/hbole/olecore.c +++ b/harbour/contrib/hbole/olecore.c @@ -451,9 +451,14 @@ HB_FUNC( OLECREATEOBJECT ) /* ( cOleName | cCLSID [, cIID ] ) */ lOleError = CO_E_CLASSSTRING; hb_setOleError( lOleError ); - ppDisp = ( IDispatch** ) hb_gcAlloc( sizeof( IDispatch* ), hb_ole_destructor ); - *ppDisp = pDisp; - hb_retptrGC( ppDisp ); + if( lOleError == S_OK ) + { + ppDisp = ( IDispatch** ) hb_gcAlloc( sizeof( IDispatch* ), hb_ole_destructor ); + *ppDisp = pDisp; + hb_retptrGC( ppDisp ); + } + else + hb_ret(); } @@ -510,9 +515,14 @@ HB_FUNC( OLEGETACTIVEOBJECT ) /* ( cOleName | cCLSID [, cIID ] ) */ lOleError = CO_E_CLASSSTRING; hb_setOleError( lOleError ); - ppDisp = ( IDispatch** ) hb_gcAlloc( sizeof( IDispatch* ), hb_ole_destructor ); - *ppDisp = pDisp; - hb_retptrGC( ppDisp ); + if( lOleError == S_OK ) + { + ppDisp = ( IDispatch** ) hb_gcAlloc( sizeof( IDispatch* ), hb_ole_destructor ); + *ppDisp = pDisp; + hb_retptrGC( ppDisp ); + } + else + hb_ret(); }