JPEG compression in opengl

My problem is to store JPEGs based on the program below. There are some failures with the HDC and I simply have no idea how to handle this. So if somebody is interested, please look through the program and help.
Thanks 2.0.rar

why would anyone do that?
You haven’t even attempted to diagnose the problem yourself and tell us your findings… you haven’t even given a clue as to where or what the problem is.
Are you offering money to debug your code?

intrestingly, the same person made the same post on the Gamedev OpenGL Forum yesterday and got told basically the same thing :smiley: