If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Best way to call functions exported by a dll?

If I faced the same task I would write a utility program that reads each line of exported function declarations, parses the information and writes to a text file typedefs, calls to GetProcAddress(), etc. in C++ source code format. I could probably do that in a fraction of the time that it would take to enter all the information manually - and it would not make typing mistakes.

Re: Best way to call functions exported by a dll?

Originally Posted by 0xC0000005

If I faced the same task I would write a utility program that reads each line of exported function declarations, parses the information and writes to a text file typedefs, calls to GetProcAddress(), etc. in C++ source code format. I could probably do that in a fraction of the time that it would take to enter all the information manually - and it would not make typing mistakes.

Good idea, just at the moment, I'm playing with the Microsoft Interface Definition Language Compiler.

Re: Best way to call functions exported by a dll?

Originally Posted by 0xC0000005

If I faced the same task I would write a utility program

I did a similar thing, only I parsed the header file that came with the library. I would parse the header file and create the entire source code to the function pointers, the call to LoadLibrary() and each call to GetProcAddress().

Re: Best way to call functions exported by a dll?

>> Copy it to your project path
That's not exactly how you use the command line tools. You should have a "Visual Studio 200x Command Prompt" on your start menu. This sets up the environment variables you need (including PATH) in order to use VS tools on the command line.