From dc94ed0ede1a2c20836a20e8d977a4be464b1cd5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 16 Jun 2008 12:12:24 +0000 Subject: [PATCH] 2008-06-16 14:11 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * contrib/hbole/ole2.c * And some more. --- harbour/ChangeLog | 4 ++++ harbour/contrib/hbole/ole2.c | 15 +++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5931036af5..dc55cbf877 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,10 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-06-16 14:11 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbole/ole2.c + * And some more. + 2008-06-16 13:56 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * contrib/hbole/ole2.c * Further cleanup. diff --git a/harbour/contrib/hbole/ole2.c b/harbour/contrib/hbole/ole2.c index 47f9ba2e53..d0f5396120 100644 --- a/harbour/contrib/hbole/ole2.c +++ b/harbour/contrib/hbole/ole2.c @@ -443,8 +443,8 @@ HB_FUNC( OLEINVOKE ) // (hOleObject, szMethodName, uParams...) cMember = AnsiToWide( hb_parc( 2 ) ); s_nOleError = pDisp->lpVtbl->GetIDsOfNames( pDisp, HB_ID_REF( REFIID, IID_NULL ), - ( wchar_t * ) cMember, 1, - LOCALE_USER_DEFAULT, &lDispID ); + ( wchar_t ** ) &cMember, 1, + LOCALE_USER_DEFAULT, &lDispID ); hb_xfree( cMember ); if( s_nOleError == S_OK ) @@ -478,9 +478,11 @@ HB_FUNC( OLESETPROPERTY ) // (hOleObject, cPropName, uValue, uParams...) memset( (LPBYTE) &s_excep, 0, sizeof( s_excep ) ); cMember = AnsiToWide( hb_parc( 2 ) ); + s_nOleError = pDisp->lpVtbl->GetIDsOfNames( pDisp, HB_ID_REF( REFIID, IID_NULL ), - ( wchar_t * ) cMember, 1, + ( wchar_t ** ) &cMember, 1, LOCALE_USER_DEFAULT, &lDispID ); + hb_xfree( cMember ); if( s_nOleError == S_OK ) @@ -515,6 +517,7 @@ HB_FUNC( OLEGETPROPERTY ) // (hOleObject, cPropName, uParams...) memset( (LPBYTE) &s_excep, 0, sizeof( s_excep ) ); cMember = AnsiToWide( hb_parc( 2 ) ); + s_nOleError = pDisp->lpVtbl->GetIDsOfNames( pDisp, HB_ID_REF( REFIID, IID_NULL ), ( wchar_t ** ) &cMember, 1, LOCALE_USER_DEFAULT, &lDispID ); @@ -595,9 +598,9 @@ HB_FUNC( GETOLEOBJECT ) BSTR wCLSID; IID ClassID, iid; LPIID riid = (LPIID) &IID_IDispatch; - IUnknown *pUnk = NULL; - char *cOleName = hb_parc( 1 ); - void *pDisp = NULL; /* IDispatch */ + IUnknown * pUnk = NULL; + char * cOleName = hb_parc( 1 ); + void * pDisp = NULL; /* IDispatch */ /* 'void *' used intentionally to inform compiler that there is no strict-aliasing */ s_nOleError = S_OK;