2010-02-23 17:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/dynlibhb.c
! casting for OS2 builds
* harbour/src/rtl/hbinet.c
! added automatic WINSOCK initialization in HB_INETIFINFO() function
* harbour/contrib/hbwin/olecore.c
% small optimization in OLE method calls
(use static buffer for message name)
This commit is contained in:
@@ -17,6 +17,17 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-02-23 17:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/src/vm/dynlibhb.c
|
||||
! casting for OS2 builds
|
||||
|
||||
* harbour/src/rtl/hbinet.c
|
||||
! added automatic WINSOCK initialization in HB_INETIFINFO() function
|
||||
|
||||
* harbour/contrib/hbwin/olecore.c
|
||||
% small optimization in OLE method calls
|
||||
(use static buffer for message name)
|
||||
|
||||
|
||||
2010-02-23 14:25 UTC+0100 Maurilio Longo (maurilio.longo@libero.it)
|
||||
* source/contrib/hbxpp/tthreadx.prg
|
||||
|
||||
@@ -279,6 +279,11 @@ static wchar_t* AnsiToWide( const char* szString )
|
||||
return szWide;
|
||||
}
|
||||
|
||||
static void AnsiToWideBuffer( const char* szString, wchar_t* szWide, int iLen )
|
||||
{
|
||||
MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, szString, -1, szWide, iLen );
|
||||
szWide[ iLen - 1 ] = '0';
|
||||
}
|
||||
|
||||
static BSTR hb_oleItemToString( PHB_ITEM pItem )
|
||||
{
|
||||
@@ -1346,7 +1351,7 @@ HB_FUNC( WIN_OLEAUTO___ONERROR )
|
||||
{
|
||||
IDispatch* pDisp;
|
||||
const char* szMethod;
|
||||
wchar_t* szMethodWide;
|
||||
wchar_t szMethodWide[ HB_SYMBOL_NAME_LEN + 1 ];
|
||||
OLECHAR* pMemberArray;
|
||||
DISPID dispid;
|
||||
DISPPARAMS dispparam;
|
||||
@@ -1365,7 +1370,7 @@ HB_FUNC( WIN_OLEAUTO___ONERROR )
|
||||
return;
|
||||
|
||||
szMethod = hb_itemGetSymbol( hb_stackBaseItem() )->szName;
|
||||
szMethodWide = AnsiToWide( szMethod );
|
||||
AnsiToWideBuffer( szMethod, szMethodWide, ( int ) sizeof( szMethodWide ) );
|
||||
|
||||
/* Try property put */
|
||||
|
||||
@@ -1389,7 +1394,6 @@ HB_FUNC( WIN_OLEAUTO___ONERROR )
|
||||
DISPATCH_PROPERTYPUT, &dispparam,
|
||||
NULL, &excep, &uiArgErr );
|
||||
FreeParams( &dispparam );
|
||||
hb_xfree( szMethodWide );
|
||||
|
||||
/* assign method should return assigned value */
|
||||
hb_itemReturn( hb_param( 1, HB_IT_ANY ) );
|
||||
@@ -1406,7 +1410,6 @@ HB_FUNC( WIN_OLEAUTO___ONERROR )
|
||||
pMemberArray = szMethodWide;
|
||||
lOleError = HB_VTBL( pDisp )->GetIDsOfNames( HB_THIS_( pDisp ) HB_ID_REF( IID_NULL ),
|
||||
&pMemberArray, 1, LOCALE_USER_DEFAULT, &dispid );
|
||||
hb_xfree( szMethodWide );
|
||||
|
||||
if( lOleError == S_OK )
|
||||
{
|
||||
|
||||
@@ -1088,8 +1088,11 @@ HB_FUNC( HB_INETGETALIAS )
|
||||
****/
|
||||
HB_FUNC( HB_INETIFINFO )
|
||||
{
|
||||
PHB_ITEM pInfo = hb_socketGetIFaces( hb_parnidef( 2, HB_SOCKET_PF_INET ),
|
||||
hb_parl( 1 ) );
|
||||
PHB_ITEM pInfo;
|
||||
|
||||
HB_INET_INITIALIZE();
|
||||
pInfo = hb_socketGetIFaces( hb_parnidef( 2, HB_SOCKET_PF_INET ),
|
||||
hb_parl( 1 ) );
|
||||
if( pInfo )
|
||||
hb_itemReturnRelease( pInfo );
|
||||
else
|
||||
|
||||
@@ -208,7 +208,7 @@ void * hb_libSymAddr( PHB_ITEM pDynLib, const char * pszSymbol )
|
||||
return ( void * ) GetProcAddress( ( HMODULE ) hDynLib, pszSymbol );
|
||||
#elif defined( HB_OS_OS2 )
|
||||
PFN pProcAddr = NULL;
|
||||
if( DosQueryProcAddr( ( HMODULE ) hDynLib, 0, pszSymbol, &pProcAddr ) == NO_ERROR )
|
||||
if( DosQueryProcAddr( ( HMODULE ) hDynLib, 0, ( PCSZ ) pszSymbol, &pProcAddr ) == NO_ERROR )
|
||||
return ( void * ) pProcAddr;
|
||||
#elif defined( HB_HAS_DLFCN )
|
||||
return dlsym( hDynLib, pszSymbol );
|
||||
|
||||
Reference in New Issue
Block a user