Hi Mindaugas,
thank you for replying,
Il 05/01/2009 13.10, Mindaugas Kavaliauskas ha scritto:
Hi,
is it possible to port functions in subject from xharbour to harbour ?
I'm trying but I have not enough experience at C level and with
harbour internals.
Basically I need them to run an external program and capture
output.
It is possible, but it is not portable solution. I'm not the guru of I/O
redirection, but I guess Przemek will give you more precise answer about
it.
In xHarbour Giancarlo (AFAIR) did it working multiplatform. I'm trying
to port to Harbour but there are some changes I don't understand well,
mostly related to different MT environment. xHarbour version has VM/MT
calls inside that files (filesys.c and philes.c) in rtl lib, instead
Harbour has VM API calls only in hbvm*.lib, so I don't know exactly how
translate, for example, below lines:
---------------------------
#elif defined( HB_OS_WIN_32 ) && ! defined( HB_WIN32_IO )
{
int iPid;
HB_SYMBOL_UNUSED( bWait );
HB_STACK_UNLOCK
HB_TEST_CANCEL_ENABLE_ASYN
#ifdef __BORLANDC__
iPid = cwait( &iRetStatus, (int) fhProc, 0 );
#else
iPid = _cwait( &iRetStatus, (int) fhProc, 0 );
#endif
HB_DISABLE_ASYN_CANC
HB_STACK_LOCK;
if ( iPid != (int) fhProc )
{
iRetStatus = -1;
}
}
#elif defined( HB_WIN32_IO )
---------------------------
in particular macros:
HB_TEST_CANCEL_ENABLE_ASYN
HB_DISABLE_ASYN_CANC
as I have understood that
HB_STACK_UNLOCK
HB_STACK_LOCK
should be
hb_vmUnlock();
hb_vmLock();
Thank you
Best Regards
Francesco
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour