Not all is lost yet. Take an inventory of physical comm ports in your machine. You may not have all comm ports assigned in 1 to 9. The device driver is not the end all authority. Even the enumerator may say the port is in use when it is not. It maybe just reserved. That's where the physical inventory comes into play.
Re-assigning some of the ports to free up a location in the 1-9 range is an option. Re-think what ports must be assigned in the 1-9 range. The software in use for those ports maybe able to go above 9, allowing a re-assignment to free the lower range.
If you are using serial ports to talk from PC to PC machines. An alternative could be
http://com0com.sourceforge.net/ which allows serial to serial VCP communications. re: using Ethernet as the linking medium.
Please detail your serial ports requirements. Are you in a MFG environment using PC's and CNC machines, pick place or robotic movement ? Is an endpoint of the serial comm a dedicated machine to another PC ? Do you need optical isolation comm for a noisy RF environment ?
I have a experience in this stuff. If I can't answer it someone maybe able to. BTW, QB64 does not have a 9 port limit (I think). It was just setup that way to simplify things. It maybe possible to expand to the real 255 limit. The only real limit is in Windows. Using USB to connect stuff, it has an ENDPOINT limit. It's a programming thing. USB3 devices use 2 endpoints and USB 2< uses 1. The number of endpoints that windows can setup is less than 255 much less. Comms maybe assigned up to 255 but you will never have 255 of them.