RE: NewEra-Out of Resources
Posted in 1998
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
In NewEra 2.20, I check the ressource (GDI and USER) using directly the windows api: #################################################################### FUNCTION getSystemResources() RETURNING SMALLINT, SMALLINT, SMALLINT VARIABLE gdiHeap SMALLINT VARIABLE userHeap SMALLINT VARIABLE total SMALLINT BEGIN_C{ WORD (FAR PASCAL *GetFreeSystemResources)(WORD id) = (WORD (FAR PASCAL *)(WORD id)) GetProcAddress(GetModuleHandle("USER"), "GETFREESYSTEMRESOURCES"); if (! GetFreeSystemResources){ total = -1; gdiheap = -1; userheap = -1; } else{ total = GetFreeSystemResources(0); gdiheap = GetFreeSystemResources(1); userheap = GetFreeSystemResources(2); } }END_C RETURN total, userheap, gdiheap END FUNCTION That work fine and is correctly documented in Windows SDK. I never use NewEra 3.1, so I don't no if that still exist, but probably because this is not a NewEra function, but directly a windows function. David Derumier david.derumier@trasys.be -----Original Message----- From: owner-informix-list [mailto:owner-informix-list@iiug.org] Sent: jeudi 14 mai 1998 5:40 To: informix-list Subject: NewEra-Out of Resources We have a nice product migrated from Informix 4GL to NewEra. It's large so sometimes the system would run out of resources and crash. In NewEra 2.2 we wrote a function to check for limited resources before opening a window -- this used the C++ SystemHeapInfo in the toolhelp.lib. Now we have NewEra 3.1 and the product has been expanded. It runs fine on Windows NT, but Windows 95 still runs into the resources problem and the 32-bit C++ no longer has the toolhelp.lib Our people have been unable to find a substitute -- outside of counting windows and sending a warning. Any ideas would be appreciated.