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 Marshall (DLL::MyClass) object in a VS2005-C# App?

How to Marshall (DLL::MyClass) object in a VS2005-C# App?

Scheduled Pinned Locked Moved C#
csharphelptutorialquestion
3 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.
  • J Offline
    J Offline
    jayart
    wrote on last edited by
    #1

    Hi, An application written in C#-VS2005 needs to use a class exported in a VC6Dll. I have googled around a bit about Data Marshalling using P/Invoke. But all I could find is information on how to use the exported functions from a dll OR a struct from a dll. I could not find any info on how to use the (exported,unmanaged) class of the dll in my C# App. Any help or link woud be helpful. Thanks and Regards, Arti Gujare

    L 1 Reply Last reply
    0
    • J jayart

      Hi, An application written in C#-VS2005 needs to use a class exported in a VC6Dll. I have googled around a bit about Data Marshalling using P/Invoke. But all I could find is information on how to use the exported functions from a dll OR a struct from a dll. I could not find any info on how to use the (exported,unmanaged) class of the dll in my C# App. Any help or link woud be helpful. Thanks and Regards, Arti Gujare

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      http://pinvoke.net[^]

      led mike

      J 1 Reply Last reply
      0
      • L led mike

        http://pinvoke.net[^]

        led mike

        J Offline
        J Offline
        jayart
        wrote on last edited by
        #3

        Hi Led, I did have a look at this site. For each class to be used from the dll a skeleton(StructLayout) of that class has to be defined in the project using that dll. However, the dll I am talking about is huge and consists of too many classes. I have approximately 16 exported classes which I would be using. 1) Is there a better way to do this? These classes again have member variable as objects of other classes not exposed from the dll. 2) Could you tell me how to write the StructLayout for a class having private members as objects of other classes. Regards, Arti Gujare

        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