Is it possible via the line of code to check whether a COM port is connected or not?
Analyze: I have a program POS (Point of Sale) where it has the integration with SiTef, through a PinPad (card machine) and for it to work, the PinPad must be connected to a COM port.
PinPad Online:
Now, in order to make the system more robust and avoid exception
when trying to perform the procedure with PinPad , if it is not connected, I would check via the line of code if it is or not connected and assign this check in the respective events that do the integration.