[vwnc] Call External Object

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Call External Object

Michael Gross-4

Hi,

      I need to call an external program from Smalltalk (an .exe on a windows) and get a return code back from it.

I was wondering what the simplest way to do this within Smalltalk.

I can call the module successfully but, I cannot  get the return code.

 

Thanks!

 

 

Michael Gross

Blue Heron Consulting
90 Airpark Dr, Suite 200
Rochester, NY 14624
www.BlueHeron-Consulting.com
Office: 800-253-3449 / 585-464-8035 (x207)
Fax:    800-464-9901 / 585-464-9760

 

 


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Call External Object

Chris Winemiller
Michael Gross wrote:

Hi,

      I need to call an external program from Smalltalk (an .exe on a windows) and get a return code back from it.

I was wondering what the simplest way to do this within Smalltalk.

I can call the module successfully but, I cannot  get the return code.

I'm assuming you want to get the exit code from the external program, when it quits.  You should invoke #GetExitCodeProcess:lpExitCode: defined on Win95SystemSupport.

Chris
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Call External Object

Boris Popov, DeepCove Labs (SNN)
ExternalProcess cshOne: 'ping localhost'
 
'Pinging dcl-grizzly.yvr.png [127.0.0.1] with 32 bytes of data:
 
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
 
Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms'

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments.

Thank you.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Winemiller
Sent: Thursday, February 05, 2009 9:21 AM
To: Michael Gross
Cc: [hidden email]
Subject: Re: [vwnc] Call External Object

Michael Gross wrote:

Hi,

      I need to call an external program from Smalltalk (an .exe on a windows) and get a return code back from it.

I was wondering what the simplest way to do this within Smalltalk.

I can call the module successfully but, I cannot  get the return code.

I'm assuming you want to get the exit code from the external program, when it quits.  You should invoke #GetExitCodeProcess:lpExitCode: defined on Win95SystemSupport.

Chris
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Call External Object

Michael Gross-4

Hi Boris,

                Thanks for the code. I tried your example and  I got the same output.

When I try my program I am not getting any output, it is blank. It looks like nothing is there?

If you guys know ……..where should the program I am calling put its output so I can grab it like the example below?

 

 

Thanks !!!!

 

Mike

 

From: Boris Popov [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 12:30 PM
To: Chris Winemiller; Michael Gross
Cc: [hidden email]
Subject: RE: [vwnc] Call External Object

 

ExternalProcess cshOne: 'ping localhost'

 

'Pinging dcl-grizzly.yvr.png [127.0.0.1] with 32 bytes of data:

 

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

 

Ping statistics for 127.0.0.1:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 0ms, Average = 0ms'

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments.

Thank you.

 

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Winemiller
Sent: Thursday, February 05, 2009 9:21 AM
To: Michael Gross
Cc: [hidden email]
Subject: Re: [vwnc] Call External Object

Michael Gross wrote:

Hi,

      I need to call an external program from Smalltalk (an .exe on a windows) and get a return code back from it.

I was wondering what the simplest way to do this within Smalltalk.

I can call the module successfully but, I cannot  get the return code.

I'm assuming you want to get the exit code from the external program, when it quits.  You should invoke #GetExitCodeProcess:lpExitCode: defined on Win95SystemSupport.

Chris


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Call External Object

Boris Popov, DeepCove Labs (SNN)
To stdout AFAIK.

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header.
Unless otherwise indicated, it contains information that is private and
confidential. If you have received it in error, please notify the sender
and delete the entire message including any attachments.

Thank you.
-----Original Message-----
From: Michael Gross [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 9:52 AM
To: Boris Popov; Chris Winemiller
Cc: [hidden email]
Subject: RE: [vwnc] Call External Object

Hi Boris,

                Thanks for the code. I tried your example and  I got the
same output.

When I try my program I am not getting any output, it is blank. It looks
like nothing is there?

If you guys know ........where should the program I am calling put its
output so I can grab it like the example below?

 

 

Thanks !!!!

 

Mike

 

From: Boris Popov [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 12:30 PM
To: Chris Winemiller; Michael Gross
Cc: [hidden email]
Subject: RE: [vwnc] Call External Object

 

ExternalProcess cshOne: 'ping localhost'

 

'Pinging dcl-grizzly.yvr.png [127.0.0.1] with 32 bytes of data:

 

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

 

Ping statistics for 127.0.0.1:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 0ms, Average = 0ms'

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header.
Unless otherwise indicated, it contains information that is private and
confidential. If you have received it in error, please notify the sender
and delete the entire message including any attachments.

Thank you.

 

 

________________________________

From: [hidden email] [mailto:[hidden email]] On
Behalf Of Chris Winemiller
Sent: Thursday, February 05, 2009 9:21 AM
To: Michael Gross
Cc: [hidden email]
Subject: Re: [vwnc] Call External Object

Michael Gross wrote:

Hi,

      I need to call an external program from Smalltalk (an .exe on a
windows) and get a return code back from it.

I was wondering what the simplest way to do this within Smalltalk.

I can call the module successfully but, I cannot  get the return code.

I'm assuming you want to get the exit code from the external program,
when it quits.  You should invoke #GetExitCodeProcess:lpExitCode:
defined on Win95SystemSupport.

Chris


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Call External Object

Alan Knight-2
In reply to this post by Michael Gross-4
I believe exitStatus sent to the ExternalProcess instance will give you that.

At 11:48 AM 2/5/2009, Michael Gross wrote:
Content-Language: en-US
Content-Type: multipart/alternative;
         boundary="_000_F10A502062263A4E86B3045FCA7C31AD327156D626EXVMBX0032exc_"

Hi,
      I need to call an external program from Smalltalk (an .exe on a windows) and get a return code back from it.
I was wondering what the simplest way to do this within Smalltalk.
I can call the module successfully but, I cannot  get the return code.
 
Thanks!
 
 
Michael Gross
Blue Heron Consulting
90 Airpark Dr, Suite 200
Rochester, NY 14624
www.BlueHeron-Consulting.com
Office: 800-253-3449 / 585-464-8035 (x207)
Fax:    800-464-9901 / 585-464-9760
 
 
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

--
Alan Knight [|], Engineering Manager, Cincom Smalltalk

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc