Re: [BLACKBOX] HostDialog.Start

From: [at]} <Chris>
Date: Tue, 25 Aug 2009 22:36:26 +0930

----boundary-LibPST-iamunique-2026688753_-_-
Content-type: text/plain

        From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
Thomas
        Sent: Monday, 24 August 2009 8:50 PM
        To: BLACKBOX{([at]})nowhere.xy
        Subject: [BLACKBOX] HostDialog.Start
        
        
        Hello BlackBox World,
         
          there is a procedure Start in HostDialog to start a new Windows
program from a CP program. Is there any way of telling when the new program
terminates?
         
        Thanks
         
        Andrew

----------------------------------------

Hi Andrew,

Normally you would need access to information that is stored in local
variables in HostDialog.Start to be able to tell when the new program
terminates.

The following is some experimental code which I originally posted to this
mailing list in Jan 2007. The function Create launches a new process using
Win.CreateProcess (as does HostDialog.Start) and then calls
Win.WaitForSingleObject every 100ms until the new program terminates. It is
in a very rough and ready state but it should be enough to get you started.

A simple test program is:

MODULE TestProcess;

IMPORT StdLog, CfbProcess;

PROCEDURE Run*;
BEGIN
  CfbProcess.Create("C:\\Windows\\System32\\Notepad.exe", "");
  StdLog.String("Finished");
  StdLog.Ln()
END Run;

END TestProcess.

--------------------------------------------------------

Regards,

Chris Burrows
CFB Software
Armaide v2.1: ARM Oberon-07 Development System
http://www.cfbsoftware.com/armaide

--------------------------------------------------------
CFBProcess:
 
StdCoder.Decode E7rPXJqQntmPYB4.,0 1Ak...xf....58FTuPE,5TWyqlKrqKKrGrtumdGL
 mGorCquU2hgnRAXDFTvMUn7FTvMf1G2sETfPdPMHfP9fQbf9hOO9vR7ONbvMoedhgrRiioedFW
 UkTeoxhmhgnpZHZijJC7ONbvM0.,.S.eL3U.QklbcjRAktgdjZgZZh2hgnlsDor.kay4.qorGq
 mQiig76FUHZijJCbnWmqmqKWKqtcw7.,.FS0A,0EUb.0E.cUGpmWLuOpoKqvCbHZiYpedhA704
 TeKKw.bHfEWUmL.6..D.JP0E.CcIhgsNHT9N9ntQ8qorG4704D.CbB,708T1U.EuS.T.Nv,2U.
 2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JE.iJoYpY2H.nf1...
 --- end of encoding ---
 


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-2026688753_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFx0YWIgRnJvbTogQmxhY2tCb3ggW21haWx0bzpC
TEFDS0JPWEBMSVNUUy5PQkVST04uQ0hdIE9uIEJlaGFsZiBPZiBBbmRyZXdccGFyDQpUaG9tYXNc
cGFyDQpcdGFiIFNlbnQ6IE1vbmRheSwgMjQgQXVndXN0IDIwMDkgODo1MCBQTVxwYXINClx0YWIg
VG86IEJMQUNLQk9YQExJU1RTLk9CRVJPTi5DSFxwYXINClx0YWIgU3ViamVjdDogW0JMQUNLQk9Y
XSBIb3N0RGlhbG9nLlN0YXJ0XHBhcg0KXHRhYiBccGFyDQpcdGFiIFxwYXINClx0YWIgSGVsbG8g
QmxhY2tCb3ggV29ybGQsXHBhcg0KXHRhYiAgXHBhcg0KXHRhYiAgIHRoZXJlIGlzIGEgcHJvY2Vk
dXJlIFN0YXJ0IGluIEhvc3REaWFsb2cgdG8gc3RhcnQgYSBuZXcgV2luZG93c1xwYXINCnByb2dy
YW0gZnJvbSBhIENQIHByb2dyYW0uIElzIHRoZXJlIGFueSB3YXkg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LjBFLmNVLlVpQWNvWkMuNzAsRTBF
Li4uNywsTS4sLiwuLHRjcDBccGFyDQogMGtYYXQud25qbC5rLkUuMC4zZ3dQRS42Li5FQlUuVSwu
SixVLjJtLC4sLkU0V0ROLk50YXJtM1dqLkprbGI2LlFjaiwuRTZFLi5ccGFyDQogLkYuLC5tRS4w
VS4ya0xSQzRtRjNrd0wsLEF6SkUuaUpvWXBZMkgubmYxLi4uXHBhcg0KIC0tLSBlbmQgb2YgZW5j
b2RpbmcgLS0tXHBhcg0KIFxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmli
ZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VS
VkBMSVNUUy5PQkVST04uQ0h9fQA1OVhH
----boundary-LibPST-iamunique-2026688753_-_---
Received on Tue Aug 25 2009 - 15:06:26 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:42 UTC