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. C# DLL from C++ DLL

C# DLL from C++ DLL

Scheduled Pinned Locked Moved C#
helpcsharpc++tutorial
2 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.
  • A Offline
    A Offline
    Andrei Ungureanu
    wrote on last edited by
    #1

    Hy, I need a little more help :-D. I have a DLL created in C++ which has some methods that interest me. Now I want to use this DLL in C# so I created another DLL in C# which uses the one made in C++. Only I have a few problem. Most of the methods from the C++ DLL need pointers as parameters. For example one method in C++ needs a BYTE* as parameter. I tried from C# to send a BYTE[] but it doen't help me. I also tried with REF but it still doesn't work. If I return a BYTE* from C++ and read it into a BYTE[] an error occurs "Can Not marshal return value". A little help will be welcomed. Thanks

    I 1 Reply Last reply
    0
    • A Andrei Ungureanu

      Hy, I need a little more help :-D. I have a DLL created in C++ which has some methods that interest me. Now I want to use this DLL in C# so I created another DLL in C# which uses the one made in C++. Only I have a few problem. Most of the methods from the C++ DLL need pointers as parameters. For example one method in C++ needs a BYTE* as parameter. I tried from C# to send a BYTE[] but it doen't help me. I also tried with REF but it still doesn't work. If I return a BYTE* from C++ and read it into a BYTE[] an error occurs "Can Not marshal return value". A little help will be welcomed. Thanks

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      could you paste the C++ definition and your c# definition please. 1 line of code equals many bugs. So don't write any!!

      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