Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undocumented API Parameters

Status
Not open for further replies.

jmarler

Programmer
Jan 29, 2001
679
US
Does anyone know of a way to get the number parameters and their types (I don't care about a param name . . . just number and type) on an API just by examining the binary file? Say for instance I run Dumpbin /Exports on Shell32.dll . . . there are several exported API with no names that need to be called by their ordinals and I am wondering if . . .

1) Is there a way to determine how many params are required and what the param types are?

2) Can this method (assuming that it exists) be summerized in an algorithm so that a programtic method can be developed that will analyze exported APIs in DLLs and list their parameters and types.



Thanks! - Jeff Marler B-)
 
Jeff -

I can't get my copy of dumpbin to work, but....

I think you can look at the dissasembly and find out at least the size of the arguments based on which register/memory load instruction is being used.

I recall reading an article by Andrew Schullman several years ago (back when Windows 95 came out) where he talked about discovering hidden APIs. I think it was in PC Magazine (when it was worth a darn).

You might want to also check Dan Appleman's books, he might have published a few.

Chip H.
 
Chip,
Yeah, I was able to see the variable size as the params were being pulled off the stack, but I was hoping that there might be more information available . . . (trying to write a utility that will analyze DLLS and give more info automatically . . . if that's even possible).
By the way, what wrong with your dumpbin? My wasn't working under Win2K until I moved the mspdb60.dll into the system32 directory. Don't know why . . . it wasn't a COM DLL and it was in the path and it worked fine before under NT4, but for some reason, under 2k on my machine, it HAD to be in the system32 directory.
- Jeff Marler B-)
 
> mspdb60.dll <

That was the DLL it was complaining about. I was lazy and didn't have the desire to go search for it. Maybe I'll copy it over and try again.

Chip H.
 
Status
Not open for further replies.

Similar threads

Replies
1
Views
893
Replies
2
Views
203
Replies
3
Views
268
Replies
7
Views
241

Part and Inventory Search

Sponsor

Back
Top