I do need a virtual serial port since a program#1 has to set up a bluetooth connection for a second program (program#2) that uses System.IO.Ports.SerialPort, don't I? It isn't a requirement providing that program#1 and #2 run concurrently using the same serial port.
32Feet.NET: Ok. But I get "No ports available" if I start the SuD 7 times (one after another). COM9 -> COM7 -> COM5 -> COM4 -> COM2 -> COM0 -> "No ports available".
program#1 invokes
bdi.SetServiceState(BluetoothService.SerialPort, true)
32feet.Net creates Key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\Serial\Ports
32feet.Net calls
RegisterDevice(portPrefix, portIndex, "btd.dll", ref pep);
program#2: this.comX.Open(); ... this.comX.Close();
EMDK: An IndexOutOfRangeException is thrown if I start the SuD 7 times (one after another). COM2 -> COM4 -> COM5 -> COM6 -> COM7 -> COM9 -> IndexOutOfRangeException.
program#1: I'm using LocalComPort and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\Serial\Ports isn't updated.
program#2: this.comX.Open(); ... this.comX.Close();
What is the reason? There's no process#1 and process#2 left.