2009-10-20 01:18 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/contrib/hbwin/oleinit.c
  * harbour/contrib/hbwin/hbwinole.h
    * modified hb_oleInit() function to return logical value
      indicating success
This commit is contained in:
Przemyslaw Czerpak
2009-10-19 23:19:00 +00:00
parent 62a09afd19
commit 4d79ba9fcc
3 changed files with 20 additions and 5 deletions

View File

@@ -17,6 +17,12 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-10-20 01:18 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbwin/oleinit.c
* harbour/contrib/hbwin/hbwinole.h
* modified hb_oleInit() function to return logical value
indicating success
2009-10-19 23:13 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/gtalleg/tests/hbmk.hbm
* contrib/hbmysql/utils/hbmk.hbm

View File

@@ -101,7 +101,7 @@
HB_EXTERN_BEGIN
HB_EXPORT void hb_oleInit( void );
HB_EXPORT BOOL hb_oleInit( void );
HB_EXPORT HRESULT hb_oleGetError( void );
HB_EXPORT void hb_oleSetError( HRESULT lOleError );
HB_EXPORT void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant );

View File

@@ -72,12 +72,21 @@ static void hb_ole_exit( void* cargo )
}
}
void hb_oleInit()
BOOL hb_oleInit( void )
{
BOOL fResult = TRUE;
if( ! s_iOleInit )
{
OleInitialize( NULL );
hb_vmAtQuit( hb_ole_exit, NULL );
fResult = OleInitialize( NULL ) == S_OK;
if( fResult )
{
hb_vmAtQuit( hb_ole_exit, NULL );
s_iOleInit++;
}
}
s_iOleInit++;
else
s_iOleInit++;
return fResult;
}