Hi!
To support MT need this:
[GETADDRESS.C]
#include "hbvmopt.h"
#include "hbapi.h"
#include "hbapiitm.h"
#include "hbstack.h"
HB_FUNC( _GETADDRESS )
{
PHB_ITEM pItem = hb_param( 1, HB_IT_ANY );
PHB_ITEM pResult = hb_itemNew( NULL );
char buffer[ 16 ];
memset( buffer, 0, sizeof( buffer ) );
switch( hb_itemType( pItem ) )
{
case HB_IT_ARRAY:
hb_snprintf( buffer, sizeof( buffer ), "%p", ( pItem
)->item.asArray.value );
break;
case HB_IT_STRING:
case HB_IT_MEMO:
hb_snprintf( buffer, sizeof( buffer ), "%p", ( pItem
)->item.asString.value );
break;
case HB_IT_SYMBOL:
hb_snprintf( buffer, sizeof( buffer ), "%p", ( pItem
)->item.asSymbol.value->value.pFunPtr );
break;
case HB_IT_POINTER:
hb_snprintf( buffer, sizeof( buffer ), "%p", ( pItem
)->item.asPointer.value );
break;
default:
hb_snprintf( buffer, sizeof( buffer ), "%p", 0 );
break;
}
hb_itemPutC( pResult, buffer );
hb_itemReturnRelease( pResult );
}
// end of file
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour