Sign in to follow this  

Application suddenly returns

This topic is 4306 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My application makes some easy operations: 1) Creates temporary folder. 2) Starts another application (using pipes) that writes some file. 3) Then my application gets the size of that written file. If it doesn't, the message box appears. 4) Deletes temporary folder. Sometimes the 3) shows message box (because the file is not closed yet) but it's ok. But the problem is when the 3) and 4)are not executed and application returns. This problem appears only on Win 2003 Server (on XP everything is ok). What's the problem?

Share this post


Link to post
Share on other sites
It crashes sometimes, not every time. The code is hard to understand because many modules interact. I can show the code without interaction:
CreateTemplateDir("code");
RunCompiler();
WriteJad();
FullRemoveDir("code");

I think there's something wrong with commonly used dirs (one dir cannot be deleted when other application looks through it).

Share this post


Link to post
Share on other sites
Its hard to tell without more info but it sounds like your parent need to wait for the child to finish using the WaitFor*() and GetExitCodeProcess() functions to make sure it exited successfully before continuing.

Share this post


Link to post
Share on other sites

This topic is 4306 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this