Virtual Serial Port ActiveX Control - SetWiring Method

The SetWiring method sets connection type depending on parameters passed to this method

 
 
BOOL SetWiring(
  LONG Dtr, // Transmit line signal
  LONG Rts, // Receive line signal
  LONG Out1, // Output line signal
  LONG Out2, // Input line signal
);

Parameters
  Dtr, Rst, Out1, Out2
   

 [in] line signals may have following values depending on which port you want connect to:

Value Meaning Hex
WIRED_TO_DCD setting connection to remote DCD line 0x80
WIRED_TO_RI setting connection to remote RI line 0x40
WIRED_TO_DSR setting connection to remote DSR line 0x20
WIRED_TO_CTS setting connection to remote CTS line 0x10

Return Values
  If the function succeeds, the return value is TRUE, alternatively, the return value is FALSE.

Remarks
Method is available for Windows NT4/2000/XP/2003/Vista only. The default pinout is the following:

Note, that DCD signal is connected to DTR signal by default and you are not able to manage them separately. To resolve this problem, please, execute the following command: SetWiring (WIRED_TO_DSR, WIRED_TO_CTS, 0,0). Besides, SetWiring method is actual till virtual port is not deleted from system.


See also:

SetLineControl method, SetTimeouts method, SetHandFlow method, SetChars method, SetStrictBaudrate method, SetBreak method.