A. The Netstat command can list currently used ports, which might be helpful if you suspect an application is clashing with another one on an active port. Use the -an switch to show all connections and listening ports in numeric form.

C:\> netstat -an

Check the output for any port that you think your program might use.

Take a look at using the Port Reporter. Also read: TCP vs. UDP Ports.