IT Community - Software Programming, Web Development and Technical Support

How can I invoke another program or command and trap its output in C?

This is a discussion on How can I invoke another program or command and trap its output in C? within the C and C++ Programming forums, part of the Software Development category; How can I invoke another program or command and trap its output in C language?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C and C++ Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-17-2007, 03:41 AM
Sabari Sabari is offline
D-Web Genius
 
Join Date: Jul 2007
Posts: 1,008
Sabari is on a distinguished road
Default How can I invoke another program or command and trap its output in C?

How can I invoke another program or command and trap its output in C language?
__________________
Thanks & Regards
Sabari...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-17-2007, 04:01 AM
prasath prasath is offline
D-Web Sr.Programmer
 
Join Date: Jul 2007
Location: Chennai
Posts: 173
prasath is on a distinguished road
Default Re: How can I invoke another program or command and trap its output in C?

Hi,
Unix and some other systems provide a popen() routine, which sets up a stdio stream on a pipe connected to the process running a command, so that the output can be read (or the input supplied). Alternately, invoke the command simply in such a way that it writes its output to a file, then open and read that file

Thanks,
Prasath.K
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP Web Response Exception - I cant able to trap. prasannavigneshr Windows Mobile 27 09-19-2007 08:28 AM
How to call a program using the command prompt from ASP.NET. Basically all it needs itbarota ASP and ASP.NET Programming 1 07-26-2007 12:05 AM
How to launch Real Player program through my j2me midlet program? itbarota J2ME 1 07-25-2007 11:39 PM
when the program is executing,how to stop the program and open the cmd window... bluesky C# Programming 1 07-25-2007 05:51 AM
How can I invoke another program from C? Sabari C and C++ Programming 1 07-17-2007 04:05 AM


All times are GMT -7. The time now is 06:43 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0