Em 08/12/2010 17:00, Vicente Guerra escreveu:
>     You can call "MYCLASS" from C code, and
> return value is a new object.
>

Worked. Thanks!

Real code:

PHB_DYNS pDynSym;
pDynSym = hb_dynsymFind( "QACTION" );
if( pDynSym )
{
   hb_vmPushSymbol( pDynSym->pSymbol );
   hb_vmPushNil();
   hb_vmDo( 0 );
   PHB_ITEM pObject = hb_itemNew( NULL );
   hb_itemCopy( pObject, hb_stackReturnItem() );
   PHB_ITEM pItem = hb_itemNew( NULL );
   hb_itemPutPtr( pItem, (QAction *) ptr );
   hb_objSendMsg( pObject, "NEWFROMPOINTER", 1, pItem );
   hb_itemReturn( pObject );
   hb_itemRelease( pObject );
   hb_itemRelease( pItem );
}

The code is working, but if some developer see some mistake or trap in 
my code, please tell me.


Regards,
Marcos Gambeta


------------------------------------------------------------------------------
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to