Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

pipe

f69robertf69robert Posts: 2Member
Hello,
I am trying to create a program that communicates with separate programs using pipes. I have found many examples where the Visual Basic app creates the process. In my case I need to have the other program start my VB app and communicate with it (using pipes).

Comments

  • infidelinfidel Posts: 2,900Member
    : Hello,
    : I am trying to create a program that communicates with separate programs using pipes. I have found many examples where the Visual Basic app creates the process. In my case I need to have the other program start my VB app and communicate with it (using pipes).

    The only way I know if is to use the FileSystemObject in the Microsoft Scripting Runtime (look in your Project->References dialog):

    [code]
    Dim fs As FileSystemObject
    Dim istream As TextStream
    Dim ostream As TextStream
    Dim estream As TextStream

    Set fs = New Scripting.FileSystemObject
    Set istream = fs.GetStandardStream(StandardStreamTypes.StdIn)
    Set ostream = fs.GetStandardStream(StandardStreamTypes.StdOut)
    Set estream = fs.GetStandardStream(StandardStreamTypes.StdErr)
    [/code]

    I'm sure there are API calls that can get these handles and read/write on them, but this is so much easier.

    Bear in mind that the streams don't really exist, per se, when the code is running in IDE, so if you're in debug mode, these calls will raise errors.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

Sign In or Register to comment.