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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Passing values from one exe to another exe

Passing values from one exe to another exe

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
8 Posts 7 Posters 3 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.
  • N Offline
    N Offline
    neha agarwal27
    wrote on last edited by
    #1

    Hello all, I am having two exe's and i am calling one exe from another exe using ShellExecute() function. My problem is i want to pass some variable values from one exe to another. How can i do this?? Thanks in advance

    N D T A H 5 Replies Last reply
    0
    • N neha agarwal27

      Hello all, I am having two exe's and i am calling one exe from another exe using ShellExecute() function. My problem is i want to pass some variable values from one exe to another. How can i do this?? Thanks in advance

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      neha.agarwal27 wrote:

      How can i do this??

      As commandline...

      nave [OpenedFileFinder]

      1 Reply Last reply
      0
      • N neha agarwal27

        Hello all, I am having two exe's and i am calling one exe from another exe using ShellExecute() function. My problem is i want to pass some variable values from one exe to another. How can i do this?? Thanks in advance

        D Offline
        D Offline
        Demian Panello
        wrote on last edited by
        #3

        Hi. You could use the Windows registry. Cheers.

        Demian. "I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone." -Bjarne Stroustrup, computer science professor, designer of C++ programming language (1950- )

        T 1 Reply Last reply
        0
        • N neha agarwal27

          Hello all, I am having two exe's and i am calling one exe from another exe using ShellExecute() function. My problem is i want to pass some variable values from one exe to another. How can i do this?? Thanks in advance

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          neha.agarwal27 wrote:

          My problem is i want to pass some variable values from one exe to another

          when spawning the 2nd program, or during its execution ?


          [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

          1 Reply Last reply
          0
          • N neha agarwal27

            Hello all, I am having two exe's and i am calling one exe from another exe using ShellExecute() function. My problem is i want to pass some variable values from one exe to another. How can i do this?? Thanks in advance

            A Offline
            A Offline
            Amar Sutar
            wrote on last edited by
            #5

            Hi, 1. If variable is required before starting another exe then pass that variable as command line. 2. If you want to pass variable after starting another exe then use Inter Process Communication such as WM_COPYDATA, Pipes and Shared Memory. Amar:)

            T 1 Reply Last reply
            0
            • D Demian Panello

              Hi. You could use the Windows registry. Cheers.

              Demian. "I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone." -Bjarne Stroustrup, computer science professor, designer of C++ programming language (1950- )

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              Demian Panello wrote:

              You could use the Windows registry.

              good software design should not include registry as active place for data share between two application

              1 Reply Last reply
              0
              • A Amar Sutar

                Hi, 1. If variable is required before starting another exe then pass that variable as command line. 2. If you want to pass variable after starting another exe then use Inter Process Communication such as WM_COPYDATA, Pipes and Shared Memory. Amar:)

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #7

                Amar Sutar wrote:

                WM_COPYDATA, Pipes and Shared Memory.

                they are one of best IPC mechanism, but i recommend you discourage use of PIPe.. Window message is also good option

                1 Reply Last reply
                0
                • N neha agarwal27

                  Hello all, I am having two exe's and i am calling one exe from another exe using ShellExecute() function. My problem is i want to pass some variable values from one exe to another. How can i do this?? Thanks in advance

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #8

                  See Inter-Process Communication using WM_COPYDATA[^].

                  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