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. refference a pointer to another process !!!

refference a pointer to another process !!!

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
4 Posts 3 Posters 1 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.
  • M Offline
    M Offline
    mr2003
    wrote on last edited by
    #1

    Hi, I have to programs, both written in MDI, MFC, I am able to call the executable of program2 from program1, by using CreateProcess method. My question is, How can I call the methods of program2, within program1. or how can I have a pointer to the View class of program2 from program1. Thanks Ehsan Behboudi

    V B 2 Replies Last reply
    0
    • M mr2003

      Hi, I have to programs, both written in MDI, MFC, I am able to call the executable of program2 from program1, by using CreateProcess method. My question is, How can I call the methods of program2, within program1. or how can I have a pointer to the View class of program2 from program1. Thanks Ehsan Behboudi

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      They are two processes in different address spaces. You cannot access objeects between address spaces. One solution to sharing data is file-mapping. Another solution is pipe. Another solution is WM_COPYDATA. Kuphryn

      1 Reply Last reply
      0
      • M mr2003

        Hi, I have to programs, both written in MDI, MFC, I am able to call the executable of program2 from program1, by using CreateProcess method. My question is, How can I call the methods of program2, within program1. or how can I have a pointer to the View class of program2 from program1. Thanks Ehsan Behboudi

        B Offline
        B Offline
        Babayan Hovhannes
        wrote on last edited by
        #3
        1. You can use Automatization. You must create type library from View class of program2, and after calling CreateProcess in program1, attach to running Program2's instance. You can provide values, with which you would be able to change variable values in program2, from program1, execute some code in program2(methods), etc. program2 will be server of Automatization and program1 will be client n this case. yiy
        M 1 Reply Last reply
        0
        • B Babayan Hovhannes
          1. You can use Automatization. You must create type library from View class of program2, and after calling CreateProcess in program1, attach to running Program2's instance. You can provide values, with which you would be able to change variable values in program2, from program1, execute some code in program2(methods), etc. program2 will be server of Automatization and program1 will be client n this case. yiy
          M Offline
          M Offline
          mr2003
          wrote on last edited by
          #4

          hi, can u provide me witha little source code? Ehsan Behboudi

          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