94

Is there any free native Windows DLL export functions viewer, which shows the function name, and a list of their parameters?

0

4 Answers 4

117

dumpbin from the Visual Studio command prompt:

dumpbin /exports csp.dll

Example of output:

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


Dump of file csp.dll

File Type: DLL

  Section contains the following exports for CSP.dll

    00000000 characteristics
    3B1D0B77 time date stamp Tue Jun 05 12:40:23 2001
        0.00 version
           1 ordinal base
          25 number of functions
          25 number of names

    ordinal hint RVA      name

          1    0 00001470 CPAcquireContext
          2    1 000014B0 CPCreateHash
          3    2 00001520 CPDecrypt
          4    3 000014B0 CPDeriveKey
          5    4 00001590 CPDestroyHash
          6    5 00001590 CPDestroyKey
          7    6 00001560 CPEncrypt
          8    7 00001520 CPExportKey
          9    8 00001490 CPGenKey
         10    9 000015B0 CPGenRandom
         11    A 000014D0 CPGetHashParam
         12    B 000014D0 CPGetKeyParam
         13    C 00001500 CPGetProvParam
         14    D 000015C0 CPGetUserKey
         15    E 00001580 CPHashData
         16    F 000014F0 CPHashSessionKey
         17   10 00001540 CPImportKey
         18   11 00001590 CPReleaseContext
         19   12 00001580 CPSetHashParam
         20   13 00001580 CPSetKeyParam
         21   14 000014F0 CPSetProvParam
         22   15 00001520 CPSignHash
         23   16 000015A0 CPVerifySignature
         24   17 00001060 DllRegisterServer
         25   18 00001000 DllUnregisterServer

  Summary

        1000 .data
        1000 .rdata
        1000 .reloc
        1000 .rsrc
        1000 .text

2
  • 6
    Be careful not to execute 'dumpbin /export' accidentally ('s' is missing in the end), it's a completely different command.
    – Nikita R.
    Apr 17, 2013 at 1:07
  • 5
    @NikitaG. this command doesn't exist anymore
    – Stargateur
    Apr 5, 2019 at 15:48
72

you can use Dependency Walker to view the function name. you can see the function's parameters only if it's decorated. read the following from the FAQ:

How do I view the parameter and return types of a function? For most functions, this information is simply not present in the module. The Windows' module file format only provides a single text string to identify each function. There is no structured way to list the number of parameters, the parameter types, or the return type. However, some languages do something called function "decoration" or "mangling", which is the process of encoding information into the text string. For example, a function like int Foo(int, int) encoded with simple decoration might be exported as _Foo@8. The 8 refers to the number of bytes used by the parameters. If C++ decoration is used, the function would be exported as ?Foo@@YGHHH@Z, which can be directly decoded back to the function's original prototype: int Foo(int, int). Dependency Walker supports C++ undecoration by using the Undecorate C++ Functions Command.

8
  • Thanks, but when I try to open any DLL, it shows in the log window: Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module. Error: Modules with different CPU types were found. Warning: At least one delay-load dependency module was not found. Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module. Oct 10, 2009 at 18:17
  • I'm using Windows 7 x64 Final. Oct 10, 2009 at 18:21
  • 3
    @Alon: Well, your application is quiet messed up :) the first error indicates that some of your dll's are compiled for 32bit systems and some for 64bit. you can only load dll's with the same CPU architecture in the same process. you can live with the other two errors as long as the application is handling them.
    – Moshe Levi
    Oct 10, 2009 at 18:25
  • 1
    BTW, Those errors should not disturb you to view the exported function of the DLL in question. you should just click on this DLL and It's exported function will show up in the right window.
    – Moshe Levi
    Oct 10, 2009 at 18:28
  • 1
    @Alon: I get those errors as well, for every DLL I ever look at. Just ignore them. Oct 10, 2009 at 18:51
19

DLL Export Viewer by NirSoft can be used to display exported functions in a DLL.

This utility displays the list of all exported functions and their virtual memory addresses for the specified DLL files. You can easily copy the memory address of the desired function, paste it into your debugger, and set a breakpoint for this memory address. When this function is called, the debugger will stop in the beginning of this function.

enter image description here

3
  • 2
    Nirsoft's application doesn't show up nameless functions :-(
    – TCS
    Sep 6, 2016 at 7:44
  • The browse for DLL button is completed broken for me, also doesn't show any functions in dlls whatsoever. I'm using windows 10 (64bit)
    – Owl
    Jul 14, 2017 at 13:52
  • 1
    @TCS "Unnamed Functions are now displayed in Ordinalxxx format. (When 'Display Unnamed Functions' option is turned on)" since version 1.45
    – manuell
    Nov 28, 2017 at 11:55
9

If you don't have the source code and API documentation, the machine code is all there is, you need to disassemble the dll library using something like IDA Pro , another option is use the trial version of PE Explorer.

PE Explorer provides a Disassembler. There is only one way to figure out the parameters: run the disassembler and read the disassembly output. Unfortunately, this task of reverse engineering the interface cannot be automated.

PE Explorer comes bundled with descriptions for 39 various libraries, including the core Windows® operating system libraries (eg. KERNEL32, GDI32, USER32, SHELL32, WSOCK32), key graphics libraries (DDRAW, OPENGL32) and more.

alt text
(source: heaventools.com)

1
  • How does this differ from Nirsoft DLL Export Viewer?
    – Pacerier
    Apr 29, 2017 at 23:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.