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#
  4. How to call C++ program from C# program

How to call C++ program from C# program

Scheduled Pinned Locked Moved C#
csharpc++helptutorialquestion
3 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.
  • S Offline
    S Offline
    shimin
    wrote on last edited by
    #1

    :)Hello everyone, I have been working on C# programs, my friend gave me a C++ program that is useful to me and i need to call that C++ program from my C# program. Is there a way to do that? Thanks for any help in advance :) min

    A 1 Reply Last reply
    0
    • S shimin

      :)Hello everyone, I have been working on C# programs, my friend gave me a C++ program that is useful to me and i need to call that C++ program from my C# program. Is there a way to do that? Thanks for any help in advance :) min

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      It depends on what you mean by "call". If you mean "executed the executable", you can use the Process class to spawn out a new process. If you mean "call into the code", look at this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp12192002.asp

      T 1 Reply Last reply
      0
      • A Anonymous

        It depends on what you mean by "call". If you mean "executed the executable", you can use the Process class to spawn out a new process. If you mean "call into the code", look at this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp12192002.asp

        T Offline
        T Offline
        Thomas Lau
        wrote on last edited by
        #3

        if you Call the .exe file.You can call the API :ShellExecute().Of course,you must import the function at first.;)

        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