Przemek,
Thank you so much for your explanation. Excellent!
I now have one C function working, so I am on the way! :-)
I now need to use another thread for timing / sampling loop - I have
made a test like this:-
/* ttest.prg */
func main
PUBLIC SampleCsecs:=1, ShutDown:=.F.
//Start Thread 2 to handle sampling and clock
oThread:=Thread():New()
oThread:setInterval( SampleCsecs )
oThread:start( {|| MainClock() } )
DO WHILE !ShutDown
inkey(0)
IF LASTKEY()=27
ShutDown=.T.
EXIT
ENDDO
RETURN
FUNCTION MainClock
DispOutAt(0, MaxCol()-7, Time())
/*Lots of menu and control functions in here*/
IF Shutdown
ThreadObject():setInterval( NIL )
RETURN nil
ENDIF
RETURN nil
---------------end-----------------
It builds without errors but thread 2 never calls MainClock().
I did this in xHarbour with BackgroundTaskAdd (IIRC) and in xBase++ as
above,
what would be the correct approach in Harbour?
I can find no documentation on threads / background tasks and searches
of SVN
have not found anything to help.
Regards, Barry
Przemyslaw Czerpak wrote:
For each function you want to call from external library you have to
create Harbour function as wrapper to the external C function.
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour