Command output

Capture the output of a console application into a VB String
Download

Command output Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Publisher Name:
  • Karl E. Peterson
  • Publisher web site:
  • Operating Systems:
  • Windows XP/2000/98/Me/NT
  • File Size:
  • 47KB

Command output Tags


Command output Description

Advertisement Command output is a Development software developed by Karl E. Peterson. After our trial and test, the software is proved to be official, secure and free. Here is the official description for Command output: This ZIP file contains two samples demonstrating how you can Capture the output of a console application into a VB String. They are both based on a generic module, MGetCmdOutput.bas. This module returns the output written to STDOUT and/or STDERR, and optionally converts "DOS" to "Windows" characters. Sample 1 is a very basic sample, demonstrating only what the module is capable of by launching a demo application (ConsoleApp.exe, C++ source included) and displays its output in a message box. Sample 2 is a Command Prompt program that lets you enter any command you want and view its output. Details To setup the redirection of output, the first step is to create pipes (in this case anonymous) with the CreatePipe API. The returned pipe handles are set as output handles for the application being launced, in the STARTUPINFO structure in a call to CreateProcess. Data written to the pipe is read, using ReadFile, until the launced application terminates. It is not possible to directly redirect the output of a 16-bit process to a GUI application running under Windows 9x. If you try to do so, ReadFile will never return and your program will be blocked. This is documented in MS Knowledge Base article Q150956, see the links below.


Command output Related Software