Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

mscomm buffering

I'm trying to use mscomm to read a 18KB image off a smartcard that comes in 1 continuious stream. I'm not sure exactly how to go about doing this properly. Please give suggestions. I should also note the stream is in hex.
[231 byte] By [jtabish] at [2007-11-11 9:58:43]
# 1 Re: mscomm buffering
See if this helps: http://support.microsoft.com/kb/262883
Phil Weber at 2007-11-11 17:23:32 >
# 2 Re: mscomm buffering
Ok here is my code

inpBuff = vbNullString
Do Until frmMain.MSComm.InBufferCount = 0
DoEvents
inpBuff = inpBuff & frmMain.MSComm.Input
Loop

This gets me a length of 1840 chars which I need double that amount back so just trying to figure out a better way. I do not have a way of determining the end of the data transmission either.
jtabish at 2007-11-11 17:24:32 >