What is the idea? What is the kind of app you are working on? However, you can close that port if you close the current app that has reserved that port for itsself. with other words, using the same process that opens it. Otherwise, you need to call the CloseHandle( ) WINAPI to close a serial port so, if you are familiar with API it could be adequate solution for your problem.
Well, 1st off, you cannot 'reserve' a port if you process is not running but, if your program open up the port first, other program will not be able to access it anymore. So, it is best if you run your app and get the port/s on startup before other programs do.
Moreover, you can check which process is fighting with your application for the port ownership. Thenm you can either remove the program or load yours in advance.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.