From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 2E619BBAF for ; Wed, 4 Nov 2009 13:04:49 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkMCABD88EpRZ90wkWdsb2JhbACEcpZpAQEBAQkLCgcTA69kkSmBMoI4UwQ X-IronPort-AV: E=Sophos;i="4.44,679,1249250400"; d="scan'208";a="39505569" Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by mail1-smtp-roc.national.inria.fr with ESMTP; 04 Nov 2009 13:04:48 +0100 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20091104120448.LFKC27507.mtaout02-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com>; Wed, 4 Nov 2009 12:04:48 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20091104120448.YIFZ2093.aamtaout03-winn.ispmail.ntl.com@romulus.metastack.com>; Wed, 4 Nov 2009 12:04:48 +0000 Received: from COUNTERTENOR ([172.16.0.158]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id nA4C4iRw009385 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 4 Nov 2009 12:04:45 GMT From: "David Allsopp" To: , References: <4AF16258.6010508@gmail.com> <021001ca5d41$20175d60$60461820$@allsopp@metastack.com> <4AF16474.5070104@gmail.com> <4AF16B69.8080304@gmail.com> In-Reply-To: <4AF16B69.8080304@gmail.com> Subject: RE: [Caml-list] Howto execute a command without the "cmd" windows opening? Date: Wed, 4 Nov 2009 12:04:43 -0000 Message-ID: <023801ca5d46$ff180aa0$fd481fe0$@allsopp@metastack.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcpdRY1nyDXvhT3URUOzanEABFflvAAAL6rw Content-Language: en-gb Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 81.102.132.77 X-Cloudmark-Analysis: v=1.0 c=1 a=VooCfk1-DGMA:10 a=yMhMjlubAAAA:8 a=H6Ud1rq8z07yxBNn4K0A:9 a=M3SzqzVoVvBM36Y3B0UCTB00Nv4A:4 X-Spam: no; 0.00; howto:01 caml-list:01 library:03 library:03 exit:04 passing:05 msdn:05 msdn:05 aspx:92 aspx:92 en-us:92 en-us:92 structure:07 execute:09 actually:10 > If i find a way to read the exit status of the process=E2=80=A6 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=20 [1] http://msdn.microsoft.com/en-us/library/ms683189(VS.85).aspx [2] http://msdn.microsoft.com/en-us/library/ms687032(VS.85).aspx