I want to use CreateDIBSection to create a DIB section of >2GB, and I need to draw something into it.

I know I can not accomplish this task on 32-bit Windows, so I tried on 64-bit version. Then I found that I can create several 2GB DIB sections but can not create one which is over 2GB, even if a few bigger than 2GB is impossible (such as 2.1GB). The test platform is 64-bit Windows 7 with 8GB physical memory and the program has been compiled into 64-bit version.

It seems that there's a 2GB limitaion, is that true? Does GDI object still have this 2GB limitation on 64-bit OS?

But I can allocate one memory block much more than 2GB on the same system using malloc or some memory allocation functions like that. So, why I can not create >2GB DIB section is not beacuse of memory fragment. In fact, there's very large bulk of continuous memory but CreateDIBSection can not use it.

Anyone has some ideas about this? Thanks