I have been using DllImport to bring the functions from vspdctl.dll into a C# unit test project. In order to test the utility I have written, I create a virtual port pair and pass one of the ports to it in order to test its ability to handle serial message data.
My issue comes from the fact that when attempting to create a port pair and then delete it once I am finished with it, it is possible for the ports to become orphaned such that they are detected by Windows using the "mode" command but are no longer recognizable in the Eltima VSPD GUI. It is also not possible for them to be removed.
Should I debug a unit test that creates and deletes a port pair and allow it time between the two commands, it works as expected, deleting the port pair.
Any help would be appreciated.