using the Console

Started by
2 comments, last by raz0r 18 years, 1 month ago
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?
A JPEG is worth a thousand and twenty four DWORD's. ;)
Note: Due to vacationing my website will not be updated till late-August. Of course I still have internet, but who wants to program during a vacation?
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...
The system() command?
Mike Popoloski | Journal | SlimDX
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. =\

This topic is closed to new replies.

Advertisement