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. Function Parameters in a C DLL?

Function Parameters in a C DLL?

Scheduled Pinned Locked Moved C#
question
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.
  • A Offline
    A Offline
    Arsalan Malik
    wrote on last edited by
    #1

    I want to call a function, exported by a C DLL, in my project, but I do not know its parameters! How can I get parameters (signature) of a function exported by a C DLL? I am looking for a tool or any code that achieves this. Dependency Walker fails to show signature of C functions, why? ARSALAN MALIK

    L 1 Reply Last reply
    0
    • A Arsalan Malik

      I want to call a function, exported by a C DLL, in my project, but I do not know its parameters! How can I get parameters (signature) of a function exported by a C DLL? I am looking for a tool or any code that achieves this. Dependency Walker fails to show signature of C functions, why? ARSALAN MALIK

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

      Arsalan Malik wrote: How can I get parameters (signature) of a function exported by a C DLL? You look in its header file. Arsalan Malik wrote: I am looking for a tool or any code that achieves this. Notepad :p Arsalan Malik wrote: Dependency Walker fails to show signature of C functions, why? Because it relies on the header file. top secret
      Download xacc-ide 0.0.3 now!
      See some screenshots

      A 1 Reply Last reply
      0
      • L leppie

        Arsalan Malik wrote: How can I get parameters (signature) of a function exported by a C DLL? You look in its header file. Arsalan Malik wrote: I am looking for a tool or any code that achieves this. Notepad :p Arsalan Malik wrote: Dependency Walker fails to show signature of C functions, why? Because it relies on the header file. top secret
        Download xacc-ide 0.0.3 now!
        See some screenshots

        A Offline
        A Offline
        Arsalan Malik
        wrote on last edited by
        #3

        You look in its header file. Thankyou for the reply. Problem is that I do not have any header/lib file for the dll. How to extract function signature from dll only? ARSALAN MALIK

        D 1 Reply Last reply
        0
        • A Arsalan Malik

          You look in its header file. Thankyou for the reply. Problem is that I do not have any header/lib file for the dll. How to extract function signature from dll only? ARSALAN MALIK

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          You can't. Since the parameters are passed on the stack, you must rely on the code that is popping the parameters off the stack in order to get them passed. On top of that parameters can also be passed by pointers, where the pointer is pushed onto the stack and poped off by the function code, to be used to point to an area of memory that, unless you had the header file to describe it to you, would be utterly meaningless without any type of context. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          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