Controlling virtual serial ports directly

Note, that virtual serial ports can be controlled directly from your own application. You can do it using vspdctl.dll.

VSPDCTL.DLL is a dynamic link library which allows you to control virtual serial ports directly from your own application. This lets you create and delete virtual serial ports on-the-fly without using standard configuration utility with GUI.

We have provided instructions and declarations for C/C++, Visual Basic 5.0 and higher, Delphi , and some pointers on getting it to work with other languages as well.

Important notice: if you want your virtual serial ports to be correctly displayed in VSPD and installed automatically after Windows reboot, you have to manually insert port binary values and strict baudrate parameter in the following registry path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSBC

Registry example:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSBC\Ports\COM3COM4]
"Port1"="COM3"
"Port2"="COM4"
"StrictBaudrate"=dword:00000001
"Wiring"=hex:a0,10,00,00

  • Port1 - string, first port name
  • Port2 - string, second port name
  • StrictBaudrate - DWORD, 1 - enabled
  • Wiring - binary, 4 bytes, ...

For example, if you have COM port 1 and COM port 2 connected to each other and have strict baudrate enabled then you must insert the following value: 01 02 01. If the strict baudrate emulation is disabled between COM1 and COM2 then the value is: 01 02 00. In case you have several pairs then the values are sequenced: 01 02 01 03 04 00 05 06 01 and so on.