Ol谩,
Bom dia!
Algu茅m saberia informar onde 茅 poss铆vel conseguir a HBComm.lib, que compile com o Harbour 1.0.1 (2007)?
Att.,
Oliveiros Silva Mendes Junior
Ol谩,
Bom dia!
Algu茅m saberia informar onde 茅 poss铆vel conseguir a HBComm.lib, que compile com o Harbour 1.0.1 (2007)?
Att.,
Oliveiros Silva Mendes Junior
Antonio,
Estoy tratando de usar la librer铆a hbcomm que viene con Harbour para comunicarme con un Arduino por protocolo serie pero con esta librer铆a, que me funciona bien con otros equipos, no hay forma de comunicar.
Sin embargo cuando utilizo las funciones que vienen en ejemplo como phone.prg de fivewin si logro que comunique.
El puerto serie es v铆a uno virtual creado en un USB, no es un puerto serie standard.
驴Que diferencia hay entre usar hbcomm y la de FW?.
Me interesar铆a utilizar la de hbcomm porque es la que tengo usada hasta ahora sin problemas y para no cambiar el modelo de forma de trabajar.
驴Cual recomiendas tu?.
Gracias.
No he usado casi la hbcomm asi que no te sabr铆a decir.
Seguramente otros usuarios pueden darte alguna indicaci贸n
oDlg:bCommNotify = { | nComm, nStatus | BytesAtPort( nComm, nStatus ) }
ACTIVATE DIALOG oDlg ON INIT EnableCommNotification( nComm, oDlg:hWnd, 256, 256 )
function BytesAtPort( nComm, nStatus )
local cBuffer :=space(1) //Para leer los caracteres recibidos de uno en uno.
if nSTATUS > 0
ReadComm( nComm, @cBuffer ) // <<<<---- program will lock here
endif
return cBufferWM_COMMNOTIFY (3.1)
WM_COMMNOTIFY
idDevice = wParam; /* communication-device ID */
nNotifyStatus = LOWORD(lParam); /* notification-status flag */
The WM_COMMNOTIFY message is posted by a communication device driver whenever a COM port
event occurs. The message indicates the status of a window's input or output queue.
Parameter Description
idDevice Value of wParam. Specifies the identifier of the communication device that is posting the
notification message.
nNotifyStatus Value of the low-order word of lParam. Specifies the notification status in the low-order
word. The notification status may be one or more of the following flags:
Value Meaning
CN_EVENT Indicates that an event has occurred that was enabled in the event
word of the communication device. This event was enabled by a
call to the SetCommEventMask function. The application
should call the GetCommEventMask function to determine
which event occurred and to clear the event.
CN_RECEIVE Indicates that at least cbWriteNotify bytes are in the input queue.
The cbWriteNotify parameter is a parameter of the
EnableCommNotification function.
CN_TRANSMIT Indicates that fewer than cbOutQueue bytes are in the output
queue waiting to be transmitted. The cbOutQueue parameter is a
parameter of the EnableCommNotification function.
Returns
An application should return zero if it processes this message.
Comments
This message is sent only when the event word changes for the communication device. The application
that sends WM_COMMNOTIFY must clear each event to be sure of receiving future notifications.