Jump to content
  • Advertisement
Sign in to follow this  
paulbird

dynamic win32

This topic is 4890 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OK, forget actually calling the functions for now, if you load a module say mylib.dll with LoadModule and want to get all the function names, what would you do next? This, really, is the main bit I am having difficulty with. I couldn't find DUMPBIN anywhere.

Share this post


Link to post
Share on other sites
Advertisement
Your best bet for what you apparently want to do (list all functions somewhere) would be to write a C parser. All the functions you want (that you can really use) will be defined in various header files. All you need to do, then is parse the information out of there. While not a trivial task, it shouldn't be too difficult either since you only need to find types (to know what parameters should be) and function declarations (to know what functions there are) and can, for the most part, ignore any other information that may be present. If you want to match this list to a DLL, you'll have to extract the list and include it in your program (perhaps as a data file of some kind) and then match the function names to those you find in the DLL. To find them in the DLL, you can either use an API (which I can't remeber) or you just need to know the DLL format, called 'PE' for portable executable. You can find a description on wotsit

I mention C becaue none of the windows API or OpenGL API uses C++ specific features, and while DirectX does, it also works with C. You'll likely have to make a lot of exceptions in your compiler, though, since microsoft is fond of comlier extension and the like and I imagine that they used quite a few in their definition of the windows API.

For this task, I suggest you get the Dragon Book that covers how to create compilers, and a working paper on the C Standard.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!