How to Generate header file from DLL
-
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 ?
-
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 ?
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] -
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 ?
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]