Sign in to follow this  
geekalert

using the Console

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this