Hi, Franček
Something like this (a simplified excerpt from my working code):
// Harbour function
Function StrMerge(cString1, cString2)
Local cOutStr
cOutStr := cString1+cString2
Return cOutStr
// C function
#include <hbapi.h>
#include <hbvm.h>
#include <hbapiitm.h>
char testfunc( char *c_s1, char *c_s2)
PHB_ITEM pResult;
char *sResult;
{
hb_vmInit( 0 ); /* Don't execute first linked symbol */
PHB_ITEM pItem1 = hb_itemPutC( NULL, c_s1 );
PHB_ITEM pItem2 = hb_itemPutC( NULL, c_s2 );
char * HbFuncName = "STRMERGE";
pResult = hb_itemDoC( HbFuncName, 2, (PHB_ITEM) pItem1 , (PHB_ITEM) pItem2 , 0 );
sResult = hb_itemGetC( pResult );
hb_itemRelease( pItem2 );
hb_itemRelease( pItem1 );
return sResult ;
}
//--------------
Regards