Here's the situation:
First the background:
We have a VB project which consists of 1 form and 11 Custom User Controls, each User control contains up to 300 individual controls. (Don't ask, it was client insistence). Because of the number of controls, we always seem to be on the edge of available memory. We discovered that we weren't destroying all the UC objects which was leading to "Out of memory" errors. That has been fixed.
Within one of the UC's we're using the CreateProcess API to launch other Apps (Word, Excel, IE, etc.).
If we launch the App, close the App, click on another UC then back, launch and App, close it, click a couple of UC's... we get "out of memory".
Now we're also using the WaitforSingleObject API to determine when the launched APP is closed then we close the Process using the CloseHandle API.
We're still getting "out of Memory" errors when we launch and close the apps. We ran the Resource Manager and noticed that even when we close the App, we never recover all the memory resources. Therefore, opening and closing Apps will eventually eat up all memory resources.
NOTE: this only is a problem within Windows 95/98. We do see the memory resources eaten up in WIN NT but we haven't been able to get "out of memory".
The Client uses Windows 95 so switching to NT is not a viable option.
I'm assigning many points to this 'cause we really need the answer.