caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David Allsopp" <dra-news@metastack.com>
To: <matthieu.dubuget@gmail.com>, <caml-list@inria.fr>
Subject: RE: [Caml-list] Howto execute a command without the "cmd" windows	opening?
Date: Wed, 4 Nov 2009 12:04:43 -0000	[thread overview]
Message-ID: <023801ca5d46$ff180aa0$fd481fe0$@allsopp@metastack.com> (raw)
In-Reply-To: <4AF16B69.8080304@gmail.com>

> If i find a way to read the exit status of the process…

Pass a PROCESS_INFORMATION structure to CreateProcess (in order to get the hProcess for the process you created) and then use GetExitCodeProcess[1]. You can use WaitForSingleObject passing hProcess to it if you need to block until the process has actually terminated or you can loop on GetExitCodeProcess until the result is not equal to STILL_ACTIVE.


David 


[1] http://msdn.microsoft.com/en-us/library/ms683189(VS.85).aspx
[2] http://msdn.microsoft.com/en-us/library/ms687032(VS.85).aspx


  reply	other threads:[~2009-11-04 12:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 11:15 Matthieu Dubuget
2009-11-04 11:22 ` [Caml-list] " David Allsopp
2009-11-04 11:24   ` Matthieu Dubuget
2009-11-04 11:54     ` Matthieu Dubuget
2009-11-04 12:04       ` David Allsopp [this message]
2009-11-04 12:05       ` Adrien
2009-11-04 12:22 ` Alain Frisch
2009-11-04 13:58   ` Matthieu Dubuget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='023801ca5d46$ff180aa0$fd481fe0$@allsopp@metastack.com' \
    --to=dra-news@metastack.com \
    --cc=caml-list@inria.fr \
    --cc=matthieu.dubuget@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).