Results 1 to 7 of 7

Thread: Output from DOS programs

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Posts
    14
    You know how you can use a DOS program in the prompt window and interact with it? Well, how can you write your own console like that? I'm not too interested in writing a console, but I do want to be able to recieve feedback when I execute a DOS program from mine.

  2. #2
    Member
    Join Date
    Feb 2001
    Posts
    52

    Lightbulb output from DOS program

    hi,
    i wanted to do the same thing .
    If u want to just get the results y not redirect ur o/p of a program to a file and read it?
    eg:
    if u want to get output of dir/p/w
    open up a batch file,
    redirect by typing dir/p/w >>x.txt
    and use shell "c:\x.txt",1
    to open it?

    one question :
    how r u executing ur dos program?
    lxs

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Posts
    14
    The outputing to a file does not apply to all DOS programs, so it is not the answer I need. Matter of fact, that is the only answer anybody has ever given me.

    I'll execute it by either using the built in Shell function or the API ShellExecute function. I use either one depending on the circumstances.

  4. #4
    New Member
    Join Date
    Apr 2001
    Location
    Oslo
    Posts
    13
    Hi, I looked through some code I have, and found that if you want to read output from a DOS program on the console, you can do that with ReadConsole(). IT is in the Kernel32.dll. If you want a code example, I'll send it to you, or put some here....

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Posts
    14
    I've done some research into it and found a whole suite of console related functions in the MSDN. That is excellent, and I believe this is exactly what I was looking for. Thank you very much! However, the API Guide at www.allapi.net doesn't give an example of it's use. All I have to go on is the MSDN and the allapi.net toolshed which gives me the VB syntax for the functions.

    So I'd very much appreciate it if you have an example to send me either here or as an attachment to [email protected]. I'm so greatful that I'd be willing to help you out on any question that you may have concerning VB or API. I just may be able to be of some help.

    You are the first person to actually answer a question of mine correctly. As time goes by it gets harder and harder to find solutions to my problems.
    Last edited by HA_VBCoder; Apr 16th, 2001 at 05:16 PM.

  6. #6
    Member
    Join Date
    Feb 2001
    Posts
    52

    Post Output from DOS programs

    hi,

    i'd like to hav the copy of the code too!!!
    thanks,
    lxs
    lxs

  7. #7
    New Member
    Join Date
    Apr 2001
    Location
    USA
    Posts
    2
    I'm also banging around on the whole recieving interaction with the DOS program and am kind of having a bit of trouble getting the right API calls in order. I'd like to see the code for that too. could you please post here or send it to me too at [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width