Subj : Re: CreateProcess To : borland.public.cpp.borlandcpp From : Ed Mulroy [TeamB] Date : Fri Jun 18 2004 10:24 am > i already do this. both stdout and stderr are redirected > to 2 different named pipes. like i stated before, everything > runs fine for about 7 or 8... When replying to a question on here one has to guess as to where the person is and you are well past what I assumed. From your use of named pipes I now know that you are using the 2K, XP branch of Windows and not the 95/98/ME branch. I read and reply to a lot of messages on these groups and do not do a good job of remembering what each person's configuration is (however I do remember that you use an RR connection - but only because I do also ). The error relates to accessing resources. It is possible that you have exhausted some resource but that is not likely. My guess as to the most probable cause is that the program being launched is already running (which includes has not yet fully shut down). There is a slight delay from when a program is officially ended and when the resources, DLL's, files, etc are all done with, particularly if the program fails to close a file or resource and leaves it to Windows to handle that. You might try introducing a delay between when you want to call CreateProcess and when you actually call it. Yes, that is a pain in the neck but it's only a diagnostic. If the problem goes away or even if it remains but the symptoms change then you've at least established a direction for investigation. I am a bit hesitant in saying this next one. It is from years ago so I am risking not recalling all the details correctly. I remember an old article which spoke of difficulty with using named pipes for stdin/stdout redirection and recommending using anonymous pipes for memory mapped files instead. I hope you find the problem and also hope that when you do that you will visit here and say what it was. This sounds like a problem that is going to eventually bite all of us and it would be nice to know what it was and what the cure is. .. Ed > mike wrote in message > news:40d27969$1@newsgroups.borland.com... > > i already do this. both stdout and stderr are redirected > to 2 different named pipes. like i stated before, everything > runs fine for about 7 or 8 times, then createprocess fails. > i saw the generic error message, but it doesn't make much > sense to me. why work for the first 6 times and then > become broken. don't really know what is going on. i guess > i can try to debug more to see if i can figure anything else out.... .