In reply to Dominicandave: You will not get a generic free code.
The code you need will be specific to your phone - depends on the carrier lock and the imei number.
Nobody is going to do the work to sort that out for you for free.
If you want free then you need to put some effort in. Rooting the phone gives you proper access to the system - can be done in seconds with applications like superoneclick. Once your phone is rooted then you have the ability to edit things to remove the lock.
If you don;t want to get into the internals then pay the money.