First thing to check in these cases is if the port really exists and that it is indeed named COM1. You can do this in device manager; Start-Run-devmgmt.msc. Expand the Ports (COM & LPT) node and see if COM1 is there.If the port exists and it still can't be opened, it might already be opened by another application. A port can only be opened once at a time.
If the port is opened by another application (an automatically started and running in the background synch manager for a mobile device, perhaps) you need to make sure that the other application isn't started or is set to another port.If none of the above helps I think you need to show your code since there can be something wrong there./Ruben. First thing to check in these cases is if the port really exists and that it is indeed named COM1. You can do this in device manager; Start-Run-devmgmt.msc. Expand the Ports (COM & LPT) node and see if COM1 is there.If the port exists and it still can't be opened, it might already be opened by another application. A port can only be opened once at a time.
If the port is opened by another application (an automatically started and running in the background synch manager for a mobile device, perhaps) you need to make sure that the other application isn't started or is set to another port.If none of the above helps I think you need to show your code since there can be something wrong there./Ruben.