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:
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user