Just to add to the community here. I had this error occur after I tried to update to 3.1.2. Somewhere in the process it failed then when it finally did it's internal restore, I could not get my laptop to recognize the phone. My iPod touch however worked just fine. After trying everything I could think of, I uninstalled the software:
iTunes, QuickTime, Apple Software Update, Apple Mobile Device, Bonjour and Apple Software Update (in that order). Then I reinstalled iTunes when I plugged my phone back in the OS immediately recognized it then iTunes did. So now after a restore I am back up and running.
Hope this helps someone.