System Error. Code: 8. Not enough storage is available to process this command

后端 未结 7 2102
时光说笑
时光说笑 2020-11-27 12:32

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

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 12:47

    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.

提交回复
热议问题