On second thought, that doesn't sound too friendly, and that was not my intent.
First, have you ever established communications with any device using Com3? Back before USB ports, computers usually had two com ports, but they were Com1 and Com2. The newer computers don't have any real DB-9 or DB-25 com ports at all. One of the reasons I'm confused is that most of the PICs I have seen have either a DB-9 or DB-25 connector.
When you start talking about Com3 it makes me think of the virtual Com ports that modern OSes provide where communications are actually done with a USB cable.
That's the reason why I ask if you have ever been successful using that port before. If you have, we still aren't completely out of the woods. Suppose that the PIC is bad, for instance?
I've used VB to talk through Com ports a number of times, and one of the first things I learned was not to assume that the problem is in the program. Fortunately, at the time I was doing this USB ports were not yet in use, which actually made troubleshooting much easier.
Here's a link for a make-it-yourself DB-9 loopback tester.
http://www.ehow.com/how_7285961_test...ial-ports.html
This only tests half of the possible problems, though. What you really want is a breakout box with LED indicators so you can actually watch what's happening on the RX/TX lines, as well as CTS, etc.
But that is only for real Com ports. For USB ports/cables, the decent testers seem to be a lot more expensive if you want to test anything other than output voltage. But still, if I was doing a lot of work with PICs via USB, I would want a breakout box.
I say that now after wasting a good amount of time trying to talk to an Arduino Mini. If I had a USB breakout box then I could have saved myself about a week of time.
One good thing about this, though, is that once you get this to work, you will never need to worry about the code again, as long as you are careful to make modular and re-usable.
Another possible issue is the Baud rate. You are using 9600 bps and some modern UARTs aren't comfortable at that speed. They are supposed to auto-negotiate, but some don't.