Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Unmanaged
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 12-Jan-13 21:54pm
ProgramFOX118.4K
Edited 12-Jan-13 21:55pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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[^]
  Permalink  
v2
Comments
ProgramFOX at 15-Oct-13 12:36pm
   
Very nice, thank you!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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!
  Permalink  
Comments
ProgramFOX at 13-Jan-13 4:39am
   
Thank you!
OriginalGriff at 13-Jan-13 5:08am
   
You're welcome!
shaikh-adil at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.140709.1 | Last Updated 15 Oct 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid