Re: MSComm1_OnComm()'s comEvReceive first or Buffer = MSComm1.Input
- From: "Boki" <bokiteam@xxxxxxxxxxxxxx>
- Date: Thu, 15 Dec 2005 15:07:15 +0800
Thanks.
if I have two routine to receive data ( in fact, I didn't do this )
1. Private Sub MSComm1_OnComm()
select
Case comEvReceive
buffer_A = mscomm1.input
2. In a Timer ( as high speed as possible )
while (true)
if ( MSComm1.InBufferCount > 0) Then
buffer_B = mscomm1.input
wend
So, when a data byte is coming, which one will get data? buffer_A or
buffer_B?
Thank you very much!
Best regards,
Boki.
"Dick Grier" <dick_grierNOSPAM@xxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:eznBzMOAGHA.1952@xxxxxxxxxxxxxxxxxxxxxxx
> I'm not sure what you mean. If you set the InputMode property to
> comInputModeBinary, then you MUST use an array of type Byte to buffer
> receive data. You also should use arrays of type Byte for transmit data,
> though that isn't required. However, if you set the InputMode property to
> comInputModeText, then you must use a String to buffer receive data.
>
> --
> Richard Grier (Microsoft Visual Basic MVP)
>
> See www.hardandsoftware.net for contact information.
>
> Author of Visual Basic Programmer's Guide to Serial Communications, 4th
> Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
> www.mabry.com/vbpgser4 to order.
>
>
.
- Follow-Ups:
- References:
- MSComm1_OnComm()'s comEvReceive first or Buffer = MSComm1.Input
- From: Boki
- Re: MSComm1_OnComm()'s comEvReceive first or Buffer = MSComm1.Input
- From: *** Grier
- Re: MSComm1_OnComm()'s comEvReceive first or Buffer = MSComm1.Input
- From: Boki
- Re: MSComm1_OnComm()'s comEvReceive first or Buffer = MSComm1.Input
- From: *** Grier
- MSComm1_OnComm()'s comEvReceive first or Buffer = MSComm1.Input
- Prev by Date: Re: How do I output "quotes"
- Next by Date: Re: Question on $ and &
- Previous by thread: Re: MSComm1_OnComm()'s comEvReceive first or Buffer = MSComm1.Input
- Next by thread: Re: MSComm1_OnComm()'s comEvReceive first or Buffer = MSComm1.Input
- Index(es):