A while back Antonio helped me get some serial communication issues sorted out with FWPPC.
Basically to get ReadComm() and WriteComm() to work he had me add the following code to the end of my .prg file. I now need the same type of thing for FlushComm().
Code: Select all
HB_FUNC( READCOMM )
{
DWORD dw = 0;
ReadFile( ( HANDLE ) hb_parnl( 1 ), ( LPVOID ) hb_parc( 2 ), ( DWORD ) hb_parni( 3 ), &dw, NULL );
hb_retni( ( int ) dw ? dw : -1 );
}
HB_FUNC( WRITECOMM )
{
DWORD dw = 0;
WriteFile( (HANDLE ) hb_parnl( 1 ), ( LPVOID ) hb_parc( 2 ), ( DWORD ) hb_parni( 3 ), &dw, NULL );
hb_retni( ( int ) dw ? dw : -1);
}
Can someone please help me out on this