I have a .NET application that throws the following exception:
System.ComponentModel.Win32Exception : Not enough quota is available to process this command at MS.Win32.UnsafeNativeMethods.PostMessage(HandleRef hwnd, Int32 msg, IntPtr wparam, IntPtr lparam) at MS.Win32.ManagedWndProcTracker.HookUpDefWindowProc(IntPtr hwnd) at MS.Win32.ManagedWndProcTracker.OnAppDomainProcessExit() at MS.Win32.ManagedWndProcTracker.ManagedWndProcTrackerShutDownListener.OnShutDown(Object target) at MS.Internal.ShutDownListener.HandleShutDown(Object sender, EventArgs e)
I can't reproduce this exception personally, but I get lots of exception reports from users.
What is the 'quota' being referred to? The stack trace leads me to believe that it might be a problem with the Windows message queue.
Any ideas about what might cause this error, or how to fix it would be greatly appreciated.
EDIT, further info: This is on 32 bit Windows XP on all machines, and the exception is not in my code as such, but a .NET Framework event handler of some sort. The application itself does not make any PostMessage calls.
You can get the “Not enough quota is available to process this command” error when the paging file size in the Virtual Memory settings is small. Therefore, you can change the paging file size in the Virtual Memory settings.
Possible Reasons For The 0x80070718 Error The reason is because your default Disk Usage limits are not sufficient to handle the shared files. Your Default Save Location is an SSD: If you have set your default save location to an SSD, then also you might see this error.
The amount of Windows resources of a specific type that a process could allocate is technically only restricted by the amount of virtual memory available to a process. Which can be a rather large number, especially on the 64-bit version of Windows. Some of these resources are withdrawn from an internal heap from which all other processes withdraw as well. Still a very large number if Windows would let one process consume it all.
Which of course doesn't make sense, a process should never be allowed to gobble up all available resources. Which is what a quota does, it sets an upper limit to the counted number of resources of a certain type. Common examples are 10,000 windows, 10,000 GDI objects, 10,000 handles. Not all of them are nice round numbers like this btw.
It would take knowing more about what your PostMessage() call does, but a reasonable guess is that it is pushing the message queue size past the quota. Again, a resource that's technically only limited to the size of available virtual memory. But practically should stay well south of that. If accurate, you are posting messages faster than they can be consumed, throttling is required. That this happens at the exact time your program is terminating suggests another explanation might be necessary. A thread shutdown order problem, maybe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With