• Advertisement
Sign in to follow this  

using the Console

This topic is 4327 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

is there any way to call a DOS function from an application, and get the results from it? what i mean is, for example, i want to use the "ping" command in my windows application. is there any way to 1. open up the console, 2. give the console commands ("ping 192.168.2.xxx") and 3. get the results ("destination host unreachable or somethinh") and all thru C++/Win32/whatever i need/and then some?

Share this post


Link to post
Share on other sites
Advertisement
You can redirect output using a pipe.

Also, you could always do something like this:

№ 1. Execute "ping www.google.ru > C:\Dump.txt"
№ 2. Parse Dump.txt
№ 3. Delete Dump.txt

Hope that helps...

Share this post


Link to post
Share on other sites
Quote:
Original post by ussnewjersey4
The system() command?


I think he only wants to show the end-user some of the output...
Then again, I might be wrong. =\

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement