Article ID: 143113
Article Last Modified on 8/5/2004
119591 How to Obtain Microsoft Support Files from Online Services
119591 How to Obtain Microsoft Support Files from Online Services
Sub Comm1_OnComm ()
Static ReceiveBuffer As String
ReceiveBuffer = ReceiveBuffer & Comm1.Input
'Always buffer incoming data no matter what generated the OnComm
'event.
If Len(ReceiveBuffer >= Limit) Then
Call Process(Left$(ReceiveBuffer,Limit))
ReceiveBuffer = Right$(ReceiveBuffer, Len(ReceiveBuffer) - Limit)
'Cleans-up buffer.
End If
End Sub
'If you are looking for a terminating character sequence instead of
'length, then the test would use InStr instead of Len.
This procedure double-buffers the received data and, unless the program
is bound to fail because of some other performance problems, provides
good security for the received data. It is extremely important to handle
every character as it comes in at high baud rates.
Additional query words: Wg1001
Keywords: kbinfo kbdownload kbapi kbvbp kbvbp400 kbctrl kbgrpdsvb kbvbp300 KB143113