New function HB_DLLDO() added

This commit is contained in:
Antonio Linares
2001-12-13 15:37:11 +00:00
parent a9ae00d215
commit bb236e07b9

View File

@@ -342,4 +342,30 @@ void hb_evalBlock( PHB_ITEM pCodeBlock, ... )
va_end( args );
hb_vmFunction( uiParams );
}
/* Executes a Harbour pcode dynamically loaded DLL function or procedure
* Syntax: HB_DllDo( <cFuncName> [,<params...>] ) --> [<uResult>]
*/
HB_FUNC( HB_DLLDO )
{
PHB_DYNS pDynSym = hb_dynsymFind( hb_strupr( hb_parc( 1 ) ) );
if( pDynSym )
{
USHORT uiPCount = hb_pcount();
USHORT uiParam;
hb_vmPushSymbol( pDynSym->pSymbol );
hb_vmPushNil();
/* same logic here as from HB_FUNC( EVAL ) */
for( uiParam = 2; uiParam <= uiPCount; uiParam++ )
{
hb_vmPush( hb_stackItemFromBase( uiParam ) );
}
hb_vmDo( uiPCount - 1 );
}
}