Serial Port Sniffer ActiveX Control - SetRealPortLineControl

The SetRealPortLineControl method sets the line control register (LCR) for real serial port. The line control register controls the data size, the number of stopbits, and the parity.  

VARIANT_BOOL SetRealPortLineControl(
  LONG StopBits, // Stop Bits
  LONG Parity, // Parity
  LONG DataBits // Data Bits
);


Parameters

  StopBits   [out] Number of stop bits to be used. This member can be one of the following values:    

Value Meaning
0 1 stop bit
1 1.5 stop bits
2 2 stop bits

   
Parity
  [out] Parity scheme to be used. This member can be one of the following values:    

Value Meaning
0 No parity
1 Odd
2 Even
3 Mark
4 Space

   
DataBits
  [out] Number of bits in the bytes transmitted and received.  


Return Values

  If the function succeeds, the return value is TRUE, otherwise FALSE.


Remarks
  You are able to set this method forcibly, without waiting for events.