I have a file Externo.HRB with three functions (ex: Test_01, Text_02 and Test_03).
I need to run the Test_02 function. How do?
Help whith HRB Files
Re: Help whith HRB Files
Hello Vilian,
See if this helps you:
Best Regards,
See if this helps you:
Code: Select all
#include "hbcompat.ch"
function main
local nHandle
try
nHandle := hb_hrbload( memoread( "file.hrb" ) )
catch oErr
? "Error load in hrb"
quit
end
if empty( nHandle )
? "Error call hrb"
quit
endif
? call_func( nHandle, "p1", "1" )
? call_func( nHandle, "p2", "2" )
hb_hrbunload( nHandle )
return NIL
*************************
static function call_func( nHandle, cFunc, xPar )
*************************
local xRet := HB_HRBGETFUNSYM( nHandle, cFunc )
if empty( xRet )
? "Error load in function " + cFunc
quit
endif
return eval( xRet, xPar )
Obrigado, Regards, Saludos
Rossine.
xHarbour comercial (xAcc) -> Testando harbour + bcc / msvc
fwh 9.05
Windows XP SP2
Rossine.
xHarbour comercial (xAcc) -> Testando harbour + bcc / msvc
fwh 9.05
Windows XP SP2