msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Call and vb6.exe and return values ?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions
Author Message
Bob Riemersma



Joined: 27 Dec 2007
Posts: 54

PostPosted: Wed Feb 27, 2008 11:25 pm    Post subject: Re: Call and vb6.exe and return values ? Reply with quote

"Karl E. Peterson" wrote in message @TK2MSFTNGP04.phx.gbl...
> Bob Riemersma wrote:
>> For simple cases you can use the FSO to get references to the StdIO
>> streams
>> as TextStream objects. Look at the FSO method GetStandardStream():
>>
>> http://msdn2.microsoft.com/en-us/library/y6hbz9es(VS.85).aspx
>
> Wasn't aware that was even available. Prolly not a good idea in all but,
> as you suggest, the simplest cases. But interesting to know about!
>

I understand the limitations of using the FSO in lieu of VB's native I/O.
I'm not sure they hold for low-volume I/O between a parent and child process
that can get by with simple blocking calls. Too bad I've haven't found a
way to use VB I/O against the standard streams.

However in cases where one needs to do a lot more I/O (or even async I/O)
with these streams it is easy enough to craft a Class or UserControl that
makes the necessary API calls.

Your article on VB and Console operations is quite complete, and one of my
own favorites. I've found that in many cases it is overkill for simple
parent/child communications though, and I think this is the sweet spot for
VB when it comes to Console programs. They're great as "worker" processes
for background grunt work.

>> Add-ins of the type Karl mentions work fine too though.
>
> My favorite is now available free -- http://www.vbadvance.com
> --
> .NET: It's About Trust!
> http://vfred.mvps.org

Good news on vbadvance. I might look at it again.

Archived from group: microsoft>public>vb>general>discussion
Back to top
View user's profile Send private message
Karl E. Peterson



Joined: 04 Oct 2007
Posts: 4836

PostPosted: Wed Feb 27, 2008 8:44 pm    Post subject: Re: Call and vb6.exe and return values ? Reply with quote

Hi Bob --

>>> For simple cases you can use the FSO to get references to the StdIO
>>> streams
>>> as TextStream objects. Look at the FSO method GetStandardStream():
>>>
>>> http://msdn2.microsoft.com/en-us/library/y6hbz9es(VS.85).aspx
>>
>> Wasn't aware that was even available. Prolly not a good idea in all but,
>> as you suggest, the simplest cases. But interesting to know about!
>
> I understand the limitations of using the FSO in lieu of VB's native I/O.
> I'm not sure they hold for low-volume I/O between a parent and child process
> that can get by with simple blocking calls. Too bad I've haven't found a
> way to use VB I/O against the standard streams.

What, in this case, do you mean by the "the standard streams"?

> However in cases where one needs to do a lot more I/O (or even async I/O)
> with these streams it is easy enough to craft a Class or UserControl that
> makes the necessary API calls.
>
> Your article on VB and Console operations is quite complete, and one of my
> own favorites. I've found that in many cases it is overkill for simple
> parent/child communications though, and I think this is the sweet spot for
> VB when it comes to Console programs. They're great as "worker" processes
> for background grunt work.

I'm having a hard time disagreeing with any of that. Yeah, my Console module is
*heavy* as heck, but it'll do "anything" a console app would ever need to do.
Afaik, anyway. But you're right about how fabulously utilitarian FSO is for this!
I had absolutely no idea. I've been playing around with that sample on
http://www.tek-tips.com/faqs.cfm?fid=5647 and wondering how I missed this for so
long. Wouldn't do, of course, for any sort of mass-distributed tool. That
scripting runtime is just to fragile (especially given the liklihood of it being
disabled by security nazis in IT!). But for in-house stuff, it sure seems to be the
Q&D way to knock one out! Gotta be *the* best use I've seen for FSO ever.

>>> Add-ins of the type Karl mentions work fine too though.
>>
>> My favorite is now available free -- http://www.vbadvance.com
>
> Good news on vbadvance. I might look at it again.

It's addictive. Smile
--
..NET: It's About Trust!
http://vfred.mvps.org
Back to top
View user's profile Send private message
Kevin Provance



Joined: 04 Oct 2007
Posts: 800

PostPosted: Thu Feb 28, 2008 2:48 am    Post subject: Re: Call and vb6.exe and return values ? Reply with quote

| Did you author it?

It looks as though he did: http://www.angelfire.com/mi4/bvo/vb/vbconio.htm

- Kev

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group