MSComm32 is old and therefore still expects files to be terminated with the standard Dos EOF char (Ascii char 26). Modern file systems do not require or use the EOF character to indicate the End of File but some communications protocols may use other ascii characters such a EOT, ETX or any other ascii character as a way to indicate 'End of Message' or 'End of Transmision'.
The Ascii table has a number of such characters such as ETX ( 3 ) and EOT ( 4 ) and SComm32 allows you to use any ascii character.
The EvtChar property is used in conjuction with the EvtCharEnable property. If enabled this property will cause an OnComm event to be triggered when the EvtChar is received by the com port hardware. These properties are similar to the Microsoft EOFChar/EOFEnable properties but an evtChar OnComm event is triggered as soon as the evtChar is detected in the incoming data stream. Using this property you could set RThreshold=0 so that no evReceive events are ever triggered and simply wait for the evtChar event to indicate that the evtChar has arrived and is waiting to be read from the buffer.
Example: Lets assume we're receiving an unknown amount of data which we expect to be terminated by the ASCII EOT (4) character. We don't want to waste time reading or handling any data at all until we know the EOT character is waiting in the receive buffer.
'// Set these values via the IDE or elsewhere in your code such as Form_Load event
InputLen = 0
'// we will read all available chars from the buffer
RThreshold = 0
'// we don't want any OnComm events when any data arrives.
EvtCharEnable = True
EvtChar = 4
We're ging to react to the ascii EOT character
Private Sub SComm1_OnComm
Select Case SComm1.CommEvent
'// We'll just ignore any evReceive events
'// When this event is triggered we know
'// our character is in the receoive buffer
so we can read the whole message
Text1.Text = S Comm1.Input