What's the deal with this?

I'm writing a print class (as you may know from another problem thread I started) and I have been using it as a Debug build with no problem. I just switched it over to a Release build and now my call to CDC::StartDoc() is returning -1. WHY???
Nothing else has changed and when I change it back to Debug, it works fine again...

Please assist! Thanks in advance.