We have a few Win32 applications (coded in Delphi 2006) where sometimes the user gets an error message saying \"System Error. Code: 8. Not enough storage is availabl
I noticed this error (System Error. Code: 8. Not enough storage...) recently when using some Twain code, it was happening on my computer and not my coworker's, and the only real difference between our machines is that I use the laptop screen as a second monitor, so my total desktop dimensions are larger.
I found documentation of the problem pointed to above by Steve Black, but I found a way (that fixed the error on my machine, at least) that does not require editing the registry:
The old code was using
DC := GetDC(Owner.VirtualWindow);
// ...
ReleaseDC(Owner.VirtualWindow, DC);
and I found that replacing it with this got rid of my errors
DC := CreateCompatibleDC(Owner.VirtualWindow);
// ...
DeleteDC(DC);
I don't know if this has relevance to your problem, but it may be helpful for others in the future.