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. dev-c++ to "call" another program

dev-c++ to "call" another program

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
9 Posts 4 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.
  • R Offline
    R Offline
    RealHigh
    wrote on last edited by
    #1

    Hello, I tried to put a programme into the main one as a function, but it didn´t work. Is there a way to "call" another program from the main one? Please don´t use much technical language, as I´m only beginning. All help would be much appreciated.

    L L C 3 Replies Last reply
    0
    • R RealHigh

      Hello, I tried to put a programme into the main one as a function, but it didn´t work. Is there a way to "call" another program from the main one? Please don´t use much technical language, as I´m only beginning. All help would be much appreciated.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      I suggest you look here[^]. :)

      Luc Pattyn [My Articles] Nil Volentibus Arduum

      1 Reply Last reply
      0
      • R RealHigh

        Hello, I tried to put a programme into the main one as a function, but it didn´t work. Is there a way to "call" another program from the main one? Please don´t use much technical language, as I´m only beginning. All help would be much appreciated.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        I think you want to launch another program in your application. ::ShellExecute(NULL,_T("open"),_T("notepad.exe"),NULL,NULL,SW_SHOWNORMAL); It will launch notepad.exe. Regards

        R 1 Reply Last reply
        0
        • R RealHigh

          Hello, I tried to put a programme into the main one as a function, but it didn´t work. Is there a way to "call" another program from the main one? Please don´t use much technical language, as I´m only beginning. All help would be much appreciated.

          C Offline
          C Offline
          Chuck OToole
          wrote on last edited by
          #4

          The first two replies suggest "ShellExecute". However, that's "launch", not "call" as a function. If you want a "return value" or other "results" of the program[me] then you will need a more technical discussion on what you want. CreateProcess()[^] allows you to monitor the completion, get the completion status (which could mean anything to your application, like a result) or do other ways of getting more complex results. Good luck.

          R 1 Reply Last reply
          0
          • L Lost User

            I think you want to launch another program in your application. ::ShellExecute(NULL,_T("open"),_T("notepad.exe"),NULL,NULL,SW_SHOWNORMAL); It will launch notepad.exe. Regards

            R Offline
            R Offline
            RealHigh
            wrote on last edited by
            #5

            Hi Pranit, Thanks for the info. Do I need a special header for ::ShellExecute, type include for devc++?

            C L 2 Replies Last reply
            0
            • R RealHigh

              Hi Pranit, Thanks for the info. Do I need a special header for ::ShellExecute, type include for devc++?

              C Offline
              C Offline
              Chuck OToole
              wrote on last edited by
              #6

              Follow the link provided by Luc. Since you are only beginning, this will serve you well. The documentation he points to contains everything you need to know about including it, the "prerequesite calls" and the header file that must be included. MSDN documentation follows that standard for all the calls so you can determine that for anything. No need to ask and sit and wait for someone to answer, it's all in your hands.

              1 Reply Last reply
              0
              • R RealHigh

                Hi Pranit, Thanks for the info. Do I need a special header for ::ShellExecute, type include for devc++?

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Shellapi.h

                R 1 Reply Last reply
                0
                • C Chuck OToole

                  The first two replies suggest "ShellExecute". However, that's "launch", not "call" as a function. If you want a "return value" or other "results" of the program[me] then you will need a more technical discussion on what you want. CreateProcess()[^] allows you to monitor the completion, get the completion status (which could mean anything to your application, like a result) or do other ways of getting more complex results. Good luck.

                  R Offline
                  R Offline
                  RealHigh
                  wrote on last edited by
                  #8

                  Hi Chuck, Your reply seems just what I need. Sorry about the lack of information, it´s just lack of experience on my part. What I´m trying to do is to read an entering car´s number plate, which is done by ANPR camera and software (bought) which includes OCR,get the number plate from this program, then compare it with about 400 registered cars. If a match is found, another program sets one of the pins of the parallel port, so I´ve got to execute my 3 programs sequentially to achieve the desired result. The main program fills in a database with number plate, address and owner name, with editing facility. My second program gets the entering number plate and checks it against the forementioned list, and the third program lets the car in by opening the gate if the compare is true. Well, that´s about it. Of course, I´m struggling along trying to keep afloat, and the replies I´ve had have all pointed in the right direction, I think. If you have any suggestions at all which could help, I´ll gratefully accept. Thanks again..

                  1 Reply Last reply
                  0
                  • L Lost User

                    Shellapi.h

                    R Offline
                    R Offline
                    RealHigh
                    wrote on last edited by
                    #9

                    Hi Pranit, Thanks a lot. I thence dowloaded the latest version and installed it.

                    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