|
-
May 2nd, 2002, 09:37 AM
#1
Thread Starter
Junior Member
Standard Output
Hi,
does anyone know if you can write to standard output using Visual Basic ?
(in the way you do with java, ie system.out.println("blah")
I know how to create a console window, but would prefer to be able to update the same window that the program was run from (ie command prompt window)
And suggestions would be greatly appreciated!!
Zinedine!!
-
May 2nd, 2002, 09:42 AM
#2
Bouncy Member
VB Code:
Private Sub Form_Load()
MsgBox "blah"
'or
Text1.Text = "blah"
End Sub
-
May 2nd, 2002, 09:48 AM
#3
Thread Starter
Junior Member
no, I mean printing to the DOS prompt or command prompt - not to form controls or message boxes!!
(thanks for the response though)
-
May 2nd, 2002, 10:17 AM
#4
Black Cat
To write to Standard Output, use the GetStdHandle APi call to get a handle to it, then use the WriteFile API to write to the handle.
However, to be able to correctly write to STDOUT when run from a command prompt, you need to binary patch your compiled .exe - a mkconsole utility is here (you do not need this patch in a CGI environment, etc):
http://mvps.org/st-software/
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Oct 4th, 2002, 07:06 PM
#5
Frenzied Member
I could use some help from anyone who knows stdout on the lower level.
I have written a vb app as a console application and patched it. When I fun it from command line in winxp it works fine (output text and returns with an exit code) but when we try to run it with Enterprise ControlStation (A program that schedules and launches programs) it doesn't detect any sysout what so ever from the application. When running a REXX or C++ program with ECS it works fine. Is it possible that the sysout is put somewhere else when using kernel32 apis in vb to srite to stdout?
Anyone know any tricks I can try?
kind regards
Henrik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|