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. Dll Impot?

Dll Impot?

Scheduled Pinned Locked Moved C#
helpquestion
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.
  • D Offline
    D Offline
    Divyang Mithaiwala
    wrote on last edited by
    #1

    Hello, For importing function i use [DllImport(DLLNAME)] public static extern int function(Type Args); into my class. and it's working fine. But for import variable which is exported by dll this method doesn't work. It will get error that "DllImport is not use for this item only use for method import". And for extern keyword say that this will not use for this item. Plz help me. regards,


    Divyang Mithaiwala

    L 1 Reply Last reply
    0
    • D Divyang Mithaiwala

      Hello, For importing function i use [DllImport(DLLNAME)] public static extern int function(Type Args); into my class. and it's working fine. But for import variable which is exported by dll this method doesn't work. It will get error that "DllImport is not use for this item only use for method import". And for extern keyword say that this will not use for this item. Plz help me. regards,


      Divyang Mithaiwala

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      Create a function that will expose that variable's address, then you can write to it.

      xacc.ide-0.1.3.2

      D 1 Reply Last reply
      0
      • L leppie

        Create a function that will expose that variable's address, then you can write to it.

        xacc.ide-0.1.3.2

        D Offline
        D Offline
        Divyang Mithaiwala
        wrote on last edited by
        #3

        dll is not my one it is made by someone else. I just downloaded it from internet & import methods using definition givin in doccument.


        Divyang Mithaiwala

        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