#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local cDcb
local nCom1 := OpenComm( "COM1", 1024, 1024)
local nCom2 := OpenComm( "COM2", 1024, 1024)
// ------- Com1
if nCom1 < 0
MsgStop("Error Open COM1!")
endif
if ! BuildCommDcb( "COM1:9600,N,8,1", @cDcb )
MsgStop( "Error BUILD!" )
endif
if ! SetCommState( nCom1, cDcb )
MsgStop( "Error SETCOMM!" )
endif
MsgInfo("nCom1="+str(nCom1,1))
// ------- Com2
if nCom2 < 0
MsgStop("Error Open COM2!")
endif
if ! BuildCommDcb( "COM2:9600,N,8,1", @cDcb )
MsgStop( "Error BUILD!" )
endif
if ! SetCommState( nCom2, cDcb )
MsgStop( "Error SETCOMM!" )
endif
MsgInfo("nCom2="+str(nCom2,1))
return
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 111 guests