Out of heap resources allocated for SolidWorks gives:
GetLastError() == 0x00000486
"The current process has used all of its system allowance of handles for Window Manager objects."
Out of heap resources due to other applications using a ton of windows gives: GetLastError() == 0x00000008 "Not enough storage is available to process this command."