"COMM port not found" after use of external power

Apologies if this question has been asked before - couldn't find anything like it !
I have my Arduino Uno attached to my laptop (running WinXP) and the port assigned is COMM4.
I can download my code and it runs fine when my C++ application is talking to it via USB (COMM port 4)
However, the nature of the application is such that I need to power the Arduino externally (having set it up) and remove the USB cable. Some time later, I need to be able to reconnect the USB cable and upload the results. However my app (on the laptop) cannot find COMM4 - starting the IDE results in exactly the same message (COMM 4 not found). The only cure that I've found is to reset the Arduino, but of course, this is a useless "solution". What is causing this problem and what is the solution ?
Thanks in advance !

Well, how embarresing !!
Rebooted laptop and everything was fine ! Just realised that I was just ripping the USB cable out, and not letting my host program close COMM4 !!!
My experience might help someone else though ....................... !