In C++, I have opened a serial port that has a HANDLE
. Since the port may close by an external application, how can I verify that the HANDLE
is still valid before reading data?
I think it can be done by checking the HANDLE
against a suitable API function, but which?
Thank you.