On Fri, 15 Feb 2008, Przemyslaw Czerpak wrote:
> hb_itemDo( pItem );
Ups. Of course it should be:
hb_itemDo( pItem, 0 );
in all paces.
And if you want to push parameters yourself and then
call hb_vmSend(), hb_vmDo() then please remember about calling
hb_vmRequestReenter() before and hb_vmRequestRestore() after, f.e.:
if( hb_vmRequestReenter() )
{
hb_vmPushDynSym( hb_dynsymGetCase( "MYFUNC" ) );
hb_vmPushNil()
hb_vmPushInteger( 1 );
hb_vmDo();
/* take return value here because hb_vmRequestRestore()
will restore previous return value */
lResult = hb_parnl( -1 );
hb_vmRequestRestore();
}
These functions check if you can reenter HVM, safe and restore
return item and HVM exception resetting it. It means that you will
be able to executed .prg code even with active exception like BREAK
or QUIT and then the exception will be restored. If your .prg code
will also generate exception then during restoring the one with
highest priority will be chosen.
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour