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 use simple c++ console app in C#

How to use simple c++ console app in C#

Scheduled Pinned Locked Moved C#
csharpc++tutorial
7 Posts 5 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.
  • H Offline
    H Offline
    hg2705
    wrote on last edited by
    #1

    Can some one point me in the right direction on how to implement a smal C++ console app in Csharp.

    S V 2 Replies Last reply
    0
    • H hg2705

      Can some one point me in the right direction on how to implement a smal C++ console app in Csharp.

      S Offline
      S Offline
      Stefan Troschuetz
      wrote on last edited by
      #2

      For clarification: 1. Do you want to use or implement the C++ console app in C#? (Whereas the second doesn't make any sense to me, cause how should i implement a C++ app with C#) 2. What exactly do you mean by use (if that's what you want)?


      www.troschuetz.de

      H 1 Reply Last reply
      0
      • S Stefan Troschuetz

        For clarification: 1. Do you want to use or implement the C++ console app in C#? (Whereas the second doesn't make any sense to me, cause how should i implement a C++ app with C#) 2. What exactly do you mean by use (if that's what you want)?


        www.troschuetz.de

        H Offline
        H Offline
        hg2705
        wrote on last edited by
        #3

        I'm implementing two diferrent code parts. I'ts a chessplay. I have the functionality in C++. Now a want to add a GUI to the game. So a want to use functions in C++ from C#

        S D 2 Replies Last reply
        0
        • H hg2705

          I'm implementing two diferrent code parts. I'ts a chessplay. I have the functionality in C++. Now a want to add a GUI to the game. So a want to use functions in C++ from C#

          S Offline
          S Offline
          Stefan Troschuetz
          wrote on last edited by
          #4

          I think you'll have to pinvoke the functions. But I'm not sure if it's possible when there inside a console app. Didn't use it much besides calling some win32 apis.


          www.troschuetz.de

          1 Reply Last reply
          0
          • H hg2705

            I'm implementing two diferrent code parts. I'ts a chessplay. I have the functionality in C++. Now a want to add a GUI to the game. So a want to use functions in C++ from C#

            D Offline
            D Offline
            Dan Neely
            wrote on last edited by
            #5

            You can attach your own streams to a System.Diagnostics.Process class object to send/recieve console style input.

            1 Reply Last reply
            0
            • H hg2705

              Can some one point me in the right direction on how to implement a smal C++ console app in Csharp.

              V Offline
              V Offline
              Vasudevan Deepak Kumar
              wrote on last edited by
              #6

              If you want to launch C++ app in C#, you can use Process.Start (System.Diagnostics namespace) Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
              http://deepakvasudevan.blogspot.com/
              http://deepak.blogdrive.com/

              E 1 Reply Last reply
              0
              • V Vasudevan Deepak Kumar

                If you want to launch C++ app in C#, you can use Process.Start (System.Diagnostics namespace) Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
                http://deepakvasudevan.blogspot.com/
                http://deepak.blogdrive.com/

                E Offline
                E Offline
                Expert Coming
                wrote on last edited by
                #7

                Maybe you want to make your own DLL with the console functions, and methods.

                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