Click here to Skip to main content
11,584,208 members (41,783 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# Unmanaged

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
Edited 12-Jan-13 21:55pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

To get the Function name list,

Go to VS command prompt,


1) dumpbin /exports user32.dll > "C:\FunctionList_User32.txt"
2) link /dump /exports user32.dll > "C:\FunctionList_User32.txt".[^]
ProgramFOX at 15-Oct-13 12:36pm
Very nice, thank you!
Rate this: bad
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!
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

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

  Print Answers RSS
0 OriginalGriff 430
1 Sergey Alexandrovich Kryukov 314
2 virusstorm 223
3 Richard Deeming 220
4 Dave Kreskowiak 200
0 OriginalGriff 1,623
1 Sergey Alexandrovich Kryukov 1,135
2 Abhinav S 701
3 Dave Kreskowiak 627
4 Suvendu Shekhar Giri 568

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100