As far as I know, there is no class in the .NET Framework. provides the necessary information.
However, you can use the platform invocation services (PInvoke) of the .Net platform to use the Win32 dll library functions dbghelp.dll . This DLL is part of the Debugging Tools for the Windows platform. The dbghelp dll provides a function called SymEnumerateSymbols64 that allows you to list all exported symbols of a dynamic link library. There is also a newer feature called SymEnumSymbols , which also allows you to list exported characters.
The code below provides a simple example of using the SymEnumerateSymbols64 function.
[DllImport("dbghelp.dll", SetLastError = true, CharSet = CharSet.Unicode)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool SymInitialize(IntPtr hProcess, string UserSearchPath, [MarshalAs(UnmanagedType.Bool)]bool fInvadeProcess); [DllImport("dbghelp.dll", SetLastError = true, CharSet = CharSet.Unicode)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool SymCleanup(IntPtr hProcess); [DllImport("dbghelp.dll", SetLastError = true, CharSet = CharSet.Unicode)] public static extern ulong SymLoadModuleEx(IntPtr hProcess, IntPtr hFile, string ImageName, string ModuleName, long BaseOfDll, int DllSize, IntPtr Data, int Flags); [DllImport("dbghelp.dll", SetLastError = true, CharSet = CharSet.Unicode)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool SymEnumerateSymbols64(IntPtr hProcess, ulong BaseOfDll, SymEnumerateSymbolsProc64 EnumSymbolsCallback, IntPtr UserContext); public delegate bool SymEnumerateSymbolsProc64(string SymbolName, ulong SymbolAddress, uint SymbolSize, IntPtr UserContext); public static bool EnumSyms(string name, ulong address, uint size, IntPtr context) { Console.Out.WriteLine(name); return true; } static void Main(string[] args) { IntPtr hCurrentProcess = Process.GetCurrentProcess().Handle; ulong baseOfDll; bool status;
To simplify the example, I did not use SymEnumSymbols . I also made an example without using classes such as the SafeHandle .Net framework class. If you need an example for SymEnumSymbols , just let me know.