From cc6096c71a29c02bc72c2543812c7ce9faec3b97 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 21 Mar 2009 14:26:10 +0000 Subject: [PATCH] 2009-03-21 15:12 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * contrib/hbwin/win_dll.c * contrib/hbwin/win_ole.c ! Fixed most mingw64 spotted errors/warnings. --- harbour/ChangeLog | 5 +++++ harbour/contrib/hbwin/win_dll.c | 2 +- harbour/contrib/hbwin/win_ole.c | 28 ++++++++++++++-------------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index eabab87423..0ffc07aa16 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-21 15:12 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbwin/win_dll.c + * contrib/hbwin/win_ole.c + ! Fixed most mingw64 spotted errors/warnings. + 2009-03-21 15:02 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * utils/hbmk2/hbmk2.prg * config/win/icc.cf diff --git a/harbour/contrib/hbwin/win_dll.c b/harbour/contrib/hbwin/win_dll.c index 1682d05492..1b31669f8c 100644 --- a/harbour/contrib/hbwin/win_dll.c +++ b/harbour/contrib/hbwin/win_dll.c @@ -806,7 +806,7 @@ static LPVOID hb_getprocaddress( HMODULE hDLL, int i ) HB_SYMBOL_UNUSED( i ); return NULL; #else - LPVOID lpFunction = ( LPVOID ) GetProcAddress( hDLL, ISCHAR( i ) ? ( LPCSTR ) hb_parc( i ) : ( LPCSTR ) hb_parni( i ) ); + LPVOID lpFunction = ( LPVOID ) GetProcAddress( hDLL, ISCHAR( i ) ? ( LPCSTR ) hb_parc( i ) : ( LPCSTR ) ( HB_PTRDIFF ) hb_parnint( i ) ); if( ! lpFunction && ISCHAR( i ) ) /* try with ANSI suffix? */ { diff --git a/harbour/contrib/hbwin/win_ole.c b/harbour/contrib/hbwin/win_ole.c index 4282c2aab9..2e9237cee8 100644 --- a/harbour/contrib/hbwin/win_ole.c +++ b/harbour/contrib/hbwin/win_ole.c @@ -463,7 +463,7 @@ void hb_oleItemToVariant( VARIANT *pVariant, PHB_ITEM pItem ) hb_vmPush( pItem ); hb_vmSend( 0 ); - pDisp = ( IDispatch * ) hb_parnl( -1 ); + pDisp = ( IDispatch * ) hb_parnint( -1 ); pDisp->lpVtbl->AddRef( pDisp ); /*HB_TRACE(HB_TR_INFO, ("Dispatch: in: %s(%i)%ld\n", pDisp, __FILE__, __LINE__));*/ @@ -759,7 +759,7 @@ static void FreeParams( DISPPARAMS *pDispParams, PHB_ITEM *aPrgParams ) /*TOleAuto():New( nDispatch )*/ hb_vmPushDynSym( s_pSym_New ); hb_itemPushForward( s_pOleAuto ); - hb_vmPushLong( ( LONG ) pDisp ); + hb_vmPushNumInt( ( HB_PTRDIFF ) pDisp ); hb_vmSend( 1 ); hb_itemForwardValue( pItem, hb_stackReturnItem() ); @@ -1089,7 +1089,7 @@ HRESULT hb_oleVariantToItem( PHB_ITEM pItem, VARIANT *pVariant ) /*TOleAuto():New( nDispatch )*/ hb_vmPushDynSym( s_pSym_New ); hb_itemPushForward( pOleAuto ); - hb_vmPushLong( ( LONG ) pDisp ); + hb_vmPushNumInt( ( HB_PTRDIFF ) pDisp ); hb_vmSend( 1 ); /* If retrieved from IUnknown than doubly added! */ @@ -1422,7 +1422,7 @@ HB_FUNC( CREATEOLEOBJECT ) /* ( cOleName | cCLSID [, cIID ] [, cLicense ] ) */ } } - hb_retnl( ( LONG ) pDisp ); + hb_retnint( ( HB_PTRDIFF ) pDisp ); } /* ----------------------------------------------------------------------- */ @@ -1475,7 +1475,7 @@ HB_FUNC( GETOLEOBJECT ) /* ( cOleName | cCLSID [, cIID ] ) */ pUnk->lpVtbl->Release( pUnk ); if( SUCCEEDED( s_nOleError ) ) - hb_retnl( ( LONG ) pDisp ); + hb_retnint( ( HB_PTRDIFF ) pDisp ); } } } @@ -1483,7 +1483,7 @@ HB_FUNC( GETOLEOBJECT ) /* ( cOleName | cCLSID [, cIID ] ) */ /* ----------------------------------------------------------------------- */ HB_FUNC( OLEADDREF ) /* ( hOleObject, szMethodName, uParams... ) */ { - IDispatch *pDisp = ( IDispatch * ) hb_parnl( 1 ); + IDispatch * pDisp = ( IDispatch * ) hb_parnint( 1 ); /*HB_TRACE(HB_TR_INFO, ("OleAddRef( %p )\n", pDisp));*/ @@ -1495,7 +1495,7 @@ HB_FUNC( OLEADDREF ) /* ( hOleObject, szMethodName, uParams... ) */ /* ----------------------------------------------------------------------- */ HB_FUNC( OLERELEASEOBJECT ) /* ( hOleObject, szMethodName, uParams... ) */ { - IDispatch *pDisp = ( IDispatch * ) hb_parnl( 1 ); + IDispatch * pDisp = ( IDispatch * ) hb_parnint( 1 ); /*HB_TRACE(HB_TR_INFO, ("OleReleaseObject( %p )\n", pDisp));*/ @@ -1645,7 +1645,7 @@ HB_FUNC( TOLEAUTO_OLEVALUE ) hb_vmPush( hb_stackSelfItem() ); hb_vmSend( 0 ); - pDisp = ( IDispatch * ) hb_parnl( -1 ); + pDisp = ( IDispatch * ) hb_parnint( -1 ); VariantClear( &s_RetVal ); @@ -1672,7 +1672,7 @@ HB_FUNC( TOLEAUTO__OLEVALUE ) hb_vmPush( hb_stackSelfItem() ); hb_vmSend( 0 ); - pDisp = ( IDispatch * ) hb_parnl( -1 ); + pDisp = ( IDispatch * ) hb_parnint( -1 ); VariantClear( &s_RetVal ); @@ -1700,7 +1700,7 @@ HB_FUNC( TOLEAUTO_OLENEWENUMERATOR ) /* ( hOleObject, szMethodName, uParams... ) hb_vmPush( hb_stackSelfItem() ); hb_vmSend( 0 ); - pDisp = ( IDispatch * ) hb_parnl( -1 ); + pDisp = ( IDispatch * ) hb_parnint( -1 ); VariantClear( &s_RetVal ); @@ -1783,7 +1783,7 @@ HB_FUNC( TOLEAUTO_INVOKE ) hb_vmPush( hb_stackSelfItem() ); hb_vmSend( 0 ); - pDisp = ( IDispatch * ) hb_parnl( -1 ); + pDisp = ( IDispatch * ) hb_parnint( -1 ); if( szName && SUCCEEDED( OleGetID( pDisp, szName, &DispID, NULL ) ) ) { @@ -1807,7 +1807,7 @@ HB_FUNC( TOLEAUTO_SET ) hb_vmPushDynSym( s_pSym_hObj ); hb_vmPush( hb_stackSelfItem() ); hb_vmSend( 0 ); - pDisp = ( IDispatch * ) hb_parnl( -1 ); + pDisp = ( IDispatch * ) hb_parnint( -1 ); if( szName && SUCCEEDED( OleGetID( pDisp, szName, &DispID, NULL ) ) ) { @@ -1831,7 +1831,7 @@ HB_FUNC( TOLEAUTO_GET ) hb_vmPushDynSym( s_pSym_hObj ); hb_vmPush( hb_stackSelfItem() ); hb_vmSend( 0 ); - pDisp = ( IDispatch * ) hb_parnl( -1 ); + pDisp = ( IDispatch * ) hb_parnint( -1 ); if( szName && SUCCEEDED( OleGetID( pDisp, szName, &DispID, NULL ) ) ) { @@ -1858,7 +1858,7 @@ HB_FUNC( TOLEAUTO_ONERROR ) hb_vmPushDynSym( s_pSym_hObj ); hb_vmPush( hb_stackSelfItem() ); hb_vmSend( 0 ); - pDisp = ( IDispatch * ) hb_parnl( -1 ); + pDisp = ( IDispatch * ) hb_parnint( -1 ); OleGetID: