CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Posts
    230

    How to use win32 CreateProcess function to wait until the child done to write to file

    Hello
    im not win32 programmer and its all new to me. i like to open process from my parent win32 application ( ok this is i know how to do) the child process then write to text file and close it self . how can i detect in the parent application that the child application done writing to the text file . and then from the parent app to read the text file . this is all in win32 c++ Thanks

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to use win32 CreateProcess function to wait until the child done to write to

    If the child process exits right after write file is completed then you can use WaitForSingleObject to wait for the child process handle (it is seet by CreateProcess and saved in lpProcessInformation parameter)
    Victor Nijegorodov

  3. #3
    Join Date
    Aug 2006
    Posts
    230

    Re: How to use win32 CreateProcess function to wait until the child done to write to

    thank you very much for your answer , can you please point me to some simple examples?

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to use win32 CreateProcess function to wait until the child done to write to

    Sure!
    Just begin with the CreateProcess Function and WaitForSingleObject Function documentation.
    Under CreateProcess docs you'll also find some examples...
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured