Could be you're running into a limitation of GDI. And yes, even on XP there are still limits on certain GDI/USER/Kernel resources.

My guess is that you're hitting the limit of either bitmap handles, bitmap headers (which use memory in the global GDI space) combined with the fact that CopyImage needs a temporary buffer for the image rescaling (Even if you're not actually rescaling).

Why do you need an actual copy of the bitmap ? As far as windows is concerned, there's no real reason to actually ever have a duplicate. If you're not painting on it, why does it even matter ?