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. .NET (Core and Framework)
  4. help me!!!

help me!!!

Scheduled Pinned Locked Moved .NET (Core and Framework)
c++csharphelptutorialworkspace
4 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.
  • K Offline
    K Offline
    kookoorikoo
    wrote on last edited by
    #1

    I would like to call methods that are written in visual c++ 6.0 from the .NET environment. If you know how to do this, please explain in the most simple way. And if you can also send me a sample I will be glad and thankful! ;P thanks in advance sheli

    G C 2 Replies Last reply
    0
    • K kookoorikoo

      I would like to call methods that are written in visual c++ 6.0 from the .NET environment. If you know how to do this, please explain in the most simple way. And if you can also send me a sample I will be glad and thankful! ;P thanks in advance sheli

      G Offline
      G Offline
      gnjunge
      wrote on last edited by
      #2

      If you have a com or com+ file, you can simply add a reference in VS.NET to that file (VS.NET will automatically create a RCW, a runtime callable wrapper for the file which is like a sort of proxy between the unmanaged code and the managed code) and use it in your .NET code. Gidon

      K 1 Reply Last reply
      0
      • G gnjunge

        If you have a com or com+ file, you can simply add a reference in VS.NET to that file (VS.NET will automatically create a RCW, a runtime callable wrapper for the file which is like a sort of proxy between the unmanaged code and the managed code) and use it in your .NET code. Gidon

        K Offline
        K Offline
        kookoorikoo
        wrote on last edited by
        #3

        Can you please send me an example of such com or com+ file? thanks sheli

        1 Reply Last reply
        0
        • K kookoorikoo

          I would like to call methods that are written in visual c++ 6.0 from the .NET environment. If you know how to do this, please explain in the most simple way. And if you can also send me a sample I will be glad and thankful! ;P thanks in advance sheli

          C Offline
          C Offline
          Chua Wen Ching
          wrote on last edited by
          #4

          Hi, You can look into p/invoke! Just assume that you have a C++ dll, and you want to call into your C# application. [DllImport("yourapp.dll")] internal static extern int SomeMethod(); Hope it helps. Cheers. Regards, Chua Wen Ching Visit us at http://www.necoders.com

          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