Some rather clueless questions about using undocumented APIs in Windows
January 16, 2008 9:56 AM Subscribe
Some rather clueless questions about using undocumented APIs in Windows
The details behind this are kind of a long story. But the deal is, I have a DLL that contains an API. It's totally undocumented. Using APIMonitor I can find the API calls that look like what I want, and I can call these from my programs provided I load the DLL, etc.
But the problem is, I don't know the prototypes for these functions. APIMonitor gives some clues because it shows the stack, but as far as I can tell it's not really "enough" to figure out the function signatures. If I use the wrong signatures obviously I corrupt the stack and crash my program pretty much straight away.
I have a program (not mine) that uses the DLL, which is what I've been using to run APIMonitor on. I can also use some tools I have to "hook" into this API, so that my function gets called instead of the API function. I was hoping I could use this to look at the details of the calling arguments but it's not really that much help because I still need to know the number and type of arguments that are getting passed to my function.
Are there any tools or methods I can use to figure out how to call these functions?
(This is all using Visual C/C++ if that matters)
posted by RustyBrooks to computers & internet (17 answers total) 3 users marked this as a favorite
posted by TeatimeGrommit at 10:29 AM on January 16, 2008