Can not open more Excel Workbook or application
<p>opening 300 processes cause the application crash, but system have enough resources, i don't know why????</p>

<p>this is my code:</p>

<pre><code>int intNumberofProcesses;
cout &lt;&lt; "Enter Number Of Processes:" &lt;&lt; endl;
cin &gt;&gt; intNumberofProcesses;

STARTUPINFOA startUpInfo = {sizeof(startUpInfo)};
PROCESS_INFORMATION processInfo;

int intNumberOfOpenFiles = 0;

int processCounter = 0;

for(int i = 0; i &lt; intNumberofProcesses;i++)
{
    try
    {
        CreateProcessA("c:\\windows\\system32\\calc.exe", NULL,NULL,NULL,FALSE,NULL,NULL,NULL,&amp;startUpInfo,&amp;processInfo);
        intNumberOfOpenFiles++;
    }
    catch(char * str)
    {

        cout &lt;&lt; "Error:" &lt;&lt; str &lt;&lt;  endl;
    }

    unsigned long listOfProccesses[1024];
    unsigned long cbNeeded;

    EnumProcesses(listOfProccesses,sizeof(listOfProccesses),&amp;cbNeeded);

    unsigned long numberOfProcesses = cbNeeded / sizeof(unsigned long);

    int calcID = GetProcessId("calc.exe");


    for(unsigned long i = 0 ;i &lt; numberOfProcesses ;i++)
    {
        if(calcID == listOfProccesses[i])
        {
            processCounter++;
        }
    }

}

cout &lt;&lt; processCounter &lt;&lt; endl;


system("Pause");
</code></pre>

<p>But it's not my problem because I resolved it...
Here the problem: "Excel application".
Excel says "not enough resources" 
This occur when just 10% of CPU and ram used it's means my resources is enough...
and have 300 opened Workbook or application... </p>

<p>I know this: the desktop heap not the problem because I monitored it...</p>

<p>be or not to be, this is the question...</p>

<p>Thanks</p>
