This code uses internals, which it a total no-no, 
for user code.

Brgds,
Viktor

On 2010 Mar 29, at 21:15, Vailton Renato wrote:

> 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)
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to