Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

With reflection in C#, it's possible to get all methods from a library from managed code (using the Type.GetMethods()[^] method). Now, I'm trying to get all methods from unmanaged code. For example, I'm trying to get all methods from user32.dll (and the methods from other DLL's) in C#.
How can I do that?

Thanks in advance.
Posted
Updated 12-Jan-13 21:55pm
v2

Hi,
To get the Function name list,

Go to VS command prompt,

Type

1) dumpbin /exports user32.dll > "C:\FunctionList_User32.txt"
2) link /dump /exports user32.dll > "C:\FunctionList_User32.txt".



http://msdn.microsoft.com/en-us/library/aa720146(v=vs.71).aspx[^]
 
Share this answer
 
v2
Comments
Thomas Daniels 15-Oct-13 12:36pm    
Very nice, thank you!
ssaddam 6-Nov-17 6:10am    
Thanks, it saved my time
You can do it (to a limited extent) but I've never tried as the information you can get is pretty useless to you. Why? Because unmanaged DLLs do not contain parameter lists like managed assemblies do, so a list of DLL functions is just that: the names with no other information.

There are tools to retrieve those names: Dependancy Walker[^] is a very useful one, but in order to use the names you can retrieve, you still need to look at the documentation. So to be honest, you are probably better off starting with the documents in the first place!
 
Share this answer
 
Comments
Thomas Daniels 13-Jan-13 4:39am    
Thank you!
OriginalGriff 13-Jan-13 5:08am    
You're welcome!
shaikh-adil 13-Jan-13 5:27am    
OG sir can you help me out here
http://www.codeproject.com/Questions/526995/changingplusthepluscurrentpluscellplusselectionplu

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900