Sets custom signal lines wiring (pinout) in virtual serial port emulator.
BOOL SetWiringExW( WCHAR *Port, WCHAR * UserSession, void* Buffer, long sizeBuffer );
A null-terminated string that defines one of the two port names in a pair
User session's ID in which the pair of virtual ports was created.
If UserSession is empty, a ports pair was created globally and is visible to all users.To know how to get the user session's ID, refer to GetUserSession.
A pointer to VSERIAL_WIRING structure.
Size of Buffer parameter in bytes
Returns TRUE if signal lines wiring was created successfully and FALSE otherwise
Setting custom wiring (null modem scheme with partial handshaking)
VSERIAL_WIRING wiring; wiring.DTR = WIRED_TO_DSR | WIRED_TO_DCD; wiring.RTS = WIRED_TO_CTS; wiring.OUT1 = 0; wiring.OUT2 = 0; SetWiringExW("COM5", &wiring, sizeof(wiring));