How to get a list of functions inside a DLL (managed and unmanaged)?

So, I am playing the DLL (UnityEditor.dll). I want to get a list of all the functions inside this managed DLL that are unmanaged (the dll probably consists of native C ++ (with statically compiled libaries, if used), the core and the managed C ++ shell wrapped in one dll.) I I want to get a list of all unmanaged functions inside this Dll, for example, to create my own managed \ unmanaged shell?

+6
source share
3 answers

The dumpbin.exe utility that ships with Visual Studio can be used to display the export list. For instance:

dumpbin.exe / EXPORT C: \ WINDOWS \ System32 \ Kernel32.dll

Output Example:

  Microsoft (R) COFF / PE Dumper Version 10.00.30319.01
 Copyright (C) Microsoft Corporation.  All rights reserved.


 Dump of file C: \ Windows \ System32 \ kernel32.dll

 File Type: DLL

   Section contains the following exports for KERNEL32.dll

     00000000 characteristics
     4E20FBA0 time date stamp Sat Jul 16 03:46:56 2011
         0.00 version
            1 ordinal base
         1390 number of functions
         1390 number of names

     ordinal hint RVA name

           1 0 AcquireSRWLockExclusive (forwarded to NTDLL.RtlAcquireSRWLockExclusive)
           2 1 AcquireSRWLockShared (forwarded to NTDLL.RtlAcquireSRWLockShared)
           3 2 00004440 ActivateActCtx
           4 3 00066B80 AddAtomA
           5 4 00066B20 AddAtomW
           6 5 0006ADF0 AddConsoleAliasA
           7 6 0006AE60 AddConsoleAliasW
+8
source

Open the DLL file and find the EXPORT section of this PE file using the binary PE / COFF specifications available from Microsoft .

But I think this is overkill. Your question should be specific. What exactly do you want to wrap and what do you have? Only binary files and no sources / headers?

+2
source

DLLs do not contain "functions". They contain code and entry points. It is impossible to tell from optimized code where transitions between functions occur if you do not have a debug database.

+2
source

Source: https://habr.com/ru/post/921346/


All Articles