My iPhone is not unlocked, but it was jailbroken in 1.1.1. When I tried the new unlock method for 1.1.2, I got the message from the 1.1.2 jailbreak that it failed, and that I needed to run OKToPrep. This was puzzling, because I had indeed run OKToPrep under 1.1.1 before running windows.bat.
Finally, I realized the problem. When upgrading to 1.1.2, you must shift-click the Upgrade button, not the restore button. If you do a restore, then it will wipe out the work done by OKToPrep.
Some other tips:
1) When downgrading back to 1.1.1 to re-run OKToPrep, make sure you shift-click the Restore button instead of the Upgrade button. After it's done, it errors out and leaves the iPhone in restore mode. To get it to boot again, run iBrickr 0.91. It will set your phone back to normal mode and reboot it.
2) Some have said that after downgrading to 1.1.1, it's not possible to use jailbreakme.com to re-jailbreak 1.1.1. I was able to do it 3 times in a row. It works fine. I used a 1.1.1 image that I downloaded several weeks ago. I'm not sure if it's true that there's a new version of 1.1.1 w/ a patched Safari, but at least the old version still works, so if you're having problems, try to get an old one.
3) After the 1.1.2 jailbreak writes the data, the DOS box gets stuck w/ a line that says 314572800/314572800. I thought that the process had frozen up and failed, but in reality, there was a message box under it that said the process was completed, and that I should reboot the iPhone.
Hope this helps others who are having problems...