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. To use C++ DLL in C#.

To use C++ DLL in C#.

Scheduled Pinned Locked Moved C#
csharpc++help
7 Posts 2 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
    Syed Mujtaba Hassan
    wrote on last edited by
    #1

    Could please someone tell me what are the pre requsites for a C++ dll to be used in C#. I am having problem in using C++ dll in my C# code.

    Mujtaba

    C 1 Reply Last reply
    0
    • S Syed Mujtaba Hassan

      Could please someone tell me what are the pre requsites for a C++ dll to be used in C#. I am having problem in using C++ dll in my C# code.

      Mujtaba

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      It needs to export something, either as a normal dll, or through COM or .NET. Perhaps if you gave us some details ?

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      S 1 Reply Last reply
      0
      • C Christian Graus

        It needs to export something, either as a normal dll, or through COM or .NET. Perhaps if you gave us some details ?

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        S Offline
        S Offline
        Syed Mujtaba Hassan
        wrote on last edited by
        #3

        I want to use a normal dll that contains a simple class and I want to create an object of that class in my C# code.

        Mujtaba

        C 1 Reply Last reply
        0
        • S Syed Mujtaba Hassan

          I want to use a normal dll that contains a simple class and I want to create an object of that class in my C# code.

          Mujtaba

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          I'm not sure if you can do that, because I don't believe you can use p/invoke to export a class from a C++ dll. Why don't you want to use managed C++ ?

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

          S 1 Reply Last reply
          0
          • C Christian Graus

            I'm not sure if you can do that, because I don't believe you can use p/invoke to export a class from a C++ dll. Why don't you want to use managed C++ ?

            Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

            S Offline
            S Offline
            Syed Mujtaba Hassan
            wrote on last edited by
            #5

            I am not having detailed concept of that but now I am starting managed C++. Could you give me any links about it?

            Mujtaba

            C 1 Reply Last reply
            0
            • S Syed Mujtaba Hassan

              I am not having detailed concept of that but now I am starting managed C++. Could you give me any links about it?

              Mujtaba

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Nish has written heaps of articles about it, and has a blog as well, I'd read those.

              Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

              S 1 Reply Last reply
              0
              • C Christian Graus

                Nish has written heaps of articles about it, and has a blog as well, I'd read those.

                Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

                S Offline
                S Offline
                Syed Mujtaba Hassan
                wrote on last edited by
                #7

                OK Thanx very much. So nice of you.

                Mujtaba

                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