Help whith HRB Files

Help whith HRB Files

Postby vilian » Tue Jun 05, 2012 11:53 pm

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?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 975
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Help whith HRB Files

Postby Rossine » Wed Jun 06, 2012 1:29 am

Hello Vilian,

See if this helps you:

Code: Select all  Expand view


#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 )
 


Best Regards,
Obrigado, Regards, Saludos

Rossine.

Harbour and Harbour++
Rossine
 
Posts: 344
Joined: Tue Oct 11, 2005 11:33 am

Re: Help whith HRB Files

Postby vilian » Wed Jun 06, 2012 10:42 am

Rossine,

Thanks ;)
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 975
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 49 guests