SetWiringW

Sets custom signal lines wiring (pinout).

BOOL SetWiringW(
  	WCHAR *Port, void* Buffer, long sizeBuffer
);

Parameters:

  • Port

    A null-terminated string that defines one of the two port names in a pair

  • Buffer

    A pointer to VSERIAL_WIRING structure

  • sizeBuffer

    Size of Buffer parameter in bytes

Return values:

Returns TRUE if signal lines wiring was created successfully and FALSE otherwise

Code example:
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;

SetWiringW("COM5", &wiring, sizeof(wiring));