Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Command Prompt

Command Prompt

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++helptutorialworkspace
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Try
    wrote on last edited by
    #1

    Hello Guys, I have a controller device (RTOS). I connect to it using "telnet". c:\>telnet ipaddress When i connect to device through telnet, it will show the menu for configuration of device. For example: Press 1 to view configuration. Press 2 to change configuration. ........... Now I want capture the same and display it on my form. And also I want to provide buttons for "View Configuration" and "Change Configuration". ITS LIKE PROVIDING GUI FOR COMMAND PROMPT. How can i do it in VC++? Please Help Me.

    B K 2 Replies Last reply
    0
    • T Try

      Hello Guys, I have a controller device (RTOS). I connect to it using "telnet". c:\>telnet ipaddress When i connect to device through telnet, it will show the menu for configuration of device. For example: Press 1 to view configuration. Press 2 to change configuration. ........... Now I want capture the same and display it on my form. And also I want to provide buttons for "View Configuration" and "Change Configuration". ITS LIKE PROVIDING GUI FOR COMMAND PROMPT. How can i do it in VC++? Please Help Me.

      B Offline
      B Offline
      Benoy Bose
      wrote on last edited by
      #2

      It is better to use Windows Pipeline ( for stdioIn and stdioOut ) with the tellnet application. You can read the output ( or write to the input ) of console application to ( or from ) a win32 application through pipelining the stdio file of the console application.

      T 1 Reply Last reply
      0
      • B Benoy Bose

        It is better to use Windows Pipeline ( for stdioIn and stdioOut ) with the tellnet application. You can read the output ( or write to the input ) of console application to ( or from ) a win32 application through pipelining the stdio file of the console application.

        T Offline
        T Offline
        Try
        wrote on last edited by
        #3

        Thank you so much for the solution. Will you please give some more information related to Pipeline? (Like, Which Class in Win32? What is stdio file?)

        B 1 Reply Last reply
        0
        • T Try

          Hello Guys, I have a controller device (RTOS). I connect to it using "telnet". c:\>telnet ipaddress When i connect to device through telnet, it will show the menu for configuration of device. For example: Press 1 to view configuration. Press 2 to change configuration. ........... Now I want capture the same and display it on my form. And also I want to provide buttons for "View Configuration" and "Change Configuration". ITS LIKE PROVIDING GUI FOR COMMAND PROMPT. How can i do it in VC++? Please Help Me.

          K Offline
          K Offline
          kakan
          wrote on last edited by
          #4

          You can use _popen(), _wpopen() They handles the pipe redirection for you. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__popen.2c_._wpopen.asp[^]

          Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

          1 Reply Last reply
          0
          • T Try

            Thank you so much for the solution. Will you please give some more information related to Pipeline? (Like, Which Class in Win32? What is stdio file?)

            B Offline
            B Offline
            Benoy Bose
            wrote on last edited by
            #5

            As per my knowledge there are no class in MFC for handling pipelineing you have to use windows API like CreatePipe. CreateProcess etc. For extra reference over them please look at allapi.net and search in http://msdn.microsoft.com/library/default.asp

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups