“Win32Exception Not enough storage is available to process this command” error when run as a windows service

不羁岁月 提交于 2019-12-05 20:21:38
yonojoy

Yes, the problem might be related to a memory leak on the server. Maybe the desktop heap is depleted. The desktop heap for "non-interactive" window sessions is different from the desktop heap for real (interactive) desktop sessions. This explains why double clicking the application is still possible.

Try finding the registry key \System\CurrentControlSet\Control\Session Manager\SubSystem and increasing the 3rd parameter (zzz) of SharedSection=xxx,yyy,zzz as described in MSKB 126962 (for yyy).

The third SharedSection value (512) is the size of the desktop heap for each desktop that is associated with a "non-interactive" window station.

If this fixes your problem, heap depletion, caused for instance by leaking resources, is likely to be the source of your problem. The size of the "non-interactive" desktop heap is by default much smaller than the standard heap.

David Ching

The call to RegisterClass is resulting in a memory error. See Why RegisterClass fails with ERROR_NOT_ENOUGH_MEMORY?. Is your app calling RegisterClass or RegisterWindowsMessage many times?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!