-
September 8th, 2004, 09:13 AM
#1
Registered User
VB - how can I write back to the console that called the program???
Assume I have a program (myvb.exe) that is called from a command prompt. I need to be able to write data BACK to the command prompt - something like printf() in C. The problem is that when a vb app is called, it is being detached from the console. So how do I do it??? Something like:
C:>myvb.exe
Hello World!
C:>
Oh, and it's VB6, not the .NOT
Last edited by CeeBee; September 8th, 2004 at 09:26 AM.
Protected by Glock. Don't mess with me!
-
September 8th, 2004, 09:39 AM
#2
Intel Mod
-
September 8th, 2004, 09:43 AM
#3
Registered User
no, that thing will open a new console, i need to write back to the console that called the app.
Protected by Glock. Don't mess with me!
-
September 8th, 2004, 10:35 AM
#4
Intel Mod
Mmm, I half suspected that.
I guess the problem would be that the calling console being a command prompt is pre-established in its own Virtual Machine.
Would you be able to establish your own console process first to give the command line, then use pipes to re-direct STDOUT of the child process, as suggested by dragonsf about halfway down this post:
http://www.google.com.au/search?q=ca...TRIBUTES&hl=en
Edit: Oops, sorry, wrong language. Does the concept of creating a console app to provide the calling command line help? Probably not...
Last edited by Platypus; September 8th, 2004 at 10:49 AM.
-
September 8th, 2004, 12:55 PM
#5
Registered User
Protected by Glock. Don't mess with me!
-
September 9th, 2004, 09:00 AM
#6
Intel Mod
You can find some good stuff on experts-exchange, especially since they put the hyphen in.
-
September 9th, 2004, 02:40 PM
#7
Registered User
After all it didn't work as I expected. Even if it writes back to the console, when I'm calling it from my web server it doesn't respond with any data (also trying to pipe the output to a text file results in 0 bytes written). I ended up installing VB.NET Express and doing a console project which is now being supported by default (and it works...)
Protected by Glock. Don't mess with me!
Similar Threads
-
By pitlord2 in forum Programming And Web Design
Replies: 0
Last Post: April 22nd, 2004, 04:44 PM
-
By ilovetheusers in forum Tech Lounge & Tales
Replies: 6
Last Post: July 23rd, 2002, 03:04 PM
-
Replies: 3
Last Post: September 7th, 2001, 09:55 PM
-
By ibennetch in forum Programming And Web Design
Replies: 2
Last Post: July 9th, 2001, 08:08 PM
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
|
|
Bookmarks