SComm64 Communications DLL.

   




Handshaking

Sets or Retrieves the handshaking/flow control used by the com port..

MSComm32 and SComm64 have the same syntax and functionality.
 

Syntax:-

SComm1.Handshaking = value

value = SComm1.Handshaking
 

value:- A Numeric value in the range 0 - 3 or an SCommLib Constant.
 
VB.Net Example:-

If SComm1.Handshaking = 0 Then
   MessageBox.Show("Handshake disabled ")
Else
   MessageBox.Show("Handshake Enabled ")
End If
 

Constants:

0 = SCommLib.HandshakeConstants.comNone
1 = SCommLib.HandshakeConstants.comXOnXoff
2 = SCommLib.HandshakeConstants.comRTS
3 = SCommLib.HandshakeConstantscomRTSXOnXOff

Using the built-in constants with our SComm64 component it is simply a case of leaving out the 'M'. So SCommLib instead of MSCommLib

SComm1.Handshaking = SCommLib.HandshakeConstants.comXonXoff


Remarks:

When using MSComm32 in Visual Basic 6 it was quite common to use the numerical values 0=comNone, 1=comXOnXoff, 2=comRTS, 3=comRTSXonXoff instead of the constant names.

Those numerical values continue to work in VB.Net where MSComm32 and SComm64 have the same syntax.

But, if using the constant names in VB then the whole 'namespace.enum.constantname' should be used.

C# projects must always use the HandshakeConstants.ConstantName syntax. eg.

SComm1.Handshaking = SCommLib.HandshakeConstants.comXonXoff

When reading the property the same syntax is used although the result can be safely cast to/from a number if necessary.