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 / C++ / MFC
  4. How to Generate header file from DLL

How to Generate header file from DLL

Scheduled Pinned Locked Moved C / C++ / MFC
toolstutorialquestioncareer
3 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.
  • G Offline
    G Offline
    GameProfessor
    wrote on last edited by
    #1

    hi, how could we create a header file from a DLL to use functions in that DLL ? I have only the DLL file in hand. From this DLL, using some tools (e.g DLL explorer) I can view the list of functions in that DLL. To load this DLL and use it, I use function LoadLibrary() and then GetProcAddress(). But to use GetProcAddress(), I need to know the function prototype (that means parameters & return type of that function). Fortunately, I have the development documents of this DLL which explain reference to all functions & data structures. Eventually, I ended up in manually writting a header file for that DLL from scratch based on the development documents. This is tedious job because I have to rewrite all definitions, constants, declare all functions, ... I wonder if it is possible to generate header file from DLL file ?

    C T 2 Replies Last reply
    0
    • G GameProfessor

      hi, how could we create a header file from a DLL to use functions in that DLL ? I have only the DLL file in hand. From this DLL, using some tools (e.g DLL explorer) I can view the list of functions in that DLL. To load this DLL and use it, I use function LoadLibrary() and then GetProcAddress(). But to use GetProcAddress(), I need to know the function prototype (that means parameters & return type of that function). Fortunately, I have the development documents of this DLL which explain reference to all functions & data structures. Eventually, I ended up in manually writting a header file for that DLL from scratch based on the development documents. This is tedious job because I have to rewrite all definitions, constants, declare all functions, ... I wonder if it is possible to generate header file from DLL file ?

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      As far as I know, there is no way to do that. But that's strange that the supplier of the DLL didn't provide a header file with it.


      Cédric Moonen Software developer
      Charting control [v1.2 - Updated]

      1 Reply Last reply
      0
      • G GameProfessor

        hi, how could we create a header file from a DLL to use functions in that DLL ? I have only the DLL file in hand. From this DLL, using some tools (e.g DLL explorer) I can view the list of functions in that DLL. To load this DLL and use it, I use function LoadLibrary() and then GetProcAddress(). But to use GetProcAddress(), I need to know the function prototype (that means parameters & return type of that function). Fortunately, I have the development documents of this DLL which explain reference to all functions & data structures. Eventually, I ended up in manually writting a header file for that DLL from scratch based on the development documents. This is tedious job because I have to rewrite all definitions, constants, declare all functions, ... I wonder if it is possible to generate header file from DLL file ?

        T Offline
        T Offline
        toxcct
        wrote on last edited by
        #3

        there's none, as Cedric stated. however, you can use Dependency Walker[^] to figure out the functions exported by the Library...


        [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

        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