Visual Basic 6 DOS CMD Console applications STDIO/STDERR
Posted: Wed Apr 06, 2005 9:00 am
BB
Regular
Joined: Jun 23, 2004
Posts: 340
Do you have a 32 bit Application or API set that you want to run from a Windows command line? I found the CAP VB6 modules and IDE plugin application to be very useful. It allows STDIN/STDOUT/STDERR outputs that can be piped to other command line applications.
Quote:
CAP lets you create and compile "true" console applications with VB6. "True" as in: Not those cheesy things that open up a new console window! Instead, a console app made with CAP will run in a DOS console (or a cmd.exe session).
The download and good information can be found here at Planet Source Code. Read the comments in the download page to understand exactly what is going on. It adds a popup box to your build exe step in the Visual Studio 6/ Visual Basic 6 linking process.
I have used this twice to build some command line applications that use our software vendor's 32 bit API . This enabled me to complete some automated import and export applications that I could run through DOS/CMD batch files or using a PERL (ActiveState) harness. I have used this with Windows 2000, Windows XP, and Windows 2003 successfully.
Here is the title from the PSCode web site:
Quote:
Console Applications with VB6 - CAP.exe and basDosConsole.bas
Program : CAP.exe
Author : gridrun [TNC]
Version : 1.0.0
Platform : Win32 [tested on 98/2K]
Requires : msvbvm60.dll [VB runtime]
Here is the abstract from the readme file
Abstract
Quote:
Normally, it is not possible for a Visual Basic 6 coder to create a "true"
console application. VB6 itself doesnt provide any means to do so, and
most console application classes and modules I saw so far, do not provide
the ability to run as a "true" console application either. Instead, the
bulk of those modules allocates a new console window for your application.
With CAP.exe and basDosConsole.bas however, you'll be able to create
"real" console applications that run *inside* a cmd.exe console, for
example. basDosConsole.bas based applications furthermore optionally
support STDIO, enabling DOS redirecton of your console applications.
And last, but not least, basDosConsole gives you the ability to debug
your console applications right in the VB IDE, without having to resort
to output log files and the like.
I did not find any other console application tool that offers STDIO as
well as debugging in IDE, with no reliance on Windows Scripting Host.
Enjoy
Note that the text file points to http://softlabs.spacebitch.com for updates. But no such web page is available at the present time.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest (c) 2006 by Group29 Productions.
You can syndicate Group29 Productions news with an RSS Feeder using the file backend.php